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

Поділитися
Вставка
  • Опубліковано 27 січ 2025

КОМЕНТАРІ • 174

  • @003kazimehrabrashid4
    @003kazimehrabrashid4 4 роки тому +31

    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.

  • @hemanthprabhu8134
    @hemanthprabhu8134 Рік тому +22

    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 😊

  • @prathyusha252
    @prathyusha252 5 років тому +19

    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 Рік тому +1

      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 Рік тому

      ​​@@sarthakchandrayan5542f is already visited na how can we revisit it

    • @sarthakchandrayan5542
      @sarthakchandrayan5542 Рік тому +2

      @@DivakarGowdaMN if it has a lower value you can

    • @rawat3290
      @rawat3290 10 місяців тому

      @@sarthakchandrayan5542 same problem my answer is 23 and my friends answer 22 ,not understand how's right same question asked in today's exam

  • @afnainshariff45
    @afnainshariff45 11 місяців тому +1

    Thanks mam u r the best teacher of youtube

  • @sattivideos8136
    @sattivideos8136 2 роки тому +60

    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

  • @BhagatBhutale..
    @BhagatBhutale.. 11 місяців тому +3

    Video is Useful 👍

  • @VishalAnandTM
    @VishalAnandTM 6 років тому +82

    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 6 років тому +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 👍

  • @pubalidas6903
    @pubalidas6903 2 роки тому +12

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

  • @mithun7392
    @mithun7392 6 місяців тому

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

  • @kondurivarun
    @kondurivarun Рік тому +3

    nice explanation keep rocking and inspire
    many more

  • @kavyasharma9018
    @kavyasharma9018 4 роки тому +1

    The most easy explanation

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

  • @itzabhishek.
    @itzabhishek. 10 місяців тому +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 ...

  • @ishowertudu7405
    @ishowertudu7405 5 років тому +12

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

  • @devratnasawaitul8844
    @devratnasawaitul8844 3 роки тому +4

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

  • @sumitkumarmishra6483
    @sumitkumarmishra6483 6 років тому +25

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

  • @Abdulsamad-1
    @Abdulsamad-1 3 роки тому +4

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

  • @tulasichanga
    @tulasichanga Рік тому +2

    Mam I have one doubt.
    How to calculate the weight

  • @pushkarkumar7173
    @pushkarkumar7173 6 років тому +7

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

    • @VardanSharma
      @VardanSharma 5 років тому +1

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

    • @sabarinathem4146
      @sabarinathem4146 4 роки тому

      correct answer

  • @muhammadaamir566
    @muhammadaamir566 4 роки тому +5

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

  • @yogeshdharya3857
    @yogeshdharya3857 5 років тому +5

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

    • @mithun7392
      @mithun7392 6 місяців тому

      If ur interested watch this video or do not open this video

    • @yogeshdharya3857
      @yogeshdharya3857 6 місяців тому

      ​@@mithun7392u understand English ? I doubt that 😆🤦🤦

  • @sachilandrew7514
    @sachilandrew7514 5 років тому +1

    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)

    • @solkarrifah842
      @solkarrifah842 4 роки тому

      No that's wrong.... That means f is visited but e is not visited so I can join f and e.... F is already visited and c is already visited so I can't join both...

  • @taleemmurtaza5041
    @taleemmurtaza5041 3 роки тому +3

    Amazing ma'am thoughts cleared thank you very much

  • @n.syamala1090
    @n.syamala1090 4 роки тому +2

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

  • @AdeshkumarAdeshraj-dy9fh
    @AdeshkumarAdeshraj-dy9fh 8 місяців тому

    mam , in step 6 where you choose light weight is wrong because weight of (f,e) is less then weight of (g,e).

  • @MYNAMEISTHUNDER-n2u
    @MYNAMEISTHUNDER-n2u 2 місяці тому

    in 12:07 the f node should be connnected with e

  • @aangyamishra1008
    @aangyamishra1008 3 роки тому

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

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

    • @Nothing_mama
      @Nothing_mama 5 років тому +2

      G is a visited vertex so connect e

  • @arunkumararun7407
    @arunkumararun7407 4 роки тому +3

    Mam is confused.but actualy answer is MST=22

  • @manpreetbrar-km7qg
    @manpreetbrar-km7qg 5 років тому +2

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

  • @cst51ritishadebnath62
    @cst51ritishadebnath62 7 місяців тому

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

  • @VIVRKKRGUPTA
    @VIVRKKRGUPTA 6 місяців тому

    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

  • @sunnyKumar-jy6ui
    @sunnyKumar-jy6ui 10 місяців тому

    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 2 роки тому

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

  • @sunithaparimi786
    @sunithaparimi786 6 років тому +2

    Mam ur videos are really good understanding easily ur explanation step by step pls put a video for kmaps

    • @akshatkumar1062
      @akshatkumar1062 6 років тому

      I can help u with k maps in the easiest way of solving them

  • @sstelematicssstelematics2210
    @sstelematicssstelematics2210 6 років тому +5

    Ty Mam....u explained really good

  • @anmol8630
    @anmol8630 2 роки тому +1

    Can we do like this in university exams

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

  • @daniyalhaidary3391
    @daniyalhaidary3391 4 роки тому +1

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

  • @harikamyadari353
    @harikamyadari353 2 місяці тому

    How to take weights from this algorithms mam

  • @sauravkumar3962
    @sauravkumar3962 4 роки тому +1

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

  • @anuradhagupta5463
    @anuradhagupta5463 5 років тому

    Why we don't start from c having least weight

  • @jayab4746
    @jayab4746 4 роки тому

    Super explanied mam tq u so much

  • @RahulRaj-vv9fs
    @RahulRaj-vv9fs Рік тому

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

  • @shreysingh4463
    @shreysingh4463 5 років тому

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

  • @bandiisreekanth1330
    @bandiisreekanth1330 3 роки тому

    How u take weights as 9 8 4 like this

  • @Ashimiim
    @Ashimiim 6 років тому +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

  • @jahanahmed8308
    @jahanahmed8308 3 роки тому

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

  • @reddygayathri031
    @reddygayathri031 5 років тому +1

    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

  • @divyanshmalviya2612
    @divyanshmalviya2612 2 місяці тому

    Solution is wrong
    Connect f to e instead of g to e it will make cost 22 without violating any rule

  • @hindupriya8763
    @hindupriya8763 4 роки тому

    How to write weights madam

  • @yuvasriravi6987
    @yuvasriravi6987 Рік тому

    Thank you mam 😊

  • @saurabhbisht2668
    @saurabhbisht2668 6 років тому +2

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

  • @saitejavbss3200
    @saitejavbss3200 4 роки тому +1

    u said wroung total wroung

  • @vinaykumar-pt1br
    @vinaykumar-pt1br 3 роки тому

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

  • @SluciferKm
    @SluciferKm 11 місяців тому

    The minimum spanning tree has weight of 22 not 23

  • @srikantbaliarsingh7764
    @srikantbaliarsingh7764 3 роки тому

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

  • @gowrijanarthanan9393
    @gowrijanarthanan9393 2 роки тому

    good explanation thank you

  • @unboxinghonestreview619
    @unboxinghonestreview619 6 років тому +2

    What is the difference in prims algorith and krushkal algorithm

    • @csengineer8819
      @csengineer8819 Рік тому +1

      prims algo work on vertices and krushkal algo work on edges

  • @amitsingh-qn7nv
    @amitsingh-qn7nv 5 років тому +1

    good video..

  • @offline5756
    @offline5756 2 роки тому

    Thank you ❤️

  • @20cs012Neelambal.k
    @20cs012Neelambal.k 11 місяців тому

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

  • @Abcdef-hq3vf
    @Abcdef-hq3vf 2 роки тому

    Mam this was not the minimum spaning tree

  • @shivarajh2167
    @shivarajh2167 5 років тому +1

    U made it easy..
    Thanks mam

    • @rohanprak
      @rohanprak 5 років тому

      its wron bro , dont follow , MST cost is 22 whereas she calculated as 23

  • @AbhishekThakur-fk7px
    @AbhishekThakur-fk7px Рік тому

    Thank you so much mam.

  • @mdmuzakkir6912
    @mdmuzakkir6912 6 років тому +1

    madam plzz make vedio regarding branch and bound knapsack problem

  • @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 5 років тому +1

    this method is wrong guys.Please do not refer it

  • @anjalidevi6483
    @anjalidevi6483 6 років тому +2

    Tnquuu mam

  • @sahilkulshreshtha4465
    @sahilkulshreshtha4465 2 роки тому

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

  • @worldexcitingthings9309
    @worldexcitingthings9309 6 років тому +3

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

  • @dheerajgupta6128
    @dheerajgupta6128 4 роки тому +1

    There is a mistake

  • @shankuntalaverma1413
    @shankuntalaverma1413 2 роки тому

    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.

  • @aikarsharay6707
    @aikarsharay6707 3 роки тому

    Thank you

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

  • @kavyaganesh833
    @kavyaganesh833 4 роки тому

    Mam thank you

  • @azizulhakim2882
    @azizulhakim2882 5 років тому +1

    something mistake mam

  • @ashishpandey7344
    @ashishpandey7344 5 років тому

    something went wrong mam

  • @hyn5070
    @hyn5070 2 роки тому

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

  • @bhaveshnikam5954
    @bhaveshnikam5954 2 роки тому +1

    WRONG ANSWER HE LASGT ME F-E SELECT KARANA THA

  • @vishnumb526
    @vishnumb526 2 роки тому

    Sooper

  • @Levis40
    @Levis40 6 років тому +1

    I want kruskal's algorithms for finding minimum spanning tree process please upload that video

  • @lifechange4464
    @lifechange4464 Рік тому

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

  • @KTMKING1703
    @KTMKING1703 2 роки тому

    Mam 2 edges 9 , 9

  • @abinayap3858
    @abinayap3858 4 роки тому

    I think prim's algorithm using edges...

  • @umarbilal6150
    @umarbilal6150 6 років тому +1

    very helpful lecture

  • @dinesh-c1m6h
    @dinesh-c1m6h 2 місяці тому +1

    ❌Wrong answer

  • @shaikthofik2619
    @shaikthofik2619 2 роки тому

    you have to show full paper the video is not correct

  • @Christ_Love_40
    @Christ_Love_40 3 роки тому

    Not crealry
    We are all learners not a lecturers

  • @halfengineer3236
    @halfengineer3236 2 роки тому

    Wt =22 is correct and your ans is incorrect

  • @TaufiqShaikhkivines
    @TaufiqShaikhkivines 5 років тому +1

    Mst is 22

  • @StrangerDon
    @StrangerDon 6 років тому

    Thanks

  • @ashish3saxena
    @ashish3saxena 6 років тому

    Very helpful

  • @dheerajgupta6128
    @dheerajgupta6128 4 роки тому +1

    Not explained well

  • @ayushjaiswal7298
    @ayushjaiswal7298 Рік тому

    wrong answer...please rewatch the video before uploading

  • @harrymanoharan
    @harrymanoharan 5 років тому +2

    This is wrong!

  • @lakshaysethi7927
    @lakshaysethi7927 9 місяців тому

    who else listened that mam mistakenly said sex 2:03

  • @s_h_reee7041
    @s_h_reee7041 8 місяців тому

    Sircute .

  • @bidetwacadet6525
    @bidetwacadet6525 6 років тому

    thx