4.6.2 [New] Optimal Binary Search Tree Successful and Unsuccessful Probability - Dynamic Programming

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • Optimal Binary Search Tree using Successful and Unsuccessful Search Probabilities​
    PATREON : www.patreon.co...
    Courses on Udemy
    ================
    Java Programming
    www.udemy.com/...
    Data Structures using C and C++
    www.udemy.com/...
    C++ Programming
    www.udemy.com/...

Комментарии • 280

  • @abdullahbabor4876
    @abdullahbabor4876 4 года назад +297

    I would encourage everyone to try out his Udemy courses. I am not getting paid for saying this, and I am just one of his students from the University of Michigan. May Allah bless The great Abdul Bari Sir.

  • @needimanh
    @needimanh 3 года назад +62

    For students in a hurry learn the formulas and start the video from 34:40

  • @lakshmiprathyushaveturi4980
    @lakshmiprathyushaveturi4980 3 года назад +50

    I am really fortunate to have a teacher like u sir for understanding such difficult topics just in few minutes each. I have also bought core Java course in Udemy platform only because of his way of teaching that reaches every student . Even I am thankful to u sir as u r responding to my doubts very quickly in Udemy . Thanks alot sir ....

  • @rohitdubey6104
    @rohitdubey6104 4 года назад +214

    Sir you can spend all your life from the blessings and appreciations of the fellow students around the world.

  • @poojapooh2322
    @poojapooh2322 5 лет назад +58

    Sir .Thank u very much for all videos on DAA....V all gave the best in our exams just because of ur videos....the way u thought is just perfect and very effective to us sir...Once again thank you very much sir..
    Looking further for many videos ....

  • @markmerante8342
    @markmerante8342 5 месяцев назад +28

    May you please fix the video and audio delay? It's very distracting and I can't really understand since it's not in sync.

    • @sameedstien6118
      @sameedstien6118 3 месяца назад

      My video works fine though

    • @Voltage765
      @Voltage765 3 месяца назад

      True, it really distracts a lot

  • @alijawad2498
    @alijawad2498 4 года назад +12

    Thanks sir. I had two questions
    1. c[0,0] should equal to w[0,0] because of the formula "c[i,j] = w[i,j] + mini

  • @AkshayrajKore
    @AkshayrajKore 4 года назад +19

    Once you have the recurrence relation (recursion formula), constructing the table is relatively straightforward. I'd like to find out - how did you come up with the recurrence relation (recursion formula) in the first place ? I don't think you went over that part in the video.

    • @yuvantbesre1297
      @yuvantbesre1297 4 года назад +3

      There are videos available covering the topic of recurrence relations. Check his algorithm playlists...

  • @satya8411
    @satya8411 4 года назад +2

    I just open ur video first like it and start listening , I know I will obviously like it . Who on earth are not impressed with ur videos!?? ❤️❤️❤️❤️

  • @tanishkashinde9383
    @tanishkashinde9383 Год назад +1

    Sir taught me this concept within an hour when I was struggling to understand this since 3 days. Hats off to you sir

  • @sane7263
    @sane7263 2 года назад +7

    This videos are awesome ❤
    Question: w[i][j] = w[I][j-1]+Pj+Qj
    So, w[1][1] = w[1][0] + 3 + 3 = N/a + 3 + 3 = 6
    but you go with w[1][1] = 3. Why?

    • @thealchemist1480
      @thealchemist1480 2 года назад +1

      I am also wondering this

    • @akhilaggarwal8846
      @akhilaggarwal8846 Год назад

      If you got to know answer please let us also know in the comment.

    • @thuglife8201
      @thuglife8201 Год назад

      36:20

    • @danielnguyen2624
      @danielnguyen2624 Год назад

      yeah after all the prasing, he got me confused now, I hate myself cause i don't understand what he said

    • @divyam69
      @divyam69 Год назад +1

      he wrote W00 as q value, as the formula is Wij = Wi,j-1 + pj + qj and pj which is p0 in this case is not defined as p starts from 1 not 0

  • @vishaladithya9703
    @vishaladithya9703 2 года назад +2

    Words aren't enough to appreciate your way of teaching , you're just beyond of all PHD lecturer's who owned that degree just for name sake, but not teaching skills like you. I'm glad that, i've found my best teacher in engineering.

  • @keshav-ip7vx
    @keshav-ip7vx 4 года назад +8

    Sir, why did you stop uploading videos, all your videos inspire me to learn more 🥺🥺🥺🥺🥺

  • @nitheshmasam9859
    @nitheshmasam9859 2 года назад

    Sir I have exam in the afternoon ,you made my preparation sir .Bodacious way of teaching sir.

  • @pritomdasradheshyam2154
    @pritomdasradheshyam2154 4 года назад +2

    Your explanations are so good sir, my master's Univ teachers can't even teach to your simplicity and fun way.

  • @shchen16
    @shchen16 8 месяцев назад

    c[i, i] should be equal to w[i, i], since each failure nodes still comes with cost.
    Other than that, this video is great at demonstrating the procedure of finding the OBST. Thanks for this video!

  • @rapunzel_tangled
    @rapunzel_tangled 3 года назад +2

    Thank you so much to your channel🙏🙏🙏Your are helping students a lot in learning this subject. I'm really feeling thankful to you & your videos. That has helped me a lot in getting good Mark's in my semester result. I really felt so doubtfull before watching your videos because in my college they didn't explained this shortcut methods. After watching your videos I got confidence to write my exam & got good grade in that. Thank you so much🙏🙏🙏 I definitely suggest each & every student to use this platform👏👏

  • @tarunsingh2571
    @tarunsingh2571 5 лет назад +3

    Sir please continue on your java series plz sir , you're seriously the best teacher . Keep up the good work

  • @ajmalkhaniit
    @ajmalkhaniit 5 лет назад +1

    Assalamu Alaikum Sir there is no one like you in teaching field

  • @swagtech4895
    @swagtech4895 2 года назад +2

    Great explanation sir! Hands off to your teaching skills and also thankful to you for this valuable content. Helped me to understand every critical concept just within minutes.
    👌🙏

  • @thanga2317
    @thanga2317 5 лет назад +2

    Thanks a lot for starting DP series, sir. One of the best RUclipsrs

  • @arunitbaidya6118
    @arunitbaidya6118 4 года назад +1

    Thank you for making video including unsuccessful probability as well

  • @AmitBiswas-hd3js
    @AmitBiswas-hd3js 4 года назад

    This is the Best Explanation available on this topic on internet so far.... thank you sir

  • @jeremiahthomas7594
    @jeremiahthomas7594 3 года назад +1

    Love to shop stock illustration! Great analogy, sir!

  • @Thepankaz1
    @Thepankaz1 5 лет назад +5

    isn't null check also a comparison for square nodes.

  • @PCCOERCoder
    @PCCOERCoder 4 месяца назад +1

    Best Video on obst. I loved it.

  • @thealchemist1480
    @thealchemist1480 2 года назад +4

    Sir one question: W is the summation of P and Q values. But while calculating w00,w11,w22... you considered only Q values, Why so?

    • @jswlprtk
      @jswlprtk Год назад +2

      Because j-i == 0 so there are no nodes in the tree so any search will always be unsuccessful. Seriously implicit big brain move

    • @sussygirlboss
      @sussygirlboss 11 месяцев назад

      @@jswlprtk THANK YOU!!!

  • @itsmeuniverse7
    @itsmeuniverse7 2 года назад +1

    at 38:00 the x axis are the i values, not the j values as you've written. I think it was a mistake?

  • @motema_mpembe
    @motema_mpembe Год назад +1

    Thank You, Sir! This has been extremely helpful and very clear!

  • @vandananayak7314
    @vandananayak7314 5 лет назад +1

    U do soo well sir
    Please upload as many algorithm as u can..and some other video aslo..thank you so much

  • @shivamvashisth9740
    @shivamvashisth9740 4 года назад

    SIR YOU ARE A TRUE DIAMOND, YOU WERE BORN TO TEACH. 💎

  • @appsdeveloper4024
    @appsdeveloper4024 3 года назад

    May Allah blesses The great Abdul Bari Sir.

  • @pranavnyavanandi9710
    @pranavnyavanandi9710 2 года назад +1

    The formula was not explained properly, how did we arrive at the formula for c[i, j]? I only understood till c[0, n]. Someone please clarify this. And what does c[2, 4] even mean? c[0, n] means cost of a binary tree with n nodes given. c[2, 4], what does that mean?

    • @Suvam1508
      @Suvam1508 2 года назад

      cost means the amount of comparison you need to do minimise the operations from one key to another

  • @sohelferdous2599
    @sohelferdous2599 5 лет назад +2

    Return of legend....😊

  • @rajvardhan4615
    @rajvardhan4615 Год назад +1

    34:38 this is for what all you guys came here for!

  • @MuraliKrishna-ut7ir
    @MuraliKrishna-ut7ir Год назад

    W[i,j]=qi+ { pi+1 to pj & qi+1 to qj}. May be wrong in the example so that it will add up pj while w00,w11,w33,w44 too.. kindly check once.

  • @grekhacreation4876
    @grekhacreation4876 3 года назад +2

    Bahot sundar

  • @Sanmayce
    @Sanmayce 5 лет назад +1

    Thanks for the sharing.
    Isn't the B-tree order 3 (2 keys, 3 leaves) better in all scenarios?

  • @kumarakash5219
    @kumarakash5219 3 года назад +1

    Sir my college teacher teaches from your videos only

  • @roarwithconfidence9930
    @roarwithconfidence9930 2 года назад

    Best teacher! Keep up the good work sir..

  • @HarpreetKaur-nh5el
    @HarpreetKaur-nh5el 2 года назад

    Felt really lucky to bump into these courses, so very well explained and the way you relate computer science to maths is outstanding. God bless you sir for enlightening us all and thank you for all the efforts you took to create this for us

  • @AstroDeeptej
    @AstroDeeptej Год назад

    [SUGGESTION] the video is nice, but if there are chapters in the video then it makes it easy for learners at different levels to jump right to the section they want to

  • @harshadapatil9543
    @harshadapatil9543 5 лет назад

    Thank you sir for all videos on DAA

  • @yuvrajbansal6294
    @yuvrajbansal6294 4 года назад

    Now this is called an proper explanation

  • @jasminpurani3479
    @jasminpurani3479 5 лет назад +1

    Sir can you please explain graph matching and edmond's blossom algorithm to compute augmenting path! please .......

  • @born_for_drama
    @born_for_drama 5 лет назад +3

    Congratulations for 100k Subscribers Sir 😍😍

  • @jannatulfirdousi2714
    @jannatulfirdousi2714 3 года назад

    Sir can you make udemy videos for OS DBMS COA also.. Your explanation is all what I want to learn from.

  • @divyajami5458
    @divyajami5458 3 года назад +1

    Thank you for this well explained video :D

  • @abijitha8226
    @abijitha8226 3 года назад

    Explanation was very good, thank you sir

    • @pranavnyavanandi9710
      @pranavnyavanandi9710 2 года назад

      But did you understand the formula? What does c[i, j] represent?

  • @jerenicofs
    @jerenicofs 10 месяцев назад

    you're the real mvp sir.

  • @TOI-700
    @TOI-700 3 года назад

    Why sir is not uploading videos nowadays ?,where can I see latest videos,you were my the only teacher, please upload 🙏

  • @YH-cd7xh
    @YH-cd7xh 4 года назад +4

    The previous videos are really clear, but since the binary search tree, I do not understand what is C[i,j], what is w[i,j], totally confused what happened...

  • @shubhamtiwari2595
    @shubhamtiwari2595 4 года назад +1

    Sir what should do when k is having 2 values in last

  • @aureate_ir
    @aureate_ir Год назад

    Thank you. You saved my life.

  • @gunjansingh8919
    @gunjansingh8919 4 года назад +2

    Amazing! Thank you!

  • @pushpalathabandaru8108
    @pushpalathabandaru8108 4 года назад

    Thank u sir you give the best for the students

  • @ojjasvijain8773
    @ojjasvijain8773 4 года назад

    Amazing explanation sir..... Thank you very much...........

  • @GADEAKSHITHA
    @GADEAKSHITHA 10 месяцев назад

    you are the best best best best best teacherrr sir❤

  • @arjungarg7656
    @arjungarg7656 Год назад +1

    w(11) should be equals to p(1)+q(1)=6

  • @SRNR_PODCAST.
    @SRNR_PODCAST. 3 года назад +1

    a goldmine in youtube

  • @nirbhaykumarnachiketa4891
    @nirbhaykumarnachiketa4891 3 года назад

    sir I have one doubt, In the video you derived the formula for total cost in binary search tree .... but it is different from what is written in cormen. Wouldn't it be (depth(di) + 1)*qi ?

  • @kavithan1535
    @kavithan1535 3 года назад

    Sir do post some sample questions at the end for us to solve

  • @anjaligupta8562
    @anjaligupta8562 4 года назад +3

    Sir, While finding value of C[ 0,0 ] , C[ 1,1 ]..... that time first term is not applicable because of value of K but W[i,j] we have to add which is not equal to zero. So why you are not considering that term? I got doubt here. Please reply sir.

  • @GurpreetKaur-vr2wo
    @GurpreetKaur-vr2wo Год назад +1

    How probably p, q is calulated?

  • @dolikumari9159
    @dolikumari9159 3 месяца назад

    Great Explanation...

  • @vikrambabariya5166
    @vikrambabariya5166 2 года назад

    Great Explanation, sir.

  • @littlemisterlong7292
    @littlemisterlong7292 Год назад

    so do you have to find the successful search/unsuccessful search or its given?

  • @joelnada3483
    @joelnada3483 3 года назад +1

    Thank you very much sir

  • @gss7176
    @gss7176 5 лет назад

    Sir please do more videos on algorithms we need more

  • @ragipindi.dhanalakshmi9643
    @ragipindi.dhanalakshmi9643 3 года назад +1

    How to take pi and qi values

  • @danielnguyen2624
    @danielnguyen2624 Год назад

    This starts to give me confusion now. why W[1,1]= q1, but not p1. Is that for the probabilitty of finding the first node?. Someone helps please

  • @shifaibrahim847
    @shifaibrahim847 2 года назад

    bestie i love you actually

  • @parakhchaudhary7453
    @parakhchaudhary7453 10 месяцев назад

    Great explanation.

  • @ibs4669
    @ibs4669 5 лет назад

    thanks sir, u r very good teacher 💕

  • @anandbaskaran
    @anandbaskaran 2 года назад

    I am a bit lost because, I am not clear how the formula is derived (same situation in the previous videos too)

  • @TracyTang-c9o
    @TracyTang-c9o 9 дней назад

    is it me or that this specific video has lags between vidoe and voice?

  • @nitishkumarsingh458
    @nitishkumarsingh458 3 года назад

    The logic of new videos is red t shirt imp concept

  • @karanrandhir9865
    @karanrandhir9865 4 года назад

    i am not able to understan why w is being added in the formula at 28:40

  • @nooreldali7432
    @nooreldali7432 3 года назад

    May Allah bless you. Thank you so much you are amazing

  • @_computerra
    @_computerra 9 месяцев назад

    Thanks! You're the best!

  • @codewithhanoak
    @codewithhanoak 4 года назад

    Good explanation!

  • @muhammadusmanbutt3341
    @muhammadusmanbutt3341 3 года назад

    Asalamolicum sir, sir the cost of c[0,0] - c[4,4] can't be zero cauz we have already there unsuccessful probabilities so instead of "0" we will put unsuccessful probabilities
    Thanks it gets your attention.

  • @tech-hack-game
    @tech-hack-game Год назад

    Lengthy lecture but interesting topic

  • @kale-lb5pr
    @kale-lb5pr 7 месяцев назад

    thank u sir u helped me a lot!!!!!!!!!!!!!!!!!!!!!!

  • @QuantumStatic
    @QuantumStatic 3 года назад

    When you are calculating weights at 36:50, for W[i, j] where j - i = 0 and i >= 1 why haven't you added p1 and q1 and only considered q1. I am asking because you said the formula was pj + qj and you aren't considering pj.

    • @pranavnyavanandi9710
      @pranavnyavanandi9710 2 года назад

      Can you tell me why the formula is the way it is? What is the reasoning for it?

  • @aleem.akhtar
    @aleem.akhtar 4 года назад

    Sir, when we are calculating C[i,j] for i=j, why you took it as 0 instead of w[i,j]. I know there wont be any "K" to get minimum of C but shouldn't w[i,j] be left as final value?
    Am i missing something?

    • @aleem.akhtar
      @aleem.akhtar 4 года назад +1

      @@abdul_bari Thanks Sir, I got your point. But as per Cormen et al., Introduction to Algorithms (3rd ed.), section 15.4 on optimal binary search trees, expected search cost for C[i,j] at i=j is equal to "Qi" not 0. If we apply this technique, final cost is increased to 40. So which is correct? 40 or 32?
      Apologies in advance, if i misunderstood. I just started learning Dynamic Programming.

  • @EyadOfficialy
    @EyadOfficialy 3 года назад

    YOU ARE THE BEST

  • @siddhu8558
    @siddhu8558 3 года назад

    Example problem starts at 34:39

  • @oztv_
    @oztv_ 8 месяцев назад

    i love this man

  • @soniasmelodiousland
    @soniasmelodiousland 5 лет назад

    great videos,,thanks sir

  • @amittodakar1850
    @amittodakar1850 3 года назад

    Use the function on obst to compute w(ij) r(ij) and c(ij),0

    • @pranavnyavanandi9710
      @pranavnyavanandi9710 2 года назад

      What is count, float, int, while? Why are they given as keys to the nodes? I thought keys were supposed to be integers.

  • @whistle_missile2
    @whistle_missile2 Год назад

    your a legend thx

  • @mohammedrizin3015
    @mohammedrizin3015 4 года назад

    can you say how could we find such problem

  • @rajeshdonepudi1
    @rajeshdonepudi1 5 лет назад

    Precious videos

  • @abcdefhhi3886
    @abcdefhhi3886 2 года назад

    May Allah be with u mashallah!

  • @emrandavid4851
    @emrandavid4851 2 года назад

    Please mr why don't u post other tutorial ??

  • @SanketPatil
    @SanketPatil 5 лет назад

    Thank u very much

  • @RohitJadhav-rv3zj
    @RohitJadhav-rv3zj 4 года назад

    Very useful 🙏🇮🇳

  • @manishsahoo9491
    @manishsahoo9491 4 года назад

    the true legend

  • @Khushi-ud7ci
    @Khushi-ud7ci Год назад

    sir its not double u, its doublu W