{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw3(8) - CS 573 Graduate Algorithms Fall 2008 Homework 3...

This preview shows pages 1–2. Sign up to view the full content.

CS 573: Graduate Algorithms, Fall 2008 Homework 3 Due at 11:59:59pm, Wednesday, October 22, 2008 Groups of up to three students may submit a single, common solution. Please neatly print (or typeset) the full name, NetID, and the HW0 alias (if any) of every group member on the first page of your submission. 1. Consider an n × n grid, some of whose cells are marked. A monotone path through the grid starts at the top-left cell, moves only right or down at each step, and ends at the bottom-right cell. We want to compute the minimum number of monotone paths that cover all marked cells. The input to our problem is an array M [ 1 .. n , 1 .. n ] of booleans, where M [ i , j ] = T RUE if and only if cell ( i , j ) is marked. One of your friends suggests the following greedy strategy: Find (somehow) one “good” path π that covers the maximum number of marked cells. Unmark the cells covered by π . If any cells are still marked, recursively cover them. Does this greedy strategy always compute an optimal solution? If yes, give a proof. If no, give a counterexample.

This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}