Prim's Algorithm | Minimum Spanning tree | MST | DAA | Lec-26 | Bhanu Priya

preview_player
Показать описание
Design & Analysis of Algorithms ( DAA )
Minimum Spanning tree(MST) : Prim's algorithm clear explanation with example

Class Notes ( pdf )

Complete DAA Course Playlist :
Рекомендации по теме
Комментарии
Автор

thank you madam, you explanation was very easy to understand. but i am afraid that at 12:05 'f' should be connected with 'e', you said that exactly though.

kazimehrabrashid
Автор

Guys - Prim's algorithm yields the minimum spanning tree only when there are unique edge weights. The way she explained is correct. However, for this graph (where there are 2 pairs of edges with the same weights bd, ac and bc, df), Kruskal's algorithm is the efficient one. She could have chosen to use unique edge weights. Kruskal's would give you 22 as many of you mentioned

prathyusha
Автор

I have tomorrow exam and I searched for prims algorithm in many videos and still was confusing, this video opened accidentally but its the best pakka 7 marks 😅 thanks ma'am 😊

hemanthprabhu
Автор

Thanks mam u r the best teacher of youtube

afnainshariff
Автор

nice explanation keep rocking and inspire
many more

kondurivarun
Автор

F should be connected to e. As it has minimum weight

pubalidas
Автор

Mam your my god for all the subjects because of u I will win and score good marks in my exam really thank you so much mam it means a lots 💓☺️☺️

mithun
Автор

Minimum spanning tree has a weight of 22 whereas your tree is 23 ... i suppose you made a mistake . f should be connected to both e and g

VishalAnandTM
Автор

last connection would be between (f, e), not between (g, e).


Then the answer will be 22

ishowertudu
Автор

ans is wrong but got an idea how it actually work
thnk u 😇

devratnasawaitul
Автор

The correct answer here is f to g and f to e not from g to e so that minimum spanning tree has weight of 22

sattivideos
Автор

For what reasons exactly will anyone dislike a crystal clear(in terms of explanation) video like this?

yogeshdharya
Автор

Ma'am you can choose F to E also na?

Abdulsamad-
Автор

I think your's example ans is wrong because at final step (e-f) will be connected not (e-g)

sumitkumarmishra
Автор

1 NOTE : In last step the edges should be {f, e) and not {g, e}, because {f, e} has weight 5 which is less than 6 of {g, e}

pushkarroy
Автор

Mam said that second step is to select the unvisited vertex f is already visited vertex but e is the new vertex thats the reason for selecting (e, g)

sachilandrew
Автор

last connection would be between (f, e), not between (g, e).


Then the answer will be 22 not 23

muhammadaamir
Автор

Tq mam... For ur simply explanation... It made easy to understand this concept

aangyamishra
Автор

At last e-f will be connected instead of g-e

pushkarkumar
Автор

Amazing ma'am thoughts cleared thank you very much

taleemmurtaza