(rev. 01/24/2012)
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 set of disjoint intervals of maximum size. 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 called 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 maximum 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 it 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 an independent set of maximum size. 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.
There is always an efficient algorithm for checking a proposed
solution to an instance of an NP-complete problem. In other words, you
can efficiently check whether any proposed solution actually works.
However, no efficient algorithm is known for solving any of the
NP-complete problems themselves. (Lots of people think no efficient
algorithms exist, but no one has been able to prove that.)
- 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.