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 ﬁrst 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 topleft cell, moves only right or down at each step, and ends at the bottomright 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
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.
This note was uploaded on 10/14/2011 for the course ECON 101 taught by Professor Smith during the Spring '11 term at West Virginia University Institute of Technology.
 Spring '11
 Smith

Click to edit the document details