Part 3: Solving the "Please take me out of here!" with Dynamic Programming

Back to labs page.

The third task requires you to solve the "Please take me out of here!" problem by working out a Dynamic Programming solution.

Recap of Dynamic Programming

Dynamic programming can be applied when the original problem P can be divided in several smaller subproblems {P1,...,Pn} in such a way that:

When a problem P meets these conditions, a Dynamic Programming algorithm can be designed to solve it.
A Dynamic Programming strategy always has two clearly identifiable components: These components of your strategy are typically defined by a recurrence relation. A straight-forward implementation of this recurrence is almost certainly inefficient. The trick with dynamic programming is to (drastically) improve efficiency through use of memoization, which stores solutions to subproblems, to alleviate the need to recompute them when they are used several times.


Warning

The good news with Dynamic Programming is once you have the strategy working, it is almost straightforward to implement it.

The bad news is that the most difficult aspect of dynamic programming is getting the problem decomposition right, and writing the corresponding recursive strategy.

Fortunately, this assignment is TOTALLY about algorithms, and not being code masters. You are supposed to focus mostly on this analysis and modeling part of the task, and most -if not all- the credits for your work will be assigned on the quality of your report, not on your ability of making your solution running in your favourite programming language (as this is straight-forward, once you get your strategy right).

In case you do not know where to begin, here is a hint towards one way to approach this problem (there are plenty others).


Submission Requirements

The submission for this part will contain exactly two files, one for the report and one for the program.

Here we collected the requirements we expect from your files, but given the importance of the report in this part, we swap the presentation order we had previously.

Report Requirements

Due to the specific issues of Dynamic Programming, this section is totally different than the corresponding section of Part1.

Your report will be a document written in ENGLISH with the following structure:

Program Requirements

They are ABSOLUTELY the same as in part one.

No correctness proof?

The only requirement wrt. demonstrating correctness is proving the Principle of Optimality. When it holds, the strategy itself always guarantees to achieve optimal solution.

Submission

To submit you will use the Fire system.

Deadline for this assignment is 7 October, and the deadline is strict.