Тёмный

Prim's algorithm | Minimum Spanning tree (MST) | Design & Algorithms | Lec-26 | Bhanu Priya 

Education 4u
Подписаться 904 тыс.
Просмотров 548 тыс.
50% 1

Minimum Spanning tree(MST) : Prim's algorithm clear explanation with example

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 165   
@003kazimehrabrashid4
@003kazimehrabrashid4 4 года назад
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.
@bharathmadival8055
@bharathmadival8055 2 года назад
🙌
@mr.incredible1715
@mr.incredible1715 6 месяцев назад
Exactly 😊
@sattivideos8136
@sattivideos8136 Год назад
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
@VamsiKrishna-k7t
@VamsiKrishna-k7t Год назад
Yes you are correct
@infamous_SUSIL
@infamous_SUSIL Год назад
No she done correctly
@adijaiswal8009
@adijaiswal8009 10 месяцев назад
U r ryt
@kishorraj4751
@kishorraj4751 9 месяцев назад
22 is correct answer
@RajdeepDas-oo5gz
@RajdeepDas-oo5gz 8 месяцев назад
Yep
@hemanthprabhu8134
@hemanthprabhu8134 Год назад
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 😊
@VishalAnandTM
@VishalAnandTM 5 лет назад
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
@ImtiazAhmad-yw8do
@ImtiazAhmad-yw8do 5 лет назад
Yes , you are right
@Odim65
@Odim65 5 лет назад
yaa you are right
@sandipsarkar5261
@sandipsarkar5261 5 лет назад
There should be the edge between f to e...not g to e...this is the mistake
@ridhammodh2601
@ridhammodh2601 5 лет назад
yes you are right
@prathyusha252
@prathyusha252 5 лет назад
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 edges with the same weight bd and ac), Kruskal's algorithm is the efficient one. She could have chosen to use unique edge weights. Kruskal's would give you 22 as you mentioned 👍
@pubalidas6903
@pubalidas6903 2 года назад
F should be connected to e. As it has minimum weight
@RAHULSHREEJITH
@RAHULSHREEJITH 26 дней назад
True...
@sumitkumarmishra6483
@sumitkumarmishra6483 6 лет назад
I think your's example ans is wrong because at final step (e-f) will be connected not (e-g)
@buddhiniwalakuluarachchi8281
@buddhiniwalakuluarachchi8281 6 лет назад
i agree
@RaviKumar-cz5ci
@RaviKumar-cz5ci 5 лет назад
@@buddhiniwalakuluarachchi8281 then it will be closed circuit...and we should take minimum value
@ShivaKumar-ud8pt
@ShivaKumar-ud8pt 5 лет назад
Thanks
@pradhumnsirothiya
@pradhumnsirothiya 5 лет назад
last visited edges se min distance dekha jata hai bro.....
@nilotpalsingh9096
@nilotpalsingh9096 5 лет назад
You are correct
@ishowertudu7405
@ishowertudu7405 5 лет назад
Mam.....the last connection would be between (f,e),not between (g,e). Then the answer will be 22
@Abhishekyadav-kb5ni
@Abhishekyadav-kb5ni 2 года назад
yeah i have the same doubt...
@devratnasawaitul8844
@devratnasawaitul8844 3 года назад
ans is wrong but got an idea how it actually work thnk u 😇
@muhammadaamir566
@muhammadaamir566 3 года назад
Mam.....the last connection would be between (f,e),not between (g,e). Then the answer will be 22 not 23
@GAGANDEEPGOWDAMLAIML--
@GAGANDEEPGOWDAMLAIML-- 2 года назад
correct bro
@pushkarroy9740
@pushkarroy9740 9 месяцев назад
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}
@sauravkumar3962
@sauravkumar3962 3 года назад
This is wrong MSP will be 22 in this case....you have to join *f* and *e*....not g and e...🙄
@arunkumararun7407
@arunkumararun7407 4 года назад
Mam is confused.but actualy answer is MST=22
@Aakash-mi8xq
@Aakash-mi8xq 4 года назад
this method is wrong guys.Please do not refer it
@saitejavbss3200
@saitejavbss3200 4 года назад
u said wroung total wroung
@Abdulsamad-1
@Abdulsamad-1 3 года назад
Ma'am you can choose F to E also na?
@itzabhishek.
@itzabhishek. 6 месяцев назад
Yes but you have to see from visited vertice and after visiting f to g only one path remains to e , thatwhy we have to visit g to e .. because in prims we can't go back after visiting any vertice...I hope so ...
@dheerajgupta6128
@dheerajgupta6128 3 года назад
Not explained well
@tulasichanga
@tulasichanga Год назад
Mam I have one doubt. How to calculate the weight
@kondurivarun
@kondurivarun 9 месяцев назад
nice explanation keep rocking and inspire many more
@rohanprak
@rohanprak 5 лет назад
remove this video please , its not correct 1. teaching the wrong code 2. uploading the lecture video 3. not removing the video coz of views 4. result : dislike the video and unsubscribe
@VIVRKKRGUPTA
@VIVRKKRGUPTA 2 месяца назад
Algorithm bolta hai select unvisited vertex which is adjacent of visited vertices isiye g to e hoga kyuki f se to g tak visited ho chuka hain phir f kaise hoga
@BhagatBhutale..
@BhagatBhutale.. 7 месяцев назад
Video is Useful 👍
@pushkarkumar7173
@pushkarkumar7173 5 лет назад
At last e-f will be connected instead of g-e
@VardanSharma
@VardanSharma 4 года назад
Yes you're correct I wonder how can she post it without even checking.
@sabarinathem4146
@sabarinathem4146 4 года назад
correct answer
@lakshaysethi7927
@lakshaysethi7927 5 месяцев назад
who else listened that mam mistakenly said sex 2:03
@cst51ritishadebnath62
@cst51ritishadebnath62 3 месяца назад
Last step is not currect. e connect with f not g , so minimum spanning tree has weight=22
@manpreetbrar-km7qg
@manpreetbrar-km7qg 4 года назад
Mam jo weight hotta hai vertices ka vo kaise v likh sakte hai jaise a to b 4 diya apne ex. Me
@anmol8630
@anmol8630 2 года назад
Can we do like this in university exams
@harrymanoharan
@harrymanoharan 5 лет назад
This is wrong!
@20cs012Neelambal.k
@20cs012Neelambal.k 8 месяцев назад
What is the crt ans. mam...,? 22 or 23
@el_ilimitado
@el_ilimitado 2 года назад
## Attention guys: sorry ma'am but what u have demonstrated is not totally right. u said edges with minimum weight can be taken only from the latest visited vertex. but it can be taken from any visited vertex. I request u to recheck it. thank u
@prathyusha252
@prathyusha252 5 лет назад
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
@sarthakchandrayan5542
@sarthakchandrayan5542 9 месяцев назад
we will get 22 in this method as well .In the 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}
@DivakarGowdaMN
@DivakarGowdaMN 9 месяцев назад
​​@@sarthakchandrayan5542f is already visited na how can we revisit it
@sarthakchandrayan5542
@sarthakchandrayan5542 9 месяцев назад
@@DivakarGowdaMN if it has a lower value you can
@minakshirawat3290
@minakshirawat3290 6 месяцев назад
@@sarthakchandrayan5542 same problem my answer is 23 and my friends answer 22 ,not understand how's right same question asked in today's exam
@AdeshkumarAdeshraj-dy9fh
@AdeshkumarAdeshraj-dy9fh 4 месяца назад
mam , in step 6 where you choose light weight is wrong because weight of (f,e) is less then weight of (g,e).
@ayushjaiswal7298
@ayushjaiswal7298 Год назад
wrong answer...please rewatch the video before uploading
@mithun7392
@mithun7392 2 месяца назад
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 💓☺️☺️
@sahilkulshreshtha4465
@sahilkulshreshtha4465 Год назад
Your solution is wrong, min span can be 22 and in your case it is 23
@khadizaaktereme6184
@khadizaaktereme6184 2 года назад
why {f,e} can't be taken at the last step??? I think that is incorrect step to choose {g,e}.
@lifechange4464
@lifechange4464 Год назад
Ma'am apne f se e lena tha apka galat h
@daniyalhaidary3391
@daniyalhaidary3391 4 года назад
Ma'am aap jo last m (ge )edge ko milaye h. Wo kya Sahi h
@dheerajgupta6128
@dheerajgupta6128 3 года назад
There is a mistake
@sunnyKumar-jy6ui
@sunnyKumar-jy6ui 6 месяцев назад
connection of e and g is 6 and e and f is 5 so i think it should be e to f which is of 5
@Pastozafaire
@Pastozafaire 5 лет назад
Thanks for posting this video, please check your answer as I also got 22 here are my chosen edges - ab(4), ac(8),cd(2),cf(1),ef(5) , fg(2); why choose eg instead of ef? ef has the lesser weight by 1.
@Janakiram_999
@Janakiram_999 5 лет назад
G is a visited vertex so connect e
@shaikthofik2619
@shaikthofik2619 Год назад
you have to show full paper the video is not correct
@bhaveshnikam5954
@bhaveshnikam5954 2 года назад
WRONG ANSWER HE LASGT ME F-E SELECT KARANA THA
@sushantraj3830
@sushantraj3830 Год назад
Galat padhati hoo -22 hoga ans
@shankuntalaverma1413
@shankuntalaverma1413 Год назад
minimum spanning tree has 22 your answer is wrong
@TaufiqShaikhkivines
@TaufiqShaikhkivines 5 лет назад
Mst is 22
@SluciferKm
@SluciferKm 7 месяцев назад
The minimum spanning tree has weight of 22 not 23
@shreysingh4463
@shreysingh4463 4 года назад
By krushals method it's answer is 22 but yours is 23 ?
@poorprogrammingcm663
@poorprogrammingcm663 4 года назад
wrong answer
@suberrath8787
@suberrath8787 2 года назад
Is she drunk ???
@halfengineer3236
@halfengineer3236 Год назад
Wt =22 is correct and your ans is incorrect
@anjalidevi6483
@anjalidevi6483 6 лет назад
Tnquuu mam
@gowrijanarthanan9393
@gowrijanarthanan9393 Год назад
good explanation thank you
@anuradhagupta5463
@anuradhagupta5463 4 года назад
Why we don't start from c having least weight
@Christ_Love_40
@Christ_Love_40 3 года назад
Not crealry We are all learners not a lecturers
@rishikashyap07
@rishikashyap07 2 года назад
It's wrong
@azizulhakim2882
@azizulhakim2882 5 лет назад
something mistake mam
@s_h_reee7041
@s_h_reee7041 4 месяца назад
Sircute .
@Abcdef-hq3vf
@Abcdef-hq3vf 2 года назад
Mam this was not the minimum spaning tree
@saurabhbisht2668
@saurabhbisht2668 5 лет назад
Ans is wrong it should be 22 and ur ans in 23
@mdmuzakkir6912
@mdmuzakkir6912 5 лет назад
madam plzz make vedio regarding branch and bound knapsack problem
@sambarsatti5717
@sambarsatti5717 14 часов назад
It should not be forming cycle
@jahanahmed8308
@jahanahmed8308 3 года назад
Mam u forgot the weight 5 edge....cost is 22
@taleemmurtaza5041
@taleemmurtaza5041 3 года назад
Amazing ma'am thoughts cleared thank you very much
@kerwal810
@kerwal810 5 лет назад
Mam ye pabg to band kr lo
@brownfeminine
@brownfeminine 2 года назад
At starting of the video l didn't get anything but by the end I was happy that ''Oh thank god this is very simple''😅 THANKS A LOT mam❤
@hindupriya8763
@hindupriya8763 3 года назад
How to write weights madam
@unboxinghonestreview619
@unboxinghonestreview619 5 лет назад
What is the difference in prims algorith and krushkal algorithm
@csengineer8819
@csengineer8819 10 месяцев назад
prims algo work on vertices and krushkal algo work on edges
@n.syamala1090
@n.syamala1090 4 года назад
Ur explanation is too good mam do many more videos on data structures
@bandiisreekanth1330
@bandiisreekanth1330 3 года назад
How u take weights as 9 8 4 like this
@sstelematicssstelematics2210
@sstelematicssstelematics2210 6 лет назад
Ty Mam....u explained really good
@reddygayathri031
@reddygayathri031 5 лет назад
No it is correct what she said in this there should be least no if u have said Thai it for should be connected to e and g but first we have to check least value i.e f to e it has 5 and f to g it has 2 minimum so we have to take f to g so what she said is right
@Explorewithrishabh8318
@Explorewithrishabh8318 4 года назад
Mam bahut complicated krdiya aapne...
@amitsingh-qn7nv
@amitsingh-qn7nv 5 лет назад
good video..
@humanAbsu
@humanAbsu 2 года назад
wrong answer bhai logo
@worldexcitingthings9309
@worldexcitingthings9309 5 лет назад
I think you teach us kruskal algorithms not prim's algorithms plz refer book
@techniquerequest5050
@techniquerequest5050 3 года назад
It's prims bro✌plz refer book
@afnainshariff45
@afnainshariff45 7 месяцев назад
Thanks mam u r the best teacher of youtube
@mithun7392
@mithun7392 2 месяца назад
Ya❤
@AbhishekThakur-fk7px
@AbhishekThakur-fk7px Год назад
Thank you so much mam.
@hyn5070
@hyn5070 2 года назад
Mam please do videos on java and python it's humble request
@manpreetbrar-km7qg
@manpreetbrar-km7qg 4 года назад
Plzz reply
@abinayap3858
@abinayap3858 4 года назад
I think prim's algorithm using edges...
@yuvasriravi6987
@yuvasriravi6987 10 месяцев назад
Thank you mam 😊
@KTMKING1703
@KTMKING1703 Год назад
Mam 2 edges 9 , 9
@jazeerabbas2889
@jazeerabbas2889 2 года назад
Malayali undooo
@Srikrishna9999
@Srikrishna9999 2 года назад
Learn English
@kavyaganesh833
@kavyaganesh833 3 года назад
Mam thank you
@Ashimiim
@Ashimiim 5 лет назад
If we have loops or parallel paths?
@tarequlislam9543
@tarequlislam9543 5 лет назад
just ignor loop and parallel paths(heighest weight)
@taleemmurtaza5041
@taleemmurtaza5041 3 года назад
First remove self loop and parallel edges then you find your mst with the given graph
@jayab4746
@jayab4746 3 года назад
Super explanied mam tq u so much
@srikantbaliarsingh7764
@srikantbaliarsingh7764 3 года назад
Thank you so much,,help me for the next 1hour exam
@aikarsharay6707
@aikarsharay6707 2 года назад
Thank you
@vishnumb526
@vishnumb526 2 года назад
Sooper
@RahulRaj-vv9fs
@RahulRaj-vv9fs Год назад
aapki aawaz kitna aache hai :) >. .< 😍😍😍😍
@sunithaparimi786
@sunithaparimi786 5 лет назад
Mam ur videos are really good understanding easily ur explanation step by step pls put a video for kmaps
@akshatkumar1062
@akshatkumar1062 5 лет назад
I can help u with k maps in the easiest way of solving them
@vinaykumar-pt1br
@vinaykumar-pt1br 2 года назад
what if we have a parallel edge in the graph should we remove it
@Levis40
@Levis40 6 лет назад
I want kruskal's algorithms for finding minimum spanning tree process please upload that video
@yogeshdharya3857
@yogeshdharya3857 4 года назад
For what reasons exactly will anyone dislike a crystal clear(in terms of explanation) video like this?
@mithun7392
@mithun7392 2 месяца назад
If ur interested watch this video or do not open this video
@yogeshdharya3857
@yogeshdharya3857 2 месяца назад
​@@mithun7392u understand English ? I doubt that 😆🤦🤦
@offline5756
@offline5756 Год назад
Thank you ❤️
@ashishpandey7344
@ashishpandey7344 5 лет назад
something went wrong mam
@kavyasharma9018
@kavyasharma9018 3 года назад
The most easy explanation
@abhishekgupta4532
@abhishekgupta4532 3 года назад
chal teri
@chachannel001
@chachannel001 4 года назад
MST is (4+8+2+1+2+6) = 23
Далее
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Вопрос Ребром - Серго
43:16
Просмотров 1,4 млн
Prim's Algorithm
7:18
Просмотров 580 тыс.
Dijkstra's Algorithm with example of undirected graph
12:31
Prim's Algorithm Minimum Spanning Tree Graph Algorithm
19:13