Solved Recurrence - Iterative Substitution (Plug-and-chug) Method

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2016
  • This is an example of the Iterative Substitution Method for solving recurrences. Also known sometimes as backward substitution method or the iterative method.
    An example of solving the same recurrence using the Tree method can be found here: • Solved Recurrence Tree...
    Note that there is another method of solving recurrences that is unfortunately called the substitution method by the CLRS Algorithms Book that many R1 instructors use to teach algorithms. This other method is not a little bit like the iterative substitution method used here. It is more accurately called the "guess-and-check" method, since you make a guess about what the runtime is and then prove it by induction.
    In a quick survey of the Algorithms textbooks near at hand, CLRS and Klienberg & Tardos call the "guess-and-check" method "substitution" while the books by Neapolitan and by Levin, call what I did the substitution method. Leafing through Rosen it appears to only show the substitution method, but it doesn't name it. Epp's book calls this method the iterated method and does not teach the other method.
    The bottom line is that in mathematics it is often the case that a single name is used to refer to multiple things and sometimes a single thing may have multiple names. Even in the same subfield. It's important to remember this and that it's not the name that matters.

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

  • @Bonzo632
    @Bonzo632 5 หลายเดือนก่อน +25

    You are the hero in the night. The dancing of the flowers in the wind. The moonlight dipping into the sand. Thank you John. On all my next exams, I will write “This one’s for John.” before all recurrence relations.

  • @Shefetoful
    @Shefetoful 5 ปีที่แล้ว +291

    Learned more in 10 minutes, than in the 2 lectures covering this, thanks.

    • @thetomatoes7075
      @thetomatoes7075 4 ปีที่แล้ว +8

      They did 2 lectures to cover just this ??

    • @charulatha.p2782
      @charulatha.p2782 3 ปีที่แล้ว

      Exactly 😂

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

      Literally same here, only had 2 lectures

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

      True LOL. Glad I found this treasure.

    • @allissahertz1769
      @allissahertz1769 9 หลายเดือนก่อน

      I came here to say exactly this. Two full lectures covering this and I still was confused, and this one video and I finally get it.

  • @alanbiju1765
    @alanbiju1765 ปีที่แล้ว +33

    It's been 6 years and this still remains one of the best videos on this topic.

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

    I learned something in 9 minutes that I couldn't learn in 3 hours while in class. Thank god people like you exist!

  • @gerritgerritsen2113
    @gerritgerritsen2113 7 ปีที่แล้ว +84

    This was really helpful. For some reason the most intuitive substitution method video I've seen. Thanks a ton.

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

      Thanks! Glad you got something out of it.

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

    In case you were wondering, this is still super helpful to people (at least, me!) 7 years later. Thanks.

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

    Out of all the videos I have watched trying to help me solve recurrences, yours has been the most helpful one and has finally helped me figure out what everything means. Thank you for explaining every step and where you got everything. Thank you so so much.

  • @hydrophobicwalrus749
    @hydrophobicwalrus749 4 ปีที่แล้ว +11

    Much more straightforward than my professor makes it out to be.

  • @CaptainJellyBS
    @CaptainJellyBS 7 ปีที่แล้ว +78

    Can I just have you as my algorithms professor?

    • @johnbowers5447
      @johnbowers5447  7 ปีที่แล้ว +37

      Yes, you can! Come to James Madison University =D, we've got lots of great CS Profs!

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

    I was absent my algo class of recursive algorithm / solving recurrence, and your video helped me from suffering the pain of solving recurrence problems, perfectly. Thank you for you detailed explanation and step to step tutorial.

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

    The best video I've ever seen about solving recurrences. Thank you.

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

    I know you uploaded this seven years ago but from all the different videos on explaining this method, you're the one that did it in a clear way that I can actually understand. Thank you.

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

    What my teacher could not explain in 8 hours, you did under 10 min. Thank you so much

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

    You're a savior, This is so clear and concise, wish my professor had explained it like this. Thank you!

  • @MorganAriel
    @MorganAriel 7 ปีที่แล้ว +37

    This is probably the BEST recurrence relation video I've seen, thank you so much!

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

    I have watched many videos about this topic but your explanation is outstanding

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

    I'm so glad I found your videos before my quiz tomorrow. Thank you !

  • @mundapakistani
    @mundapakistani 6 ปีที่แล้ว +1

    How I was struggling with this concept but you made it so simple. I Salute you Sire.

  • @bh_umbc
    @bh_umbc 7 ปีที่แล้ว +1

    Very well done. Going through the 3rd step was a good call as well. Basically, the other videos on this topic are a bit too theoretical or obscure. This iterative way of performing the method is much easier to follow. Thank you!

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

    Dude, you are awesome. Thank you so much for how you explain each step.

  • @kedarnadkarny4718
    @kedarnadkarny4718 7 ปีที่แล้ว +1

    Very clear. Good job John!

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

    You are amazing ! I was stuck more than 3 days ! now got it . thank you

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

    Best explanation on TH-cam, you just saved my day, Sir.

  • @TheChug00
    @TheChug00 6 ปีที่แล้ว +1

    Best video. Super clear explanation! Great job

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

    This video was great and was the one that helped it all finally click for me. It was essential that this example had an n outside of the T(n/2) so I could see how that was handled. Now I'm struggling to solve a recurrence that is divided into different sized sub-problems (ie: T(n)=T(n/2)+T(n/4)+T(n/8)+n, where T(1)=1) using substitution and am wishing I had another video of yours as reference.

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

    You teach better than the Algo teacher at ETH. Great job!

  • @FarazKhan-xd4bd
    @FarazKhan-xd4bd 7 ปีที่แล้ว

    Thankyou man. Best explanation till now i've seen.

  • @moisascholar
    @moisascholar 6 ปีที่แล้ว +1

    Great explanation and algorithm to go about solving these pesky recurrence relations! Many thanks.

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

    Very well done. Thank you John!

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

    ohh my gawddd this video ........i was searching for a video that broke this process down and finally i got it thank you good sir

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

    This has got to be one of the best explanations. The only step that's missing which is beyond the scope of this video is the induction proof at the end to show that T(n) = O(n log n) for all n>1.

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

    thanks a lot brother for this amazing 9 minutes tutorial

  • @ashwanivarshney9406
    @ashwanivarshney9406 7 ปีที่แล้ว +1

    It is really helpful
    Thanks john
    I have exam day after tomorrow but I even don't know the methods of solving recurrence it is really helpful ,simple to understand and remember

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

    Omg the first explanation ive understood thank you so much!

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

    Thanks to you I have learned what I need to learn, finally.

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

    I was looking for this solution for hours in the other sites. You have the best (and the most detailed) style of explanation. I really don't know how can I thank you. Shared with friends. And THANKS A LOT!!

  • @gunaygultekin
    @gunaygultekin 7 ปีที่แล้ว +1

    perfect explanation, clear to understand

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

    Thank you for the helpful video! I appreciate the step by step process especially since math isn't the strongest subject I have. Thank you sir!

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

    That was elegant and very clear. Thanks

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

    This video was very helpful. Thank you

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

    This so much better our teacher makes us guess big o then from there we work through to find the asymptomatic notation

  • @tahamagdy4932
    @tahamagdy4932 7 ปีที่แล้ว

    Best 9 mins of Substituting

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

    Thank you very much, you are great at explaining

  • @darshilshah3941
    @darshilshah3941 7 ปีที่แล้ว

    Great work man, keep it up. THanks a ton!!

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

    very well done. This is what youtube is all about for me.

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

    Excellent.. it's the best one in recursion videos

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

    this video is a gem!

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

    With this video, solving recurrence by substitution is tick. Thanks for the video although its like more that 5 years since the upload, it is still helpful.

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

    So simply, fluid and clear. John Bowers for president!

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

    you just saved my life, thank you

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

    BEST VIDEO HANDS DOWN. Subbed!

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

    First comment of my 10 years on youtube. Thank god for your existence.

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

    thank you , you saved my life

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

    Thank you, helped me a lot!

  • @user-mo1gh2kg9q
    @user-mo1gh2kg9q 5 ปีที่แล้ว +1

    This helped me big time for preparing the mid term. Thanks!

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

      same , I have my midterm next week

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

    7 years later... thank you!!!

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

    Seriously helpful - thank you so much!

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

    great explanation ! thanks a lot

  • @adolfocarrillo248
    @adolfocarrillo248 8 หลายเดือนก่อน

    Thanks for sharing your knowledge, I got it.🎉

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

    Great video! Saved me on my final!

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

    you, my friend, are a SAINT thank you

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

    this was very helpful, thanks

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

    Thanks a lot ! Very simple and useful !!

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

    best example so far!

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

    Thank you for this video , it helped me to solve recurrence relations

  • @deveshsingh1479
    @deveshsingh1479 8 หลายเดือนก่อน

    beautifully done

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

    Extraordinary....Thank u Sir..Love from India
    #WeIndiaWeWin

  • @daminatownes124
    @daminatownes124 7 ปีที่แล้ว

    Thanks this was really helpful!

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

    good explanation. made this method very clear.thankyou

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

    Thank you so much, it helps me a lot! ^^

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

    Great walk through thank you

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

    omg thanks for this explanation!!

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

    Loved it. Thanks

  • @clovisgu57
    @clovisgu57 6 ปีที่แล้ว +1

    crystal clear! thank you!

  • @rahulkher8207
    @rahulkher8207 4 ปีที่แล้ว +40

    I'll be honest, I was NOT expecting the O(n log n) bomb at the end.

    • @Amy-tw3zh
      @Amy-tw3zh 4 ปีที่แล้ว +1

      Just use limits to verify. Limit as n goes to infinity for (4n+4nlog_2 n) / (n log_2 n) , which = 4 , which means it is O(n log_2 n indeed)

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

      @@Amy-tw3zh Hi, can you further clarify how you can relate 4 to O(n*log_2(n))? I understood everything up until 4n+4n*log_2(n).

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

      @@Twannnn01 You need to compare all the joints of the expression asymptotically. It's a little hard to explain, if you don't know what it means already. But basically, it means what @Mandey just said: To compare the values, when n is infinitely high. Take a look at the graph on this page to see if you can get the picture: www.bigocheatsheet.com/

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

      That O(n log n) thing is sneaky. Can't turn your back for a second or it'll get you.

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

    Insane video🙏🏻

  • @krishnarathod6389
    @krishnarathod6389 7 ปีที่แล้ว

    Thank you..It is helpful...keep uploading

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

    Thank You so much this is really helpful

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

    This was helpful please upload more examples to solved recurance...

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

    You are the real MVP

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

    Thank you very for making it so easy for me.

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

    Very good practical example compared to the bad slideshow video lecture version offered at my university.

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

    Awesome Bestest Video on Sbstitution Method

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

    very very helpful!

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

    The most intuitive way I think this one is.

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

    Thank you for this video !!!

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

    yep, this is the best vid on repeated sub hands down

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

    You are the best, ever

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

    Thank you sir that was really helpful

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

    thnx . this is the best video for recurrence

  • @Azanali-kq5uy
    @Azanali-kq5uy 7 ปีที่แล้ว +1

    Really I understand very well

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

    you are the best. thank you very much for the amazing video

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

    Thanks a lot mate !

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

    Thank you so much

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

    good job man excellent

  • @aditric
    @aditric 21 วันที่ผ่านมา +1

    You're awesome!

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

    THANKS.......its helps me a lot

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

    Thank You!

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

    thanks a lot brother

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

    wow explanation is GOOD AF