Algorithms

Spring 2019
course
site

Thu March 28

First : remaining midterm projects

Second : start describing how dynamic programming works.

Third : I've posted an assignment for Tuesday where you get to try some!

dynamic programming

It's a terrible name - really it's a variation on recursion and divide-and-conquer : find a way make the problem smaller, saving intermediate results as you go along, while building up the final answer. Oh, and be clever about the order of doing the smaller pieces.

The only way I know to get a handle on this to try to work some of these yourself.

We'll look at several examples in class :

There is a nice list of examples at sanfoundry with solutions ... and the homework for Tuesday asks you to pick two of them to study, understand, implement, and explain next Tuesday. :)


I've attached the fibonacci files we did in class.


https://cs.marlboro.college /cours /spring2019 /algorithms /notes /dynamic1
last modified Thu November 21 2024 12:00 pm

attachments [paper clip]

  last modified size
TXT fib1.py Thu Nov 21 2024 12:00 pm 329B
TXT fib2.py Thu Nov 21 2024 12:00 pm 463B
TXT fib3.py Thu Nov 21 2024 12:00 pm 399B