04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

538<br />

Chapter 9 PSPACE: A Class of Problems beyond NP<br />

Since p(n) is a polynomial, so is n-p(n), and hence our space usage is<br />

polynomial in n, as desired.<br />

In summary, we have shown the following.<br />

(9.4) QSAT can be solved in polynomial space. _<br />

Extensions: An <strong>Algorithm</strong> for Competitive Facility Location<br />

We can determine which player has a forced win in a game such as Competitive<br />

Facility Location by a very similar type of algorithm.<br />

Suppose Player 1 moves first. We consider all of his possible moves in<br />

sequence. For each of these moves, we see who has a forced win in the resulting<br />

game, with Player 2 moving first. If Player 1 has a forced win in any of them,<br />

then Player 1 has a forced win from the initial position. The crucial point,<br />

as in the QSAT algorithm, is that we can reuse the space from one candidate<br />

move to the next; we need only store the single bit representing the outcome.<br />

In this way, we only consume a polynomial amount of space plus th~ space<br />

requirement for one recursive call on a graph with fewer nodes. As in the case<br />

of QSAT, we get the recurrence<br />

S(n) 1, O i requires C] for all j < i as prerequisites. When invoked, it<br />

adds Q and deletes Cj for all j < i.<br />

Now we ask: Is there a sequence of operators that will take us from eo = ¢ to<br />

e* = {C1, C 2 ..... Cn}?<br />

We claim the following, by induction on i:<br />

From any configuration that does not contain C 1 for any j < i, there exists<br />

a sequence of operators that reaches a configuration.containing C i for all<br />

] < i; but any such sequence has at least 2 ~ - 1 steps.<br />

This is clearly true for i = 1. For larger i, here’s one solution.<br />

o By induction, achieve conditions {Q_I .....Q} using operators O1 .....<br />

o Now invoke operator (9i, adding Ci but deleting everything else.<br />

539

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!