(rev. 02/15/2009)
Five Problems
- In the ideal approach to problem-solving:
- We find a 'best' algorithm - one that is very efficient.
- We prove it works.
- We compute its average and worst case efficiency as a function of
problem size. (big-O and big-Ω analysis)
- We prove that the algorithm we have is the best - that no algorithm
that solves the problem is more efficient.
- For some problems we can perform as in the ideal described above. In
other cases the ideal is unattainable. In many cases, we don't know how close to the
ideal it's possible to get.
- In section 1.2 of Kleinberg-Tardos, five problems are considered. They
help illustrate the range of problems ... some are easy to solve and
analyze completely. For others, no efficient solution is known, and no
one understand them well enough to characterize them very thoroughly.
- Interval Scheduling is the first problem: There is some resource
that cannot be shared - for example a CPU. We are given N requests for
reservations for using the resource. Each request is for an interval of
time during which the resource may be used:
(s1,f1), (s2,f2), ...,
(sN,fN). Each request is an ordered pair
(si,fi), where si is a start time and
fi is a finish time. The goal is to maximize the number of
requests accepted. Because the resource is not sharable, none of the
accepted requests can overlap. Another way of thinking of the problem, is
that we want to find a maximal set of disjoint intervals. This turns out
to be a pretty 'easy' problem. There is a 'greedy' solution. Greedy
algorithms are the subject of chapter 4.
- Weighted Interval Scheduling: This is like the previous problem
except that each request has a value, which we may think of as the reward
for performing the work to be done during the requested interval. Here
the goal is to choose a set of disjoint intervals with maximum total
value. There's no known greedy algorithm, but we do know a way to solve
the problem. A technique known as dynamic programming can be utilized.
It involves building up partial solutions and keeping track of them in a
table. Dynamic programming is the subject of chapter 6.
- Bipartite Matching: In a bipartite graph, there are two disjoint
sets of nodes X and Y. Every edge has one end in X and one end in Y. A
matching is a subset M of the edge set such that each node appears in at
most one of the edges in M. The problem of finding a perfect
match is to produce a subset M of the edges such that every node appears
in exactly one of the edges in M. More generally the bipartite matching
problem is to find a matching of maximal size. This problem seems harder
than the previous two, and not amenable to solving with a greedy
algorithm or with dynamic programming. However, one can solve this
problem using a network flow procedure, which is the subject of
chapter 7.
- Independent Set: A set of nodes in a graph is independent
if there are no edges joining any two of them. The independent set
problem is to find a maximal independent set. It's possible to view both
the interval scheduling and bipartite matching problems as special cases
of the independent set problem. The independent set problem is an
example of an NP-complete problem. We'll study NP-complete problems in
chapter 8. If someone shows you a solution to an instance of an
NP-complete problem, you can verify it's correct efficiently. However,
no efficient algorithm is known for any of the NP-complete problems
themselves, and it is conjectured that none exist (no one has been able
to prove that yet.)
- Competitive Facility Location: Two players alternately choose
locations. Each location has a value. No one is allowed to choose a
location adjacent to a location that has already been taken. The problem
is to determine, given a target bound B, whether there is a strategy for
one of the players by which he can be guaranteed to acquire a set of
locations with total value B or greater. This is a problem which is
believed to be even harder than an NP-complete problem. It is
conjectured that not only is there no efficient way to solve the problem,
but also there is no efficient algorithm for checking a solution.
- Problems to work on in class: chapter 1, problems 1 and 2.
- Problem for students to work on and bring in their work: chapter 1,
problem #3.