
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A path finding problem where jeff's robot needs to traverse an n by n grid of positive numbers representing the cost to travel through each square. The robot can move forward, diagonal left, or diagonal right, and the goal is to reach the top of the grid with the lowest possible cost. The limitations of brute force and greedy algorithms, and considers the possibility of using dynamic programming to find a polynomial time algorithm for this problem.
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Algorithm Design and Analysis 3/18/
Instructor: Mike Kowalczyk
Suppose that we have a terrain represented by an n by n grid of positive numbers, each of which represents the cost for Jeff’s robot to travel through that square. Jeff’s robot can choose to start at any square on the bottom of the grid, and can move forward, diagonal left, or diagonal right. The grid doesn’t “wrap around”, and the goal is for the robot to reach the top of the grid with the lowest possible cost of movement. We could try this by brute force, but how many possibilities would we need to consider? Brute force gets us somewhere between n 2 n−^1 and n 3 n−^1 possibilities; way too time consuming. Greedy algorithms probably won’t apply becuase there might be a “wall” of numbers to get through, and something that doesn’t look too good at first may turn out to be a better global choice. Is this problem in P? Can we use dynamic programing to find a polynomial time algorithm that outputs such a path? For example, given the grid below, the progam should output something like this:
Total cost 108 Path is (3,3)->(2,3)->(1,2)->(0,1)