MIT 6.006 Introduction to Algorithms, Fall 2011 View the complete course: ocw.mit.edu/6-006F11 Instructor: Victor Costan License: Creative Commons BY-NC-SA More information at ocw.mit.edu/terms More courses at ocw.mit.edu
Пікірлер: 151
@insightful20743 жыл бұрын
I swear, he is the coolest TA I've ever seen in my life!
@GoogleUser-ee8ro5 жыл бұрын
I just love those recitation sessions (not just for this course, almost all EECS courses have them). They fill in more concrete examples and/or mathematical details to the original lecture. Well done MIT.
@arketos10 ай бұрын
i can't agree more. Sometimes I can't learn in the lectures but i can always learn in the recitations. Because it's gives you solid interaction, not observation
@TheRealSaintNickNorthside4 жыл бұрын
Crazy to think that I was flipping pizzas at Little Caesars and taking college algebra in fall 2011, and here I am learning about algorithm complexity 9 years later when this was recorded way back then. Life takes us on a weird journey.
@6lack5ushi2 жыл бұрын
bruh idk what I was doing in 2021 but definitely not enjoying a video on asymptotic complexity at 4am on a Sunday morning.... wonder where we end up.
@lolapalloza1832 жыл бұрын
Why were you flipping a pizza dude?
@sibsaurabh4 жыл бұрын
This recitation class is very helpful and is a necessary supplement to lecture for in-depth understanding. Thanks Victor
@waynechang12062 жыл бұрын
thank you MIT for sharing all sessions for free. Learned a lot from it.
@bkboggy8 жыл бұрын
Great TA. Thanks for the presentation.
@dve8454 жыл бұрын
@25:00 A much simpler solution is the fact that (n n/2) is picking half the elements out of N elements ... so 2^N must be an upper bound to that, hence O(log(2^n)) = O(nlog(2)) = O(n)
@artificiyal10 ай бұрын
How? Can you explain a bit more?
@user-bb1ew6kj7h25 күн бұрын
When it comes to (n n-2), 2^N is an upper bound for sure, but there is a tighter upper bound. I don't think this way is great enough in all (n i) case.
@crypticamalgam96959 жыл бұрын
These MIT videos are great, but I hate it when someone in class asks or answers a question and it's inaudible in the closed caption
@gauravmufc13 жыл бұрын
The TA in mit is much more educated and versed in the subject than the head of department in my college.
@blo0mfilter8682 жыл бұрын
same bro
@benwade647 Жыл бұрын
Same😓
@MajedDalain4 жыл бұрын
so good, It helped to understand the omega, theta and O. thank u so much
@dylancutler19786 жыл бұрын
Victor is a good educator
@veramentegina4 жыл бұрын
thank you MIT!! excellence in everything!
@scottzeta30672 жыл бұрын
When he is asking everyone whether following I really want to anwser I am. This lesson really has magic can let me keep attention on it, compare with my university.
@garychan48455 жыл бұрын
at 53:30, TA said M in the original equation will be replaced by lg(m) if 1-D peak is used instead. But I think not only that M is changed, the M in the recurrence (i.e. the M in T(N/2,M)) and the base case are also changed to lg(M) as well. Am I correct?
@briscoelang24366 жыл бұрын
Good explanations from the future phd
@user-qs8ct8ws5u Жыл бұрын
super helpful recitation. It solve me many confusions from the class
@manaspeshwe82975 жыл бұрын
He says good question in a sarcastic way LOL.
@roylee31968 жыл бұрын
is there a channel for us to improve the subtitles? I've noticed a couple of mistakes, for example at 39:32 , its supposed be T(n/2^i) instead of T(n/2^n).
@mitocw8 жыл бұрын
+Roy lee You can send an email with subtitle correction(s) via the Contact Us form at ocw.mit.edu/jsp/feedback.jsp?Referer=. Depending on how much you want to do, the subtitle files (.srt) are available on our site at ocw.mit.edu/6-006F11. We welcome corrections to them. :)
@nalinitamilmani Жыл бұрын
Excellent....Awesome...You really explained well...Kudos to you guy.
@justinbieber96565 жыл бұрын
Istg he is pretty good for a TA. Grab a tub of popcorn and it is pretty fun to watch over weekends. :')
@free-palestine0003 жыл бұрын
victor is OUR ta now
@samratroy123411 жыл бұрын
"No answer means yes..." reminds me of my profs ...
this guy explains better than my professors at uni, wow
@susguy44697 жыл бұрын
Can the Big Theta of a function have the same upper bound and lower bound(same constant factor)? For example: the function n^2 = Big-Theta(n^2) could mean n^2
@ramiyer68106 жыл бұрын
I guess you could but that wont be useful because it represents a very specific case of g(n) = theta(g(n)). This is true but whats the point of the asymptotic notation if it is not making your life simpler.
@xiaoweidu46673 жыл бұрын
very good quality recitation !
@ajai.a23746 жыл бұрын
Thank you!
@brngylni2 жыл бұрын
This is really perfect.
@DivinityStripes10 жыл бұрын
At the end did they say the algorithm using the variation would be faster? I swear it would be incorrect and wouldn't be able to return a peak.
@erichlf6 жыл бұрын
DivinityStripes he said that we would look at complexity forest because of it isn't faster then who cares if it works or not. If out works then we will check if it is correct.
@stevenzhao66475 жыл бұрын
Yeah, I agree - the algorithm will not guarantee that the result would be a 2D peak. The TA should have clarified that it is efficient but incorrect.
@funyunonion377322 жыл бұрын
This dude is hilarious, I would be dieing in this class
@florentynastone36738 жыл бұрын
Thanks, great (and very cute :D) TA!
@stefantoljic50138 жыл бұрын
Beautiful! :D
@boluaygepong59203 жыл бұрын
@26:40 "Factorials grow exponentially". Hmmm, I wonder what the answer is?
@ShubhamSinghYoutube2 жыл бұрын
His name was Victor sin, but he changed it to costan.
@mond24406 жыл бұрын
i dont get it when the sub array becomes 1 element its more like the worst case of that algorithm instead of theta
@spacesuitred38396 жыл бұрын
victor THE CHALKBREAKER :) 7:35 30:41
@lilyyeh86075 ай бұрын
thank you
@Draven13343 жыл бұрын
SIMPLY THANK YOU
@vedchoudhary95193 жыл бұрын
31:15 How did it become Theta(n) ? Yeah, it has an upper bound of order n, O(n), but what about lower bound?🤷🏻♂️
@mahmoudihocine2837 Жыл бұрын
Can any one explain how the simplification work in the log ? how were ln 5 in the base and power of 100 thrown away? @22:13
@punstress10 жыл бұрын
Is the algorithm being applied correctly, or described correctly, or am I not getting it? Start in middle, look at neighbors, if local peak halt, else recurse T(n/2), is what he wrote. Recurse T(n/2) means to me, start in the middle of one of the halves, and I guess it doesn't matter which one, and check its neighbors, if local peak halt, else recurse by starting in the middle, n/4. What I'm seeing him do follows that up to the recurse T(n/2). He doesn't start in the middle of one of the halves, he starts at the beginning, i.e., the larger neighbor of n/2. It makes more sense to do it that way but it's not the way he wrote out the algorithm, is it?
@jeanjean67393 жыл бұрын
I know it's quick but I love you
@edenender Жыл бұрын
What is the practical aplication for all this discussion ?
@samanthabrady649811 жыл бұрын
This kid is adorable.
@purleedef3 жыл бұрын
How come he can get rid of the base at 23:31? I thought he did it at 22:11 because when n gets larger, log(ln(5)) is just a trivial number that doesn't have much impact on the result. But at 23:11 it affects the calculation itself before we make that assumption about the scalability Couldnt you do the same strategy as the earlier problem without getting rid of it? I end up with: log(100 log(n)) / log(ln(5))
@ananyakumar2 жыл бұрын
It's not about whether it has an impact or not, log(ln(5)) is a constant value that does not affect the upper or lower bounds. Hence, we can eliminate it from our final solution. What you've suspect to be the reason log(ln(5)) was dropped in the first example is actually true for any function that contains n. For example, look at 31:09 - we reject log(n)/2 because it exponentially smaller than 2^n. In this case, the reasoning that log(n)/2 is just a trivial number that doesn't have much impact on the result as n increases is correct. Hope this helps!
@markwilliamsphl3 жыл бұрын
How many hours does MIT EECS meet their students in these recitation sessions per week? Is it always 1 hour lecture, 1 hour recitation? Do they have a lab session in this class?
@mitocw3 жыл бұрын
Lectures: 2 sessions / week, 1 hour / session Recitations: 2 sessions / week, 1 hour / session See ocw.mit.edu/6-006F11 for more info. Best wishes on your studies!
@ikram31052 жыл бұрын
28:34 *how does the root in denominator cancels out when the exponential is only N ???*
@puravhs362 жыл бұрын
The denominator gets squared(and the square(^2) removed from the previous step)
@spartacusche4 жыл бұрын
minute 36, why did he uses theta in the analysis of the peak find instead of Big-O
@julian922 жыл бұрын
Because in some cases O is the same as Theta
@malharjadhav84043 жыл бұрын
@2:29 6006 was intentional
@ashutoshtiwari43984 жыл бұрын
the problem of log( ( n n/2 ) ) would be much simpler if you wouldn't use approximation formula. Just open the factorials and check the highest power of n.
@victoriajiang8923 жыл бұрын
the log() won't go away if you just simplify what's in the parenthesis
@tarunkushwaha39226 жыл бұрын
he is cool at words. :D
@ayyashC9 жыл бұрын
Can someone please explain the 21:48 reduction ? why did the exponent got simplified ?
@roylee31968 жыл бұрын
+Ahmad Ayyash (Ash) it's because in log-arithmetics, log(n^2) = 2 log(n), you can bring down that exponential as a multiply, and since its a constant, hence it's non-significant and neglect-able.
@ministryoftruth5966 жыл бұрын
Yes, but what happens when you have log(n)^2?
@zeronothinghere93343 жыл бұрын
@@ministryoftruth596 That is the same as log(n) log (n) so you can add them to log(n*n) = log(n^2) = 2 log(n)
@victoriajiang8923 жыл бұрын
@@zeronothinghere9334 why is log(n)*log(n) equivalent to log(n^2)?
@zeronothinghere93343 жыл бұрын
@@victoriajiang892 Was my mistake.
@Ankit92969 жыл бұрын
what if no. of array is even how can we decide middle
@Aziz-wl1xf5 жыл бұрын
You round the quotient.
@NovaMenteMedia10 жыл бұрын
I'm sorry at 24:56 why N is over N / 2 isn't (N ^ N)/2 ?
@AbhimanyuAryan10 жыл бұрын
don't wry he solved it wrong way
@GianLucaDegani9 жыл бұрын
no, because it's a binomial coefficent
@arpitagarwal0166 жыл бұрын
Why did he multiplied O(M) in the end? how did that come?
@horriblefate5 жыл бұрын
Find maximum element in just one column = M The (maximum) number of column that you need to check = log N Total = for the (log N) number of columns, you check all M elements on each column = M * log N
@wazaabazaa4 жыл бұрын
rows*columns where M was the columns
@damyant_jain Жыл бұрын
Can someone please explain the difference between (log n)^100 and log (100)^n. This was during 22:10.
i see i am not the only one who purchased every shirt from the pure pwnage web shop. Hello my brother
@odgiiv14 жыл бұрын
Why does exponent goes out at 22:11
@ikram31052 жыл бұрын
it was a constant. Would have come before log and then not considered because *a constant.*
@shasankaborah27008 жыл бұрын
actually i don't exactly understand what is complexity in algorithms and how to find them?
@Quisl7 жыл бұрын
Its the number of steps (for example CPU cycles or time spent calculating) that are required to run and finish an algorithm.
@MehulKumar_m3huL6 жыл бұрын
Dominant portion of function which depends on input size. Everything else is moh maya ;-}
@kaliabsurde62158 жыл бұрын
hi. thank you for this courses. what is the difference between lectures and recitation lectures?
@heaven1010108 жыл бұрын
Hi, you can ask google the exact same question and get a very nice and clear answer from MIT (1st link).
@unev7 жыл бұрын
Recitation is a complement to lecture. Whereas lectures are filled with far too many students and far too much material to have ample opportunity for individualized engagement and specific questions, recitation holds smaller numbers of students and is aimed to address anything covered during lecture or individualized studying that is unclear. Recitation is a safe space in which asking questions for cla
@gauravdjgm4 жыл бұрын
I am surprised that the person who transcribed this lecture could not make out that Victor is saying Srini, who happens to be the course professor, but instead transcribes as [INAUDIBLE].
@mitocw4 жыл бұрын
These captions were generated by a third party. They did not know who the instructor was, when they did these.
@gauravdjgm4 жыл бұрын
@@mitocw Oh
@muratzhankyranbay64275 жыл бұрын
sweet
@mohamedtarek88994 жыл бұрын
I am still not convinced as to how recursing on the side with the larger number guarantees us the solution.
@serhatuyanmis14934 жыл бұрын
I suggest you to go look for calculus 1 and if you have time go for calculus 2. There are some expression that you can find the answer of the question.
@murtazahamid61414 жыл бұрын
What would happen if there was more than one peak?? The algorithm would simply find one peak and leave it at that
@luojihencha4 жыл бұрын
agree
@golubhai19104 жыл бұрын
question is to find a peak, so its ok to have multiple peaks because we are only searching for a peak. watch 6.006 ist lecture then come to this video you will understand
@kind03cn9 жыл бұрын
In 2:23, the part of the function he is writing is "Sin(x+1)" not "Sim(x+1) " right?
@christopherbuja10275 жыл бұрын
yes, it is sin. The reason why is that the sin function ranges from -1 to 1, so it adds noise to to the function
@oishikachaudhury55195 жыл бұрын
How are we just canceling out the base?
@sapnokiranii4 жыл бұрын
I want to know this too, did you figure out?
@sweatysweatson93994 жыл бұрын
which time frame are you asking about? 20:00 ?
@riccardosven4 жыл бұрын
It's a long time past, but answering for future reference: log_a(b) = log(b)/log(a) so a constant base becomes just a constant multiplicative factor that you can disregard.
@DrewIsFail11 жыл бұрын
poor chalk :(
@userdejjek62434 жыл бұрын
Wow. I am not related to this major but. I watched this for 25 minutes and I thought this is little bit hard and The ta is little bit hot.
@alexanderle16103 жыл бұрын
❤️
@AyushBhattfe7 жыл бұрын
got the whole thing
@mathematicalcoffee27507 жыл бұрын
Ayush Bhat no one cares
@AyushBhattfe7 жыл бұрын
MathematicalCoffee you do :')
@sniperkyle61522 жыл бұрын
9:43
@c.d.premkumar68672 жыл бұрын
15:11: if BigO (log N) is > BigO (1) then the minimum value of N must be equal to 10. I have always had this doubt. Can anyone please clarify.
@kevinryzack57125 жыл бұрын
The professor is wrong at the 13:00 mark. It's not a big deal but it's still theta of x^1.5 as x^1.5 is clearly also a lower bound to the equation: (1+sin(x))x^1.5 + x^1.4
@user-tk2jy8xr8b5 жыл бұрын
Probably he should have used sin(x)*x^1.5 + x^1.4
@rfrost47084 жыл бұрын
No he is correct because when sinx becomes -1, the x^1.5 term disappears and we have only the x^1.4 term remaining. x^1.5 cannot be the lower bound as it's greater than x^1.4 in this case.
@fernandofuentes76173 жыл бұрын
@@rfrost4708 wut? -1 and disappears?
@wpelfeta9 жыл бұрын
Wait. I don't understand the log log log log joke he says at 22:15. I feel like I'm missing something funny. :(
@apathyonastick9 жыл бұрын
Q:What does a theory student say when they're drowning? A: Log log log log. Sounds like "glug" or the noise of bubbles in water.
@AldarionTheMariner9 жыл бұрын
apathyonastick And I thought he cries for a log to float on it or something.
@punstress10 жыл бұрын
It looks like he is writing x^(1.4) but it sounds like he says "x to the one fourth". Maybe I'm not seeing or hearing him correctly? 11:25 Also he switches between N and n as if they are the same... Sloppy.
@unknownunknown86992 жыл бұрын
This dude looks younger than all my colleagues :)
@Juan-dc6yf Жыл бұрын
Tough crowd
@AbhimanyuAryan10 жыл бұрын
this guy is so cool & his writing is OK i have seen people with more miserable handwriting & he sits exactly at back of me in exams......n great thing is i have to cheat from his answer sheet.....in chemistry, electrical, physics exams :p
@priyanksharma11245 жыл бұрын
LOG LOG LOG LOG ......drowning
@flyfast38372 жыл бұрын
what is this O instead of Theta shit?! it's messing with my brain!
@GutsofEclipse3 жыл бұрын
People who say that monetary profit is just a corrupting factor should think about what he said here. Why does google care about giving you a fast service? Because in a capitalist system, you have a right to not help them make money. Without a capitalist system of accountability to customers, they'd be okay with making you wait for results, just like the DMV (who should be more efficient according to socialist theory), because there's no penalty to them for doing so. >Just go full Soviet and torture them if they don't get 200 milliseconds! And now you understand why putting leftists in charge of humans rights is like putting child molesters in charge of CPS.
@DanielPage10 жыл бұрын
I am calm, I am just telling you as a mathematician and computer scientist (both) I found his comments to be very inappropriate to a course in this subject. I would appreciate you not inferring false statements about my feelings. As somebody who has taught this subject numerous times (in analysis) and at the university level myself as an instructor that is not the way to present oneself with this subject. The point is to emphasize the importance of mathematics in computation as it is required
@TheMasterfulcreator5 жыл бұрын
He's making the distinction between math and computer science conventions using a little bit of humor. Honestly the fact that you aren't used to this makes it seem like you are in fact not both a mathematician and computer scientist.
@swapnildadamode6624 жыл бұрын
people cant read victors handwriting. And he thinks he teaches good.
@DanielPage11 жыл бұрын
I find this TAs jokes to be incredibly arrogant. To segregate your students between the "maths" students and the "CS" students is ridiculous. There is no line to draw when they are one in the same.
@r17v15 жыл бұрын
its a fucking JOKE.
@troooooper1004 жыл бұрын
i work as a software developer i dont even know how to do calculus 1 whats your point. i dropped cal 2, i forgot cal 1.
@surajbiswas256 Жыл бұрын
1:01 that guy gives me some hope that even mit students can forget 3 yeas past topics...🥹🥹🥹 i am so glad to hear that