edited by
1,173 views
0 votes
0 votes

I think all options are wrong

edited by

3 Answers

2 votes
2 votes
yup!

u r ryt . All options are wrong.
0 votes
0 votes

https://stackoverflow.com/questions/1787152/prims-mst-does-the-start-node-matter  this show that you can start from any vertex

https://www.cse.ust.hk/~dekai/271/notes/L07/L07.pdf

refer to page 16

they are saying take any vertex and take the minimum edge to that vertices set that dont make cycle  repeat this step until you got all vertices

in option A    (c,d),(d,f) now taking (a,b) edge is wrong 

in option B    they started from the vertex e and grow and each step they took the minimum edge and at the time when choosing the third edge they can choose either of (b,f) and (c,d) they choose (b,f) and move ahead so this is right

in option C    they started from the vertex e and grow and each step they take the minimum edge and at the time when choosing the third edge they can choose either of (b,f) and (c,d) they choose (c,d) and move ahead this is right 

in option D   (d,f) now  taking(d,e ) is wrong

Related questions

744
views
0 answers
2 votes
sandip_1999 asked May 11, 2022
744 views
Please can anyone tell me though Prim’s and Kruskal’s algorithms are greedy algorithms. Greedy algorithms always give local optimum solutions but how Prim’s and Kruskal’s algorithms are giving global optimum solutions why?
409
views
1 answers
1 votes
radha gogia asked Feb 20, 2016
409 views
I tried by taking n=2 , and took points (1,1) ,(1,2) ,(2,2),(2,1) and I got the minimum weight to be 3 , which is n+1 but according to answer it is n-1
481
views
0 answers
0 votes