2. Optimization Problems

preview_player
Показать описание
MIT 6.0002 Introduction to Computational Thinking and Data Science, Fall 2016
Instructor: John Guttag

Prof. Guttag explains dynamic programming and shows some applications of the process.

License: Creative Commons BY-NC-SA
Рекомендации по теме
Комментарии
Автор

*My takeaways:*
1. Pros and Cons in greedy algorithm 1:05
2. Brute force algorithm implementation using search tree 2:08
- Brute force algorithm is not efficient to compute, but dynamic programming can help with it 23:30

leixun
Автор

One of the courses that I can say changed my life.

jacobsonokoro
Автор

I watched this course after 6.006, I have to say Dr John's course is much easier to understand, this one has a lot of vivid examples. Maybe I'm not smart enough to follow 6.006 and 6.046 well, but this course is really detailed and good for most people to learn.

monffy
Автор

The part about the origin of the name "dynamic programming" was hilarious! \o/ Thank you, professor, for going the extra mile and researching that for us. =D

ElVerdaderoAbejorro
Автор

My favorite instructor for this course!

pfever
Автор

I love how he always looks like he's possibly trying to suppress a laugh. What an awesome guy!!

JamesJon
Автор

At 33:02 on line 129 of the code, it should return n instead of 1 because if it returns 1 you will be calculating one step more than what you asked for. fib(5) should return 5 but the code will return you 8 which is fib(6).

Pasora
Автор

Wonderful lecture and I learned a lot. In the accompanying Python code the lists for values and calories are missing an element. They have 8 elements each while the names list has 9 (See 15:03).

manojnirmal
Автор

I believe Eric Grimson, Ana Bell and JohnGuttag are one of the best lecturers at MIT.

ramind
Автор

Great lecture! Thank you for uploading these. I don't agree at all with using try/except though. The Professors reason was that it's fewer lines of code... but it's actually more. This is much easier to read and looks better...

if n in memo:
return memo[n]
memo[n] = fib(n-1, memo) + fib(n-2, memo)
return memo[n]

SinCityGT
Автор

A little bit late to the party, but at 6:36 it seems like the calorie values are messed up. If we're using the same code as before, beer should be 154 instead of 145. Also, Beer+Pizza+Burger cannot be the same as Beer+Pizza, but they both have 766 calories. I think it should be: 766, 412*, 508, 154*, 612, 258, 354, 0 (* = wrong).

The answer should be Beer and Burger.

HibsMax
Автор

Awesome! I've got really suprised with fast fibonacci's speed. Great job!

pauloflores
Автор

Correction (6 years after taking the course i have a correction!) regarding mutable arguments in the function's signature (31:44) - don't do that. Well known problem in Python, google for more info.

nikitasid
Автор

@21:00 For reproducible random numbers seed(int) function is used in R

shobhamourya
Автор

Thank you! I'm glad I can take this course

letitrot
Автор

Can someone please explain the recursive procedure in maxval? Especially in the withVal and withtoTake and the opposites of the two? How is it actually exploring the tree? When does it check between withVal and withoutVal

aidenigelson
Автор

Awesome lecture once again. I wonder what is it with these students at MIT? They don't laugh at all and there are some good jokes being thrown at them.

ebateru
Автор

Is there any possible way to find an indicative solution to problem set 1?

nickskiadas
Автор

Does anyone know where i can find solution to The 'Roll-over' optimization problem which was included at the end of the lecture's slides?

bjaniak
Автор

Min 9.17 shouldn't the number of nodes be when there are n items: 2^(n+1) - 1 ?

kev