exer4 - CMPT 405/705 — Design and Analysis of Algorithms...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CMPT 405/705 — Design and Analysis of Algorithms Exercises on Dynamic Programming and Flow Networks. Due: Thursday, October 22th (at the beginning of the class) Reminder: the work you submit must be your own. Any collaboration and consulting outside resourses must be explicitely mentioned on your submission. 1. Suppose that you are given an n × n checkerboard and a checker. You must move the checker from the bottom edge of the board to the top edge of the board according to the following rule. At each step you may move the checker to one of three squares: • the square immediately above, • the square that is one up and one to the left (but only if the checker is not already in the leftmost column), • the square that is one up and one to the right (but only if the checker is not already in the rightmost column). Each time you move from square x to square y , you receive p ( x,y ) dollars. You are given p ( x,y ) for all pairs ( x,y ) for which a move from x to y is legal. Do not assume thatis legal....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online