I have been disscussing this problem with a lot of my friends . However no solution has been found. let G= w is a weight function for each e in E w(e)=1 find MST of G in O(|V|+|E|)
thanks
I have been disscussing this problem with a lot of my friends . However no solution has been found. let G= w is a weight function for each e in E w(e)=1 find MST of G in O(|V|+|E|)
thanks
Copyright © 2021 JogjaFile Inc.
If every edge has weight $1$, then every spanning tree of $G$ has the same weight: $\lvert V\rvert-1$. So, all that you actually have to do here is find any $O(\lvert V\rvert+\lvert E\rvert)$-time algorithm for finding ANY spanning tree for $G$.
For instance: breadth-first search can be used to do this, with worst-case performance $O(\lvert V\rvert+\lvert E\rvert)$.