Given an undirected graph $G(V, E)$ with a weight function $f$ and a ceratin weight $x$, I need to find how many edges with weight $x$ appear in every minimum spanning tree of $G$.
any ideas on how to solve this problem? I think that somehow it's necessary to prioritize the edges with weight $x$ over other edges.
Thanks.
Every MST has the same multiset of edge weights. Thus, you only need to compute a single MST and return the multiplicity of $x$ in it.