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

  Рет қаралды 533,910

Education 4u

Education 4u

6 жыл бұрын

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

Пікірлер: 162
@taleemmurtaza5041
@taleemmurtaza5041 3 жыл бұрын
Amazing ma'am thoughts cleared thank you very much
@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 Жыл бұрын
🙌
@mr.incredible1715
@mr.incredible1715 4 ай бұрын
Exactly 😊
@hemanthprabhu8134
@hemanthprabhu8134 9 ай бұрын
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 😊
@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❤
@n.syamala1090
@n.syamala1090 4 жыл бұрын
Ur explanation is too good mam do many more videos on data structures
@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
@pubalidas6903
@pubalidas6903 2 жыл бұрын
F should be connected to e. As it has minimum weight
@ishowertudu7405
@ishowertudu7405 4 жыл бұрын
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...
@aangyamishra1008
@aangyamishra1008 3 жыл бұрын
Tq mam... For ur simply explanation... It made easy to understand this concept
@indrareddy5436
@indrareddy5436 Жыл бұрын
thats fine its ok
@prathyusha252
@prathyusha252 4 жыл бұрын
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 7 ай бұрын
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 7 ай бұрын
​​@@sarthakchandrayan5542f is already visited na how can we revisit it
@sarthakchandrayan5542
@sarthakchandrayan5542 7 ай бұрын
@@DivakarGowdaMN if it has a lower value you can
@minakshirawat3290
@minakshirawat3290 4 ай бұрын
@@sarthakchandrayan5542 same problem my answer is 23 and my friends answer 22 ,not understand how's right same question asked in today's exam
@kondurivarun
@kondurivarun 7 ай бұрын
nice explanation keep rocking and inspire many more
@vinaykumar-pt1br
@vinaykumar-pt1br 2 жыл бұрын
what if we have a parallel edge in the graph should we remove it
@Abdulsamad-1
@Abdulsamad-1 2 жыл бұрын
Ma'am you can choose F to E also na?
@daniyalhaidary3391
@daniyalhaidary3391 4 жыл бұрын
Ma'am aap jo last m (ge )edge ko milaye h. Wo kya Sahi h
@mithun7392
@mithun7392 15 күн бұрын
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 💓☺️☺️
@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-- Жыл бұрын
correct bro
@tulasichanga
@tulasichanga Жыл бұрын
Mam I have one doubt. How to calculate the weight
@yogeshdharya3857
@yogeshdharya3857 4 жыл бұрын
For what reasons exactly will anyone dislike a crystal clear(in terms of explanation) video like this?
@mithun7392
@mithun7392 15 күн бұрын
If ur interested watch this video or do not open this video
@yogeshdharya3857
@yogeshdharya3857 10 күн бұрын
​@@mithun7392u understand English ? I doubt that 😆🤦🤦
@itzabhishek.
@itzabhishek. 4 ай бұрын
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 ...
@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 5 жыл бұрын
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
@jayab4746
@jayab4746 3 жыл бұрын
Super explanied mam tq u so much
@srikantbaliarsingh7764
@srikantbaliarsingh7764 3 жыл бұрын
Thank you so much,,help me for the next 1hour exam
@kavyasharma9018
@kavyasharma9018 3 жыл бұрын
The most easy explanation
@sstelematicssstelematics2210
@sstelematicssstelematics2210 6 жыл бұрын
Ty Mam....u explained really good
@devratnasawaitul8844
@devratnasawaitul8844 3 жыл бұрын
ans is wrong but got an idea how it actually work thnk u 😇
@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 4 жыл бұрын
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 👍
@unboxinghonestreview619
@unboxinghonestreview619 5 жыл бұрын
What is the difference in prims algorith and krushkal algorithm
@csengineer8819
@csengineer8819 8 ай бұрын
prims algo work on vertices and krushkal algo work on edges
@BhagatBhutale..
@BhagatBhutale.. 5 ай бұрын
Video is Useful 👍
@afnainshariff3163
@afnainshariff3163 5 ай бұрын
Thanks mam u r the best teacher of youtube
@mithun7392
@mithun7392 15 күн бұрын
Ya❤
@VIVRKKRGUPTA
@VIVRKKRGUPTA 7 күн бұрын
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
@mdmuzakkir6912
@mdmuzakkir6912 5 жыл бұрын
madam plzz make vedio regarding branch and bound knapsack problem
@iasanuradhagupta5463
@iasanuradhagupta5463 4 жыл бұрын
Why we don't start from c having least weight
@anjalidevi6483
@anjalidevi6483 5 жыл бұрын
Tnquuu mam
@anmol8630
@anmol8630 2 жыл бұрын
Can we do like this in university exams
@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
@gowrijanarthanan9393
@gowrijanarthanan9393 Жыл бұрын
good explanation thank you
@AbhishekThakur-fk7px
@AbhishekThakur-fk7px Жыл бұрын
Thank you so much mam.
@AdeshkumarAdeshraj-dy9fh
@AdeshkumarAdeshraj-dy9fh 2 ай бұрын
mam , in step 6 where you choose light weight is wrong because weight of (f,e) is less then weight of (g,e).
@offline5756
@offline5756 Жыл бұрын
Thank you ❤️
@arunkumararun7407
@arunkumararun7407 4 жыл бұрын
Mam is confused.but actualy answer is MST=22
@bandiisreekanth1330
@bandiisreekanth1330 3 жыл бұрын
How u take weights as 9 8 4 like this
@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
@RahulRaj-vv9fs
@RahulRaj-vv9fs Жыл бұрын
aapki aawaz kitna aache hai :) >. .< 😍😍😍😍
@khadizaaktereme6184
@khadizaaktereme6184 Жыл бұрын
why {f,e} can't be taken at the last step??? I think that is incorrect step to choose {g,e}.
@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
@shreysingh4463
@shreysingh4463 4 жыл бұрын
By krushals method it's answer is 22 but yours is 23 ?
@yuvasriravi6987
@yuvasriravi6987 8 ай бұрын
Thank you mam 😊
@aikarsharay6707
@aikarsharay6707 2 жыл бұрын
Thank you
@kavyaganesh833
@kavyaganesh833 3 жыл бұрын
Mam thank you
@hindupriya8763
@hindupriya8763 3 жыл бұрын
How to write weights madam
@StrangerDon
@StrangerDon 5 жыл бұрын
Thanks
@cst51ritishadebnath62
@cst51ritishadebnath62 Ай бұрын
Last step is not currect. e connect with f not g , so minimum spanning tree has weight=22
@pushkarroy9740
@pushkarroy9740 7 ай бұрын
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}
@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
@amitsingh-qn7nv
@amitsingh-qn7nv 5 жыл бұрын
good video..
@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
@ashishpandey7344
@ashishpandey7344 5 жыл бұрын
something went wrong mam
@sunnyKumar-jy6ui
@sunnyKumar-jy6ui 4 ай бұрын
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
@Levis40
@Levis40 5 жыл бұрын
I want kruskal's algorithms for finding minimum spanning tree process please upload that video
@saitejavbss3200
@saitejavbss3200 3 жыл бұрын
u said wroung total wroung
@jahanahmed8308
@jahanahmed8308 3 жыл бұрын
Mam u forgot the weight 5 edge....cost is 22
@hyn5070
@hyn5070 2 жыл бұрын
Mam please do videos on java and python it's humble request
@user-ix2ij4em9l
@user-ix2ij4em9l 5 ай бұрын
What is the crt ans. mam...,? 22 or 23
@bidetwacadet6525
@bidetwacadet6525 5 жыл бұрын
thx
@saurabhbisht2668
@saurabhbisht2668 5 жыл бұрын
Ans is wrong it should be 22 and ur ans in 23
@shivarajh2167
@shivarajh2167 5 жыл бұрын
U made it easy.. Thanks mam
@rohanprak
@rohanprak 5 жыл бұрын
its wron bro , dont follow , MST cost is 22 whereas she calculated as 23
@azizulhakim2882
@azizulhakim2882 4 жыл бұрын
something mistake mam
@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
@user-zf8ii5qs3r
@user-zf8ii5qs3r Жыл бұрын
Yes you are correct
@infamous_SUSIL
@infamous_SUSIL Жыл бұрын
No she done correctly
@adijaiswal8009
@adijaiswal8009 8 ай бұрын
U r ryt
@kishorraj4751
@kishorraj4751 7 ай бұрын
22 is correct answer
@RajdeepDas-oo5gz
@RajdeepDas-oo5gz 6 ай бұрын
Yep
@Abcdef-hq3vf
@Abcdef-hq3vf 2 жыл бұрын
Mam this was not the minimum spaning tree
@umarbilal6150
@umarbilal6150 5 жыл бұрын
very helpful lecture
@abinayap3858
@abinayap3858 4 жыл бұрын
I think prim's algorithm using edges...
@SluciferKm
@SluciferKm 5 ай бұрын
The minimum spanning tree has weight of 22 not 23
@dheerajgupta6128
@dheerajgupta6128 3 жыл бұрын
There is a mistake
@vishnumb526
@vishnumb526 2 жыл бұрын
Sooper
@sauravkumar3962
@sauravkumar3962 3 жыл бұрын
This is wrong MSP will be 22 in this case....you have to join *f* and *e*....not g and e...🙄
@ranganathmannem7011
@ranganathmannem7011 6 жыл бұрын
tq for the explanation
@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
@KTMKING1703
@KTMKING1703 Жыл бұрын
Mam 2 edges 9 , 9
@TaufiqShaikhkivines
@TaufiqShaikhkivines 4 жыл бұрын
Mst is 22
@lifechange4464
@lifechange4464 Жыл бұрын
Ma'am apne f se e lena tha apka galat h
@ashish3saxena
@ashish3saxena 5 жыл бұрын
Very helpful
@s_h_reee7041
@s_h_reee7041 2 ай бұрын
Sircute .
@bhaveshnikam5954
@bhaveshnikam5954 Жыл бұрын
WRONG ANSWER HE LASGT ME F-E SELECT KARANA THA
@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
@Explorewithrishabh8318
@Explorewithrishabh8318 4 жыл бұрын
Mam bahut complicated krdiya aapne...
@shankuntalaverma1413
@shankuntalaverma1413 Жыл бұрын
minimum spanning tree has 22 your answer is wrong
@tusharahmmed8952
@tusharahmmed8952 3 жыл бұрын
Why we don't go with b to c ? coz b to c = 4.
@manpreetbrar-km7qg
@manpreetbrar-km7qg 4 жыл бұрын
Plzz reply
@Aakash-mi8xq
@Aakash-mi8xq 4 жыл бұрын
this method is wrong guys.Please do not refer it
@sahilkulshreshtha4465
@sahilkulshreshtha4465 Жыл бұрын
Your solution is wrong, min span can be 22 and in your case it is 23
@kerwal810
@kerwal810 5 жыл бұрын
Mam ye pabg to band kr lo
@halfengineer3236
@halfengineer3236 Жыл бұрын
Wt =22 is correct and your ans is incorrect
@harrymanoharan
@harrymanoharan 5 жыл бұрын
This is wrong!
@dheerajgupta6128
@dheerajgupta6128 3 жыл бұрын
Not explained well
@poorprogrammingcm663
@poorprogrammingcm663 4 жыл бұрын
wrong answer
@ayushjaiswal7298
@ayushjaiswal7298 Жыл бұрын
wrong answer...please rewatch the video before uploading
@Christ_Love_40
@Christ_Love_40 2 жыл бұрын
Not crealry We are all learners not a lecturers
@jazeerabbas2889
@jazeerabbas2889 2 жыл бұрын
Malayali undooo
@Srikrishna9999
@Srikrishna9999 Жыл бұрын
Learn English
@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
@lakshaysethi7927
@lakshaysethi7927 3 ай бұрын
who else listened that mam mistakenly said sex 2:03
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Abdul Bari
Рет қаралды 2,7 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 8 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
Prim's Algorithm
7:18
Lalitha Natraj
Рет қаралды 558 М.
Dijkstra's Algorithm with example of undirected graph
12:31
Beena Ballal
Рет қаралды 285 М.
6.5 Prim's Algorithm for Minimum Spanning Tree | Data Structures Tutorials
10:22
Jenny's Lectures CS IT
Рет қаралды 1,1 МЛН
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,3 МЛН
L-4.9: Prim's Algorithm for Minimum Cost Spanning Tree | Prims vs Kruskal
9:55
6.4 Minimum Spanning Tree | Properties of MST | Data Structures Tutorials
15:58
Jenny's Lectures CS IT
Рет қаралды 616 М.
Prim's Algorithm Minimum Spanning Tree Graph Algorithm
19:13
Tushar Roy - Coding Made Simple
Рет қаралды 293 М.
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 8 МЛН