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

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024
  • Minimum Spanning tree(MST) : Prim's algorithm clear explanation with example

ความคิดเห็น • 164

  • @hemanthprabhu8134
    @hemanthprabhu8134 ปีที่แล้ว +19

    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 ปีที่แล้ว +30

    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.

  • @afnainshariff45
    @afnainshariff45 7 หลายเดือนก่อน +1

    Thanks mam u r the best teacher of youtube

    • @mithun7392
      @mithun7392 2 หลายเดือนก่อน

      Ya❤

  • @VishalAnandTM
    @VishalAnandTM 5 ปีที่แล้ว +80

    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 ปีที่แล้ว +2

      Yes , you are right

    • @Odim65
      @Odim65 5 ปีที่แล้ว +1

      yaa you are right

    • @sandipsarkar5261
      @sandipsarkar5261 5 ปีที่แล้ว +8

      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 ปีที่แล้ว +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 👍

  • @sstelematicssstelematics2210
    @sstelematicssstelematics2210 6 ปีที่แล้ว +5

    Ty Mam....u explained really good

  • @yuvasriravi6987
    @yuvasriravi6987 10 หลายเดือนก่อน

    Thank you mam 😊

  • @amitsingh-qn7nv
    @amitsingh-qn7nv 5 ปีที่แล้ว +1

    good video..

  • @mdmuzakkir6912
    @mdmuzakkir6912 5 ปีที่แล้ว +1

    madam plzz make vedio regarding branch and bound knapsack problem

  • @anmol8630
    @anmol8630 2 ปีที่แล้ว +1

    Can we do like this in university exams

  • @khadizaaktereme6184
    @khadizaaktereme6184 2 ปีที่แล้ว

    why {f,e} can't be taken at the last step???
    I think that is incorrect step to choose {g,e}.

  • @Aakash-mi8xq
    @Aakash-mi8xq 4 ปีที่แล้ว +1

    this method is wrong guys.Please do not refer it

  • @umarbilal6150
    @umarbilal6150 5 ปีที่แล้ว +1

    very helpful lecture

  • @Ashimiim
    @Ashimiim 5 ปีที่แล้ว +1

    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

  • @dheerajgupta6128
    @dheerajgupta6128 3 ปีที่แล้ว +1

    There is a mistake

  • @Abcdef-hq3vf
    @Abcdef-hq3vf 2 ปีที่แล้ว

    Mam this was not the minimum spaning tree

  • @abinayap3858
    @abinayap3858 4 ปีที่แล้ว

    I think prim's algorithm using edges...

  • @ranganathmannem7011
    @ranganathmannem7011 6 ปีที่แล้ว

    tq for the explanation

  • @poorprogrammingcm663
    @poorprogrammingcm663 4 ปีที่แล้ว +1

    wrong answer

  • @halfengineer3236
    @halfengineer3236 ปีที่แล้ว

    Wt =22 is correct and your ans is incorrect

  • @jazeerabbas2889
    @jazeerabbas2889 2 ปีที่แล้ว +1

    Malayali undooo

  • @chachannel001
    @chachannel001 4 ปีที่แล้ว +1

    MST is (4+8+2+1+2+6) = 23

  • @abhishekgupta4532
    @abhishekgupta4532 3 ปีที่แล้ว

    chal teri

  • @miw879
    @miw879 5 ปีที่แล้ว +1

    aray camera to sahi se rakhna seekho na

  • @pubalidas6903
    @pubalidas6903 2 ปีที่แล้ว +12

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

  • @muhammadaamir566
    @muhammadaamir566 3 ปีที่แล้ว +5

    Mam.....the last connection would be between (f,e),not between (g,e).
    Then the answer will be 22 not 23

  • @ishowertudu7405
    @ishowertudu7405 5 ปีที่แล้ว +12

    Mam.....the last connection would be between (f,e),not between (g,e).
    Then the answer will be 22

  • @sumitkumarmishra6483
    @sumitkumarmishra6483 6 ปีที่แล้ว +24

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

  • @devratnasawaitul8844
    @devratnasawaitul8844 3 ปีที่แล้ว +4

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

  • @bhaveshnikam5954
    @bhaveshnikam5954 2 ปีที่แล้ว +1

    WRONG ANSWER HE LASGT ME F-E SELECT KARANA THA

  • @sauravkumar3962
    @sauravkumar3962 3 ปีที่แล้ว +1

    This is wrong MSP will be 22 in this case....you have to join *f* and *e*....not g and e...🙄

  • @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

  • @arunkumararun7407
    @arunkumararun7407 4 ปีที่แล้ว +3

    Mam is confused.but actualy answer is MST=22

  • @cst51ritishadebnath62
    @cst51ritishadebnath62 3 หลายเดือนก่อน

    Last step is not currect. e connect with f not g , so minimum spanning tree has weight=22

  • @dheerajgupta6128
    @dheerajgupta6128 3 ปีที่แล้ว +1

    Not explained well

  • @itzabhishek.
    @itzabhishek. 6 หลายเดือนก่อน +1

    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 ...

  • @sattivideos8136
    @sattivideos8136 ปีที่แล้ว +53

    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

  • @saitejavbss3200
    @saitejavbss3200 4 ปีที่แล้ว +1

    u said wroung total wroung

  • @tulasichanga
    @tulasichanga ปีที่แล้ว +2

    Mam I have one doubt.
    How to calculate the weight

  • @Abdulsamad-1
    @Abdulsamad-1 3 ปีที่แล้ว +4

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

  • @rohanprak
    @rohanprak 5 ปีที่แล้ว +1

    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

  • @kondurivarun
    @kondurivarun 9 หลายเดือนก่อน +3

    nice explanation keep rocking and inspire
    many more

  • @SluciferKm
    @SluciferKm 7 หลายเดือนก่อน

    The minimum spanning tree has weight of 22 not 23

  • @pushkarkumar7173
    @pushkarkumar7173 5 ปีที่แล้ว +7

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

    • @VardanSharma
      @VardanSharma 4 ปีที่แล้ว +1

      Yes you're correct I wonder how can she post it without even checking.

    • @sabarinathem4146
      @sabarinathem4146 4 ปีที่แล้ว

      correct answer

  • @pushkarroy9740
    @pushkarroy9740 9 หลายเดือนก่อน +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}

  • @lakshaysethi7927
    @lakshaysethi7927 5 หลายเดือนก่อน

    who else listened that mam mistakenly said sex 2:03

  • @prathyusha252
    @prathyusha252 5 ปีที่แล้ว +18

    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 หลายเดือนก่อน +1

      @@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

  • @BhagatBhutale..
    @BhagatBhutale.. 7 หลายเดือนก่อน +3

    Video is Useful 👍

  • @20cs012Neelambal.k
    @20cs012Neelambal.k 7 หลายเดือนก่อน

    What is the crt ans. mam...,? 22 or 23

  • @saurabhbisht2668
    @saurabhbisht2668 5 ปีที่แล้ว +2

    Ans is wrong it should be 22 and ur ans in 23

  • @worldexcitingthings9309
    @worldexcitingthings9309 5 ปีที่แล้ว +3

    I think you teach us kruskal algorithms not prim's algorithms plz refer book

  • @harrymanoharan
    @harrymanoharan 5 ปีที่แล้ว +2

    This is wrong!

  • @manpreetbrar-km7qg
    @manpreetbrar-km7qg 4 ปีที่แล้ว +2

    Mam jo weight hotta hai vertices ka vo kaise v likh sakte hai jaise a to b 4 diya apne ex. Me

  • @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

  • @lifechange4464
    @lifechange4464 ปีที่แล้ว

    Ma'am apne f se e lena tha apka galat h

  • @suberrath8787
    @suberrath8787 2 ปีที่แล้ว

    Is she drunk ???

  • @sushantraj3830
    @sushantraj3830 ปีที่แล้ว

    Galat padhati hoo -22 hoga ans

  • @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).

  • @rishikashyap07
    @rishikashyap07 2 ปีที่แล้ว

    It's wrong

  • @s_h_reee7041
    @s_h_reee7041 4 หลายเดือนก่อน

    Sircute .

  • @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 💓☺️☺️

  • @ayushjaiswal7298
    @ayushjaiswal7298 ปีที่แล้ว

    wrong answer...please rewatch the video before uploading

  • @sahilkulshreshtha4465
    @sahilkulshreshtha4465 ปีที่แล้ว

    Your solution is wrong, min span can be 22 and in your case it is 23

  • @unboxinghonestreview619
    @unboxinghonestreview619 5 ปีที่แล้ว +2

    What is the difference in prims algorith and krushkal algorithm

    • @csengineer8819
      @csengineer8819 10 หลายเดือนก่อน +1

      prims algo work on vertices and krushkal algo work on edges

  • @brownfeminine
    @brownfeminine 2 ปีที่แล้ว +1

    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❤

  • @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

  • @daniyalhaidary3391
    @daniyalhaidary3391 4 ปีที่แล้ว +1

    Ma'am aap jo last m (ge )edge ko milaye h. Wo kya Sahi h

  • @taleemmurtaza5041
    @taleemmurtaza5041 3 ปีที่แล้ว +3

    Amazing ma'am thoughts cleared thank you very much

  • @TaufiqShaikhkivines
    @TaufiqShaikhkivines 5 ปีที่แล้ว +1

    Mst is 22

  • @anjalidevi6483
    @anjalidevi6483 6 ปีที่แล้ว +2

    Tnquuu mam

  • @shaikthofik2619
    @shaikthofik2619 ปีที่แล้ว

    you have to show full paper the video is not correct

  • @shankuntalaverma1413
    @shankuntalaverma1413 ปีที่แล้ว

    minimum spanning tree has 22 your answer is wrong

  • @shreysingh4463
    @shreysingh4463 4 ปีที่แล้ว

    By krushals method it's answer is 22 but yours is 23 ?

  • @azizulhakim2882
    @azizulhakim2882 5 ปีที่แล้ว +1

    something mistake mam

  • @n.syamala1090
    @n.syamala1090 4 ปีที่แล้ว +2

    Ur explanation is too good mam do many more videos on data structures

  • @Christ_Love_40
    @Christ_Love_40 3 ปีที่แล้ว

    Not crealry
    We are all learners not a lecturers

  • @anuradhagupta5463
    @anuradhagupta5463 4 ปีที่แล้ว

    Why we don't start from c having least weight

  • @hindupriya8763
    @hindupriya8763 3 ปีที่แล้ว

    How to write weights madam

  • @jahanahmed8308
    @jahanahmed8308 3 ปีที่แล้ว

    Mam u forgot the weight 5 edge....cost is 22

  • @kerwal810
    @kerwal810 5 ปีที่แล้ว +1

    Mam ye pabg to band kr lo

  • @humanAbsu
    @humanAbsu 2 ปีที่แล้ว

    wrong answer bhai logo

  • @hyn5070
    @hyn5070 2 ปีที่แล้ว

    Mam please do videos on java and python it's humble request

  • @bandiisreekanth1330
    @bandiisreekanth1330 3 ปีที่แล้ว

    How u take weights as 9 8 4 like this

  • @Explorewithrishabh8318
    @Explorewithrishabh8318 4 ปีที่แล้ว

    Mam bahut complicated krdiya aapne...

  • @manpreetbrar-km7qg
    @manpreetbrar-km7qg 4 ปีที่แล้ว

    Plzz reply

  • @AbhishekThakur-fk7px
    @AbhishekThakur-fk7px ปีที่แล้ว

    Thank you so much mam.

  • @KTMKING1703
    @KTMKING1703 ปีที่แล้ว

    Mam 2 edges 9 , 9

  • @gowrijanarthanan9393
    @gowrijanarthanan9393 ปีที่แล้ว

    good explanation thank you

  • @kavyaganesh833
    @kavyaganesh833 3 ปีที่แล้ว

    Mam thank you

  • @srikantbaliarsingh7764
    @srikantbaliarsingh7764 3 ปีที่แล้ว

    Thank you so much,,help me for the next 1hour exam

  • @jayab4746
    @jayab4746 3 ปีที่แล้ว

    Super explanied mam tq u so much

  • @aikarsharay6707
    @aikarsharay6707 2 ปีที่แล้ว

    Thank you

  • @yogeshdharya3857
    @yogeshdharya3857 4 ปีที่แล้ว +5

    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 ❤️

  • @vishnumb526
    @vishnumb526 2 ปีที่แล้ว

    Sooper

  • @RahulRaj-vv9fs
    @RahulRaj-vv9fs ปีที่แล้ว

    aapki aawaz kitna aache hai :) >. .< 😍😍😍😍

  • @Pastozafaire
    @Pastozafaire 5 ปีที่แล้ว +6

    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 ปีที่แล้ว +2

      G is a visited vertex so connect e

  • @ashishpandey7344
    @ashishpandey7344 5 ปีที่แล้ว

    something went wrong mam

  • @vinaykumar-pt1br
    @vinaykumar-pt1br 2 ปีที่แล้ว

    what if we have a parallel edge in the graph should we remove it

  • @kavyasharma9018
    @kavyasharma9018 3 ปีที่แล้ว

    The most easy explanation

  • @bidetwacadet6525
    @bidetwacadet6525 5 ปีที่แล้ว

    thx