41 41 votes What is the weight of a minimum spanning tree of the following graph? $29$ $31$ $38$ $41$ Algorithms gatecse-2003 algorithms minimum-spanning-tree normal + – Kathleen 12.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 36 36 votes Apply Prim's algorithm, start from $A$ as shown in figure below. Add all the weights in the given figure which will be equal to $31$. Correct Answer: $B$ monanshi answered Jan 14, 2016 • edited May 8, 2021 by gatecse monanshi comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments `JEET commented Dec 24, 2019 reply Follow flag Can we backtrack in a prims algorithm?? I mean if we can't move ahead on any edge, then can we backtrack? 0 0 replyShare `JEET commented Dec 24, 2019 reply Follow flag @techbd123 Can you please see my above comment. 0 0 replyShare techbd123 commented Dec 25, 2019 reply Follow flag @`JEET Please check it. 1 1 replyShare Please log in or register to add a comment.
6 6 votes Use kruskals algorithm 31 is the answer shashankrustagi answered Dec 10, 2020 shashankrustagi comment Share Follow See all 3 Comments 3 3 Comments reply Jayvijay Chauhan commented Apr 22 reply Follow flag We can take either ad or cd edges mst answer won't affect. 0 0 replyShare Ninad_VisionGATE commented May 5 reply Follow flag @Jayvijay Chauhanyes it will, if you take a,d then it will be 2 as included in MSTif you take cd then, distance from a to d will become 1+2 (a,c + c,d) and it will no longer be a MSTplease correct me if i am wrong 0 0 replyShare Jayvijay Chauhan commented May 6 reply Follow flag @Ninad_VisionGATE we will take 2 from cd or ad i think it will depend on you accor. to me 0 0 replyShare Please log in or register to add a comment.
5 5 votes Solution: B The minimum spanning tree is AC,AD,BG,EI,BD,FH,HI,IJ,GH. Gowthaman Arumugam answered Feb 2, 2015 Gowthaman Arumugam comment Share Follow See 1 comment 1 1 comment reply Kaluti commented Oct 8, 2017 reply Follow flag answer is 31 0 0 replyShare Please log in or register to add a comment.