Big Oh Notation (and Omega and Theta)

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

КОМЕНТАРІ • 214

  • @stephaniemoore2024
    @stephaniemoore2024 10 років тому +41

    I have been struggling for hours to teach myself the concept of Big O notation in regards to Discrete Math...everything I have read and every example I have looked at was seemingly missing the gap between the theoretical idea of this concept and the actual problems that would be assigned. You cleared everything up in less than 7 minutes and taught me exactly what to do in order to solve this type of problem. I love you! You are wonderful! Thank you, thank you, thank you.

  • @xXAlphaXx
    @xXAlphaXx 10 років тому +123

    Just wanted to point out a calculation error for his example for Big Theta. @ n = 2, 5n^2 is 20, not 80. However, 5n^2 > 4n^2 + 16n + 2 @ n = 17, so the conclusion is still the same. F(n) is still Big-Theta(n^2).

    • @justinwhite2725
      @justinwhite2725 10 років тому +9

      While I noticed that to, your comment helped me notice a shortcut. It is 1 higher than 16 (in the 16n) so when doing proofs for this kind of quadratic equation that might be a useful starting point when testing proofs.

    • @bukarorolo
      @bukarorolo 10 років тому

      ur right thanks for confirming it did not make sanse n=2 5n^2 = 20 is 80

    • @conw_y
      @conw_y 9 років тому

      xXAlphaXx Thanks for pointing that out. Threw me off for a second.

    • @thomassidebottom7923
      @thomassidebottom7923 7 років тому

      Thank you.

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

      same thing here. it is obvious that in big theta example the rate of change of left function is higher than one of right function, so predicate evaluates to false

  • @generic57680
    @generic57680 8 років тому +23

    I found this through google interview university and this was very useful in helping me understand the formal definition as well as refreshing some of my math knowledge. Thank you.

  • @irasai9219
    @irasai9219 8 років тому +3

    "Make Everything as simple as possible, but not simpler"....this video taught me what a whole chapter could not. Thanks, this was great!

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

    love the explanation, on minute marker 22:36, you have n is 2, but when you plugged into 5n^2, you did n = 4 in your calculation. giving you 50 < 80 as true, when it's actually 5 * 2^2 or 5 * 4 which leads us to 50 < 20, which is false.

  • @chrislsavage
    @chrislsavage 8 років тому +7

    Best video I've been able to find anywhere on the net. Simply put and easy to understand.

  • @mithunpaul08
    @mithunpaul08 11 років тому +86

    If it helps: Big O is like a big brother who says: whatever you do, you are never going to be better than me.
    omega is like your little brother who says, do whatever mischief you want to, but if you fall I will be there to catch you.
    theta is like your sister, who keeps switching sides, depending on what is at stake for the mischief- getting yelled at or candy.

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

      And log is like the poo in between

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

      Hi @Mitch, I used your comment in one of my posts on "Complexity analysis of an algorithm". Here: link.medium.com/PTAKZzddR5

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

      @@akshitzaveri224 nice. thanks

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

    I think this is the most valuable explanation of big O notation I've come across on UA-cam so far! Thanks a mil!

  • @GlennDaytonIV
    @GlennDaytonIV 10 років тому

    my professor makes life so much harder than what it needs to be, he wrote set notation for everything and spent all kinds of time solving proofs. you jump right into the thick of it and make more sense than he ever will! thank you so much!

  • @danielchambers6990
    @danielchambers6990 10 років тому

    Thank you so much for explaining this. So many have tried and they have failed. You Sr. are an instructor. I thank you again.

  • @cavande2
    @cavande2 11 років тому +7

    You helped me finally get a handle on Big O notation. Something my instructor and textbook failed to do.
    Thanks so much!

  • @Thirdcupful
    @Thirdcupful 10 років тому

    Best Tutorial I have watched for Big-Oh. You explain it expertly

  • @Rawoonah2cool
    @Rawoonah2cool 7 років тому

    you're the first person to explain to me why we're actually looking for a c and a n0,thank you.

  • @leelyon4321
    @leelyon4321 9 років тому

    thank you I have been struggling with asymtotic notation for a while now and this video is the first to thoroughly explain it.

  • @keeblin
    @keeblin 8 років тому +2

    Brilliantly done. I wish my algorithms lectures were this clear.

  • @howieandersen
    @howieandersen 10 років тому

    Thank you for working through the example problems, this is the tenth tutorial I've watched and the first one to be successful.

  • @IronEagleMath
    @IronEagleMath 11 років тому +2

    Great Job! I explain logs in much the same way, but yours was very concise! Don't fix the error, it helps students even more than your great explaination. It is motivating to students to look for errors, especially when made by 'the expert'. I plan errors within my lecture and give a headsup to a student who normally struggles with the material to act as a 'safety'. If noone else stops me and points out the error it is their job to 'notice' it.

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

    watching this guy struggle with 5*4 literally killed my brain

  • @joncross9264
    @joncross9264 11 років тому

    Despite a small screw up at 23 this guy has done a great job explaining it all.

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

    What I like about this guy is that he looks and sounds as if he is figuring this out as he speaks. I like that because that is how I feel as I watch the video. He is mirroring my thought process. Anyway, you have managed to explain these concepts to me where the book has completely failed by over-complicating everything. Thank you!

  • @MrElephantshell
    @MrElephantshell 8 років тому

    I'm taking an algorithms class and I'm just expected to know this with little experience with these notations. The instructor showed one example and showed the graphs and that was it. The key thing I could not understand was WHY THIS MATTERS (which my instructor didn't really explain very well) and you cleared it up. Thank you.

  • @tommosher4879
    @tommosher4879 8 років тому

    I would like to thank you so much for putting this into plain English for me. The math itself isn't hard but my rusty math mind couldn't make sense out of the formal description. I also appreciate the table you set up. It made all the information I had floating around fall into the proper place and make perfect sense. I will be back to see more of your lectures as this data structure class progresses. Thanks again.

  • @ngavu8750
    @ngavu8750 3 роки тому +1

    Briliant, thank you very much for this clear explanation. Found it through Coding Interview University, super helpful!!!!

  • @Rjsipad
    @Rjsipad 9 років тому

    Thank you for this easy, simple explanation. I was searching all over the web for something like this

  • @mnava19
    @mnava19 10 років тому

    u sir are a savior , ur lectures are much clearer then any textbook or teacher ive had. thanks!

  • @wolf5370
    @wolf5370 10 років тому

    Been trying to get my head around this all day - reading and watching everything I could find, but went around in circles (too many very complex examples and/or jumping steps and leaving me scratching my head) - this was the first to make it clear - Great explanation, thanks greatly indeed!!!

  • @djselcius
    @djselcius 9 років тому

    Thank you sir! I have a big discrete maths exam coming up at Michigan and this has been much more helpful than any of my professors.

    • @djselcius
      @djselcius 9 років тому

      Infact, I would purchase your Discrete textbook (unlike the Rosen pdf sitting on my desktop...)

    • @kellymalone7660
      @kellymalone7660 9 років тому

      ***** Rosen's book is way too expensive, and not straight-forward. I've learned how to get to solutions faster by watching MIT opencourseware and this guy

  • @threegoatpurse
    @threegoatpurse 8 років тому +15

    In the big theta example, the 5n^2 doesn't overpower the 4n^2+16n+2 until n=17.

    • @alex-marquette
      @alex-marquette 8 років тому +1

      that is correct, he did his math wrong. If it helps when finding values, you can use a graphing calculator such as the TI-84 and use it's table values to find the values.

  • @alfredcalleja450
    @alfredcalleja450 7 років тому

    You are the best lecturer Prof. Thanks.

  • @JFrameMan
    @JFrameMan 11 років тому

    Thank you so much for taking so much time and effort. It really shows and it's very helpful.

  • @Zoronoa01
    @Zoronoa01 3 роки тому +1

    at 22:30 5n^2 = 20 not 80

  • @acorn1014
    @acorn1014 7 років тому

    7:23, actually, the letter "O" we use comes directly from the Greek letter Omicron: "O".

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

    Dude, you da real MVP. I get it now...unreal.

  • @MiniMagic12
    @MiniMagic12 9 років тому

    Thank you very much for posting this. Best lecture on this topic I have seen!

  • @y031962
    @y031962 10 років тому

    I really enjoyed this video. Thanks for describing the topic very simply.

  • @jamesr2784
    @jamesr2784 9 років тому

    You are an excellent teacher.

  • @shepherdyannis697
    @shepherdyannis697 8 років тому

    The clearest explanation ever.
    Just a little confused at 46:34, "the third case", did you mean "x>y"?

  • @akshaykumar6174
    @akshaykumar6174 8 років тому +1

    thank u sir.. you save my life .. Hatts off... :) :) Thanks alot ... once again.. i m very happy that today i will learn about notations .. ... Brilliant ..

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

    Thank you! Very easy to understand and a lot more clear than my textbook and professor!

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

    Please disregard all the comments about math corrections. People make mistakes and this is honestly one of the best lectures on this topic I have watched. Great job!

  • @niteryder9974
    @niteryder9974 8 років тому +3

    Great stuff. They use this as a link in my university Algorithm class! ;)

  • @tanyagarcia2081
    @tanyagarcia2081 9 років тому

    Thank you, thank you, thank you for this simply and clear explanation!

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

    Thank you. This explanation really helped me grasp better this topic.

  • @vitusya84
    @vitusya84 11 років тому

    The explanation is brilliant!

  • @shozibulislam7546
    @shozibulislam7546 8 років тому +7

    Can you Sir please explain how 5n^2 = 80 for n=2. It should be 20. you can see it at 22:44 min

    • @marahfaron3565
      @marahfaron3565 8 років тому +1

      I noticed the same mistake. The answer has a few more steps than choosing n to be 2.

  • @jasoncessna
    @jasoncessna 9 років тому +2

    Would love to take one of your classes. Thanks for uploading this!

  • @flyladytee6618
    @flyladytee6618 8 років тому

    this is the best lesson ive had on this topic . Thank you so much !! I finally understand

  • @meenuiyyer5428
    @meenuiyyer5428 12 років тому

    thankyou for the very patient and learned teaching... really helpful!!

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

    Could you please add caption here? I'm deaf and i can't hear what you said. If you add it, it would be appreciated for our community

  • @jdutchak67
    @jdutchak67 10 років тому +12

    unless I am not understanding this correctly -- isn't 5n^2 = 20 when n = 2 and not 80 ?

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

      It is better if we are able to skip that part, to err is human...but the concept was awesome

  • @shoaibghyasi3246
    @shoaibghyasi3246 9 років тому +15

    you made a mistake in 22:20 5*2^2 =20

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

    Thank you so much for such comprehensive explanation, Great Job!

  • @MrInfoJoe
    @MrInfoJoe 10 років тому

    THANK YOU, been looking everywhere for a good explanation for this =]

  • @thiagarajansaravanan
    @thiagarajansaravanan 9 років тому +1

    This is the best lecture on this topic thanks

  • @NovaSazoku
    @NovaSazoku 12 років тому

    last minute cramming for final, thank you sir

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

    This is the video that finally did it for me, thank you so much!

  • @emmanuel3047
    @emmanuel3047 8 років тому

    Thank you so much for the clear explanation, it's really helpful... i wish you could do more on Algorithms.

  • @parvezshahid
    @parvezshahid 12 років тому

    very nice explanation. thank you a million.

  • @rayofvictory
    @rayofvictory 7 років тому

    Prof Bill Byrne! Monmouth University. Great to see you sir!

  • @DennisSmdFreefightTrainer
    @DennisSmdFreefightTrainer 8 років тому

    Thanks so much, covers all required basics of my algorithms class!

  • @MontyMontemayor
    @MontyMontemayor 11 років тому +10

    23:00, For Theta, c=5, n=17 for that statement to be true. n=2 was wrong.

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

    This was perfect! Thank you professor and shout out to Russell Tepper.

  • @altairr35
    @altairr35 11 років тому +1

    at 23:00 the n0 must be>= 17 :) thanks for this great lecture!

  • @MichaelDroz
    @MichaelDroz 11 років тому

    Great explanation for us autodidacts out there! I am taking an algorithm class at Stanford and was stuck on Big Oh notation. This should be added as optional material for the class. The video seems to abruptly end which leads me to think that there is a continuation video...true?

  • @arnity123
    @arnity123 8 років тому

    Extremely helpful video! The textbook I am using just over complicates everything.

  • @DatPhatThe
    @DatPhatThe 9 років тому

    thank you for clear explaination. I fail this first course "data structure/algorithm" in college cuz i have problem understand the book and the professor that year. Thanks again.

  • @richardcfelix
    @richardcfelix 9 років тому

    Thank you so much!!!! You made this very easy to understand and explained it very well

  • @AbdelrahmanAshour-e5x
    @AbdelrahmanAshour-e5x 8 місяців тому

    sit, you are amazing teacher

  • @user-tattk
    @user-tattk 4 місяці тому

    12:18 i couldnt make sence why f(n) => Omega(n^3) answer is no. cause 4 < Cn? plz teech me...

  • @merolaagi1
    @merolaagi1 11 років тому

    How did you come up with n to the power 4 when the equation is quadratic? I think f(n) less than O(g(n)) when g(n) = n ~2 for all n greater than 0 and some constant c,

  • @GurpreetSingh-rd5dl
    @GurpreetSingh-rd5dl 9 років тому

    Awesome Tutorial Very Helpful

  • @azzi4894
    @azzi4894 8 років тому +1

    For the theta example : n_0 = 17

  • @prakasharumugam7816
    @prakasharumugam7816 9 років тому

    I cannot thank you enough for this video :-) Very clear explanation

  • @RayWalker-pythonic
    @RayWalker-pythonic 12 років тому

    Awesome! That helped me so much. Thank you.

  • @EpicViolinGuy
    @EpicViolinGuy 11 років тому

    Thank you so much for making this video! This helped me a lot

  • @Parulkhanna
    @Parulkhanna 10 років тому

    Thats a really clean tutorial..

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

    which is the time complexity of the following sequence? and why?
    int n, i, j, k, s=0;
    cin>>n;
    for(i=1; i

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

    Great content, thanks for this!

  • @justinwhite2725
    @justinwhite2725 10 років тому

    You said that 3logx(n) is the same as logx(n)^3 (at 46:22). I'm pretty sure that's not true. Here's an example where that's not true;
    log10(100) = 2.
    3*2=6
    2^3 = 9
    Is there something I'm missing when you said that you can turn the constant in front of a log into it's exponent, or is the exponent supposed to go somewhere else?
    Maybe you meant 3logx(n) = logx(n^3). I think that would be true.
    3log10(100) = 6
    log10(100^3) = log10 (1000000) = 6
    Okay, so that's what you meant, you just didn't explain it well and wrote it wrong :D

    • @JohnBrockman
      @JohnBrockman 10 років тому +1

      Log (n^3) = 3 log n
      Log (1000) = log (10^3) = 3 log 10 = 3
      If he put the "^3" elsewhere, then it may be saying something different. But it's usually what I'm referring to here.

    • @justinwhite2725
      @justinwhite2725 10 років тому

      at the indicated point he had Log(n)^3, not Log(n^3). He erased the 3 from before the log and put it in an exponent after the bracket.
      In my post, I realised that and showed that Log(n^3) is probably what he meant - and I don't think it changes his proof, it's just written incorrectly.

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

    I feel like Recursive loop are the best example of everything he told here.

  • @sloanbell9673
    @sloanbell9673 7 років тому

    Awesome explanation!

  • @DanyloYoutubylo
    @DanyloYoutubylo 8 років тому +3

    omg finally I've got that - thx a lot!!!

  • @suriyaravichandran3439
    @suriyaravichandran3439 9 років тому

    Couldn't understand anything during my lecture class but now I am like " Wow it's not that difficult !" .. Thanks alot for the video .. Great one though

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

    This is awesome! Thank you!

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

    Best explanation ever, thanks!

  • @bjg4320
    @bjg4320 8 років тому

    much better than my professor, thx

  • @YoungUnited
    @YoungUnited 8 років тому +1

    Thank you! You did what my prof couldnt! :)

  • @NinjaNorbe
    @NinjaNorbe 10 років тому +1

    You're awesome man

  • @Hurricoaster
    @Hurricoaster 10 років тому

    Extremely helpful. Thank you

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

    Nailed it! Thank you for the insight, I just started learning computer science or software development, I am sure with this foundation, I will make it even if I am already an old punk🤣😎

  • @kaushikraghupathrunitechie
    @kaushikraghupathrunitechie 7 років тому

    Nice Explanation. Helped me !

  • @srinidhiii
    @srinidhiii 8 років тому

    best explanation ever

  • @daoudatraore930
    @daoudatraore930 8 років тому

    thank you very nuch for this lecture, it helped me a lot to understand many things, now things make sense for me :)

  • @sirazulislamsiraz7631
    @sirazulislamsiraz7631 9 років тому

    oh! very nice explanation. Thank's a lot.

  • @dankeczeasy2748
    @dankeczeasy2748 8 років тому

    Thank you for saving me 10 hours

  • @kiranbandal
    @kiranbandal 11 років тому

    Very helpful video. Thanks a lot.

  • @reBreaded
    @reBreaded 9 років тому

    You made this perfectly clear, thank you so much!

  • @jwang8475
    @jwang8475 8 років тому

    excuse me. What is the difference if we define n>=n0 instead of n>n0? Is the big O notation still correct? Thank you

  • @saumil2810
    @saumil2810 9 років тому

    Great video. Thank you.

  • @EricMata93
    @EricMata93 7 років тому

    Awesome video!