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

  Рет қаралды 524,085

Education 4u

Education 4u

6 жыл бұрын

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

Пікірлер: 157
@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 😊
@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 3 ай бұрын
Exactly 😊
@yogeshdharya3857
@yogeshdharya3857 4 жыл бұрын
For what reasons exactly will anyone dislike a crystal clear(in terms of explanation) video like this?
@taleemmurtaza5041
@taleemmurtaza5041 3 жыл бұрын
Amazing ma'am thoughts cleared thank you very much
@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❤
@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 6 ай бұрын
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 6 ай бұрын
​​@@sarthakchandrayan5542f is already visited na how can we revisit it
@sarthakchandrayan5542
@sarthakchandrayan5542 6 ай бұрын
@@DivakarGowdaMN if it has a lower value you can
@minakshirawat3290
@minakshirawat3290 3 ай бұрын
@@sarthakchandrayan5542 same problem my answer is 23 and my friends answer 22 ,not understand how's right same question asked in today's exam
@afnainshariff3163
@afnainshariff3163 4 ай бұрын
Thanks mam u r the best teacher of youtube
@kondurivarun
@kondurivarun 6 ай бұрын
nice explanation keep rocking and inspire many more
@n.syamala1090
@n.syamala1090 4 жыл бұрын
Ur explanation is too good mam do many more videos on data structures
@pubalidas6903
@pubalidas6903 2 жыл бұрын
F should be connected to e. As it has minimum weight
@BhagatBhutale..
@BhagatBhutale.. 4 ай бұрын
Video is Useful 👍
@devratnasawaitul8844
@devratnasawaitul8844 2 жыл бұрын
ans is wrong but got an idea how it actually work thnk u 😇
@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
@aangyamishra1008
@aangyamishra1008 3 жыл бұрын
Tq mam... For ur simply explanation... It made easy to understand this concept
@indrareddy5436
@indrareddy5436 Жыл бұрын
thats fine its ok
@kavyasharma9018
@kavyasharma9018 3 жыл бұрын
The most easy explanation
@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...
@pushkarroy9740
@pushkarroy9740 6 ай бұрын
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}
@jayab4746
@jayab4746 3 жыл бұрын
Super explanied mam tq u so much
@tulasichanga
@tulasichanga Жыл бұрын
Mam I have one doubt. How to calculate the weight
@sstelematicssstelematics2210
@sstelematicssstelematics2210 6 жыл бұрын
Ty Mam....u explained really good
@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?
@anjalidevi6483
@anjalidevi6483 5 жыл бұрын
Tnquuu mam
@srikantbaliarsingh7764
@srikantbaliarsingh7764 3 жыл бұрын
Thank you so much,,help me for the next 1hour exam
@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 4 жыл бұрын
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 👍
@itzabhishek.
@itzabhishek. 3 ай бұрын
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 ...
@daniyalhaidary3391
@daniyalhaidary3391 4 жыл бұрын
Ma'am aap jo last m (ge )edge ko milaye h. Wo kya Sahi h
@gowrijanarthanan9393
@gowrijanarthanan9393 Жыл бұрын
good explanation thank you
@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
@offline5756
@offline5756 Жыл бұрын
Thank you ❤️
@AbhishekThakur-fk7px
@AbhishekThakur-fk7px Жыл бұрын
Thank you so much mam.
@amitsingh-qn7nv
@amitsingh-qn7nv 5 жыл бұрын
good video..
@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 11 ай бұрын
Yes you are correct
@infamous_SUSIL
@infamous_SUSIL 11 ай бұрын
No she done correctly
@adijaiswal8009
@adijaiswal8009 7 ай бұрын
U r ryt
@kishorraj4751
@kishorraj4751 6 ай бұрын
22 is correct answer
@RajdeepDas-oo5gz
@RajdeepDas-oo5gz 5 ай бұрын
Yep
@yuvasriravi6987
@yuvasriravi6987 7 ай бұрын
Thank you mam 😊
@AdeshkumarAdeshraj-dy9fh
@AdeshkumarAdeshraj-dy9fh Ай бұрын
mam , in step 6 where you choose light weight is wrong because weight of (f,e) is less then weight of (g,e).
@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
@mdmuzakkir6912
@mdmuzakkir6912 5 жыл бұрын
madam plzz make vedio regarding branch and bound knapsack problem
@aikarsharay6707
@aikarsharay6707 2 жыл бұрын
Thank you
@StrangerDon
@StrangerDon 5 жыл бұрын
Thanks
@RahulRaj-vv9fs
@RahulRaj-vv9fs Жыл бұрын
aapki aawaz kitna aache hai :) >. .< 😍😍😍😍
@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
@kavyaganesh833
@kavyaganesh833 3 жыл бұрын
Mam thank you
@unboxinghonestreview619
@unboxinghonestreview619 5 жыл бұрын
What is the difference in prims algorith and krushkal algorithm
@csengineer8819
@csengineer8819 7 ай бұрын
prims algo work on vertices and krushkal algo work on edges
@arunkumararun7407
@arunkumararun7407 4 жыл бұрын
Mam is confused.but actualy answer is MST=22
@sunnyKumar-jy6ui
@sunnyKumar-jy6ui 3 ай бұрын
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
@khadizaaktereme6184
@khadizaaktereme6184 Жыл бұрын
why {f,e} can't be taken at the last step??? I think that is incorrect step to choose {g,e}.
@anmol8630
@anmol8630 2 жыл бұрын
Can we do like this in university exams
@iasanuradhagupta5463
@iasanuradhagupta5463 4 жыл бұрын
Why we don't start from c having least weight
@cst51ritishadebnath62
@cst51ritishadebnath62 25 күн бұрын
Last step is not currect. e connect with f not g , so minimum spanning tree has weight=22
@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
@Ashimiim
@Ashimiim 5 жыл бұрын
If we have loops or parallel paths?
@tarequlislam9543
@tarequlislam9543 4 жыл бұрын
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
@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
@bandiisreekanth1330
@bandiisreekanth1330 3 жыл бұрын
How u take weights as 9 8 4 like this
@bidetwacadet6525
@bidetwacadet6525 5 жыл бұрын
thx
@hyn5070
@hyn5070 2 жыл бұрын
Mam please do videos on java and python it's humble request
@shreysingh4463
@shreysingh4463 4 жыл бұрын
By krushals method it's answer is 22 but yours is 23 ?
@umarbilal6150
@umarbilal6150 5 жыл бұрын
very helpful lecture
@vishnumb526
@vishnumb526 2 жыл бұрын
Sooper
@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
@hindupriya8763
@hindupriya8763 3 жыл бұрын
How to write weights madam
@jahanahmed8308
@jahanahmed8308 3 жыл бұрын
Mam u forgot the weight 5 edge....cost is 22
@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
@Levis40
@Levis40 5 жыл бұрын
I want kruskal's algorithms for finding minimum spanning tree process please upload that video
@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
@abinayap3858
@abinayap3858 4 жыл бұрын
I think prim's algorithm using edges...
@SluciferKm
@SluciferKm 4 ай бұрын
The minimum spanning tree has weight of 22 not 23
@saitejavbss3200
@saitejavbss3200 3 жыл бұрын
u said wroung total wroung
@ranganathmannem7011
@ranganathmannem7011 5 жыл бұрын
tq for the explanation
@saurabhbisht2668
@saurabhbisht2668 5 жыл бұрын
Ans is wrong it should be 22 and ur ans in 23
@ashishpandey7344
@ashishpandey7344 5 жыл бұрын
something went wrong mam
@user-ix2ij4em9l
@user-ix2ij4em9l 5 ай бұрын
What is the crt ans. mam...,? 22 or 23
@s_h_reee7041
@s_h_reee7041 Ай бұрын
Sircute .
@sauravkumar3962
@sauravkumar3962 3 жыл бұрын
This is wrong MSP will be 22 in this case....you have to join *f* and *e*....not g and e...🙄
@azizulhakim2882
@azizulhakim2882 4 жыл бұрын
something mistake mam
@TaufiqShaikhkivines
@TaufiqShaikhkivines 4 жыл бұрын
Mst is 22
@KTMKING1703
@KTMKING1703 Жыл бұрын
Mam 2 edges 9 , 9
@ashish3saxena
@ashish3saxena 5 жыл бұрын
Very helpful
@dheerajgupta6128
@dheerajgupta6128 3 жыл бұрын
There is a mistake
@Abcdef-hq3vf
@Abcdef-hq3vf Жыл бұрын
Mam this was not the minimum spaning tree
@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
@Aakash-mi8xq
@Aakash-mi8xq 4 жыл бұрын
this method is wrong guys.Please do not refer it
@tusharahmmed8952
@tusharahmmed8952 3 жыл бұрын
Why we don't go with b to c ? coz b to c = 4.
@harrymanoharan
@harrymanoharan 5 жыл бұрын
This is wrong!
@Explorewithrishabh8318
@Explorewithrishabh8318 4 жыл бұрын
Mam bahut complicated krdiya aapne...
@manpreetbrar-km7qg
@manpreetbrar-km7qg 4 жыл бұрын
Plzz reply
@shankuntalaverma1413
@shankuntalaverma1413 Жыл бұрын
minimum spanning tree has 22 your answer is wrong
@poorprogrammingcm663
@poorprogrammingcm663 4 жыл бұрын
wrong answer
@lifechange4464
@lifechange4464 Жыл бұрын
Ma'am apne f se e lena tha apka galat h
@sahilkulshreshtha4465
@sahilkulshreshtha4465 Жыл бұрын
Your solution is wrong, min span can be 22 and in your case it is 23
@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
@kerwal810
@kerwal810 5 жыл бұрын
Mam ye pabg to band kr lo
@dheerajgupta6128
@dheerajgupta6128 3 жыл бұрын
Not explained well
@halfengineer3236
@halfengineer3236 Жыл бұрын
Wt =22 is correct and your ans is incorrect
@Christ_Love_40
@Christ_Love_40 2 жыл бұрын
Not crealry We are all learners not a lecturers
@ayushjaiswal7298
@ayushjaiswal7298 Жыл бұрын
wrong answer...please rewatch the video before uploading
@chachannel001
@chachannel001 4 жыл бұрын
MST is (4+8+2+1+2+6) = 23
@jazeerabbas2889
@jazeerabbas2889 2 жыл бұрын
Malayali undooo
@Srikrishna9999
@Srikrishna9999 Жыл бұрын
Learn English
@lakshaysethi7927
@lakshaysethi7927 2 ай бұрын
who else listened that mam mistakenly said sex 2:03
@rishikashyap07
@rishikashyap07 2 жыл бұрын
It's wrong
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Abdul Bari
Рет қаралды 2,7 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
My little bro is funny😁  @artur-boy
00:18
Andrey Grechka
Рет қаралды 12 МЛН
Prim's Algorithm
7:18
Lalitha Natraj
Рет қаралды 545 М.
Spanning Tree | Design & Algorithms | Lec-25 | Bhanu Priya
10:23
Education 4u
Рет қаралды 147 М.
Kruskal's algorithm in 2 minutes
1:49
Michael Sambol
Рет қаралды 969 М.
6.5 Prim's Algorithm for Minimum Spanning Tree | Data Structures Tutorials
10:22
Jenny's Lectures CS IT
Рет қаралды 1,1 МЛН
Dijkstra's Algorithm with example of undirected graph
12:31
Beena Ballal
Рет қаралды 277 М.
Kruskal's Algorithm
4:33
Lalitha Natraj
Рет қаралды 502 М.
Merge sort example | Design & Algorithms | Lec-16 | Bhanu Priya
6:27