Академический Документы
Профессиональный Документы
Культура Документы
DAVID LICHTENSTEINS"
Abstract. We define the set of planar boolean formulae, and then show that the set of true quantified
planar formulae is polynomial space complete and that the set of satisfiable planar formulae is NP-complete.
Using these results, we are able to provide simple and nearly uniform proofs of NP-completeness for planar
node cover, planar Hamiltonian circuit and line, geometric connected dominating set, and of polynomial
space completeness for planar generalized geography.
The NP-completeness of planar node cover and planar Hamiltonian circuit and line were first proved
elsewhere [M. R. Garey and D. S. Johnson, The rectilinear Steiner tree is NP-complete, SIAM J. Appl. Math.,
32 (1977), pp. 826-834] and [M. R. Garey, D. S. Johnson and R. E. Tarjan, The planar Hamilton circuit
problem is NP-complete, SIAM J. Comp., 5 (1976), pp. 704-714].
Key words Computational complexity, NP-completeness, P-space-completeness, combinatorial games,
planar graphs
1. Motivation. Many properties that are NP-complete for general graphs are also
NP-complete for planar graphs. (Others, such as max clique and max cut, are
significantly easier to test for on planar graphs, unless P=NP.) Proofs of planar
NP-completeness often involve two stages, typified by the proof that planar node cover
is NP-complete [4]. The first stage is the proof for general graphs, the second is the
construction of a complicated crossover box, which is added to the nonplanar reduction
everywhere two arcs cross. Unfortunately, such crossover boxes are hard to find and
hard to understand.
In this paper, we present a crossover box whose planarity is invariant under many
polynomial reductions. In this way, we argue that various planar completeness results
are "true for the same reason". Our technique may therefore be a useful tool to use in
attempts to strengthen general results to their planar subcases.
2. Preliminaries.
(1) A boolean formula B in conjunctive normal form with at most 3 variables per
clause (3CNF) is a set of clauses B {cl, ,
c,}. Each clause is a subset of 3
literals from the sets V {vl, .,
vn) and V {7,..., Tn). For convenience,
clauses will be written (a + b + c) instead of {a, b, c}.
(2) The set of quantified boolean formulae with at most 3 variables per clause
(3QBF)={QvOav2"’" Onl)nB(Vl, 192,’", Vn)lOi {V, =t}, where the vi are
boolean variables and B is in 3CNF}.
(3) TF is the set of true formulae in 3OBF. We will also refer to the problem of
recognizing this set as TF.
(4) 3SAT is the subset of TF where all variables are existentially quantified.
(5) The variable vi occurs m, (abbreviated mi) times, negated or unnegated, in B.
(6) We use as few subscripts as possible, for the sake of readability. Most structures
will be described by picture and example, rather than formally.
(7) It will sometimes be convenient to coalesce certain subgraphs into a single
macro node. The macro node is then adjacent to all nodes which were
originally adjacent to some node in the subgraph replaced by the macronode.
This coalescing will be signified pictorially by means of a dotted line around the
subgraph.
* Received by the editors January 20, 1978, and in final revised form March 25, 1981.
5" Department of Computer Science, Yale University, New Haven, Connecticut 06520. This research was
partially supported by the National Science Foundation under grant MCS76-17605.
329
330 DAVID LICHTENSTEIN
(8) Each problem in the paper is trivially in NP, except for generalized geography,
which is trivially in P-space.
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
3. Planar tormulae. In this section, we prove the main results of the paper, the
P-space-completeness of the planar quantified boolean formula problem, and the
NP-completeness of planar satisfiability. Since 3SAT is just TF with all variables
existentially quantified, the same reduction reduces TF to planar TF and 3SAT to
planar 3SAT. TF was shown to be P-space-complete in [9]; 3SAT was shown to be
NP-complete in [2].
DEFINITION. Let B Q3CNF. We call G(B)-(N,A) the graph of B, where
N={ci[l <-]<=m}U{v[l <=i<=n}. A--A1 A2 where
Al={{ci, V]}II3]C or ]ci} A. {{vi, vi+}ll <=]<n}{{v,,, Vl}}.
Example: B: (a+b/c)(b/d)
Notice that (a/b+c) would
cjive the same graph as
(o / ).
FIG.
C.o
cj
FIG. 2
FIG. 3
FIG. 4
PLANAR FORMULAE AND THEIR USES
(a+b+d} (a+c+e)
Example B=(a+b+c)
331
332 DAVID LICHTENSTEIN
FIG. 5
PLANAR FORMULAE AND THEIR USES 333
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
FIG. 6
Exomple B-(o+b+c)(b+b+d)
FIG. 7
If each variable structure and each triangle is viewed as a single macro node, as the
dotted lines indicate, then the resulting graph is simply G (B). There is a choice of cyclic
orderings of clauses around variables and variables around clauses for which NC(B) is
planar if and only if G(B) is planar. Since any (polynomial) planarity algorithm can find
such an ordering if it exists, Theorem 2 applies and the theorem is proved. Q.E.D.
5. Planar directed Hamiltonian circuits.
THEOREM 4. Planar directed Hamiltonian circuit is NP-complete [6].
Proof. (This proof is due to Michael Sipser.) We show how to construct H(B), a
graph that has a Hamiltonian circuit if and only if B is satisfiable. Variables are
represented by ladders, as shown in Fig. 8. Choosing the variable true will mean
FIG. 8
traversing the nodes in the ladder in a zig-zag starting at the top; choosing the variable
false will mean starting at the bottom. The length of the ladder will be the number of
(undirected) cross rungs, and the ladder for the variable vi will be 4mi long. (4mi is long
enough so that we can leave gaps between sections of the ladder linked to two different
clauses.)
Clauses are simply single nodes. They are connected to ladders as in the example
shown in Fig. 9.
To complete the construction, the ladders are linked together in a global Hamil-
tonian circuit (drawn in long dashes).
PLANAR FORMULAE AND THEIR USES 335
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
/
/
B.-(a+b+c)
FIG. 9
Claim. If B is satisfiable, the Hamiltonian circuit in H(B) zigs the appropriate way
in each ladder, and traverses each clause node by interrupting the path in the ladder to
jump up and back down to the ladder, as in Fig. 10. Note that the choice of which
variable to use in satisfying the clause is arbitrary for clauses with more than one true
literal.
FIG. 10
The converse is nearly as simple. If H(B) has a Hamiltonian circuit, we now show
that it cannot leave a ladder in the middle via a clause, but instead must continue down
until the end of the ladder.
Suppose then that H(B) has a Hamiltonian circuit which misbehaves, i.e., jumps
from one variable to another via a clause, as in Fig. 11.
It should be clear that node u can never be traversed. The converse then follows
easily from the fact that each Hamiltonian circuit in H(B) looks right, i.e., that it zigzags
correctly through variables and returns immediately to the ladder it came from after
traversing a clause node.
We can now invoke Theorem 2 in the same way we did in the previous section, and
the theorem is proved. Q.E.D.
COROLLARY. Planar directed Hamiltonian line is NP-complete.
Proof. Just delete one are from the global circuit, e.g., the one representing {vn,
from A2.
336 DAVID LICHTENSTEIN
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
FIG. 11
COROLLARY. A more involved case analysis shows that the directions on the arcs in
the construction are unnecessary, and this gives us the NP-completeness of planar
undirected Hamiltonian circuit and line. These were first proved in [6].
The next two proofs are less straightforward than the previous two in that we can
not simply demonstrate a reduction from 3SAT and then invoke Theorem 2. This leads
us to a choice of where to do the extra tinkering necessary. One can either invent more
complicated reductions and use more involved proofs of the correctness of the
reduction, or try to massage boolean formulae into forms more easily reducible to the
problem at hand. The strategy followed in this paper is to do as much of the work as
possible with boolean formulae so as to have to prove as little as possible about
unfamiliar, uncooperative combinatorial structures.
1/40
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
0 0 0
III0
0 0 0
FIG. 12
o?
0 r’l
FIG. 13
The ground will follow the path taken by the A2 arcs from G(B). Figure 14 is a
detailed view of the ground passing through a variable. Notice that we have had to move
the square forcers outside the variable in the two pairs near the ground, since otherwise
the forcers would be near the ground, and would not force at least of the two nearby
nodes from the variable into the cds.
Each clause is represented by the kind of structure shown in Fig. 15. If the ]th
clause is (a + b / c), then one circled node will be within 1 of a top node representing a
one will be near a bottom node in the structure representing b, and one will be near a top
node in the structure representing c.
Notice that the uncircled round nodes are forced into any cds by the square nodes
nearby. In general, we will refer to a node which is forced into any cds by a nearby
square node as forced.
At this point the reader should notice a glaring discrepancy between variable nodes
as defined in 3 and the variable structure we intend to use here to represent them. The
latter are bipolar, by which we mean that all clauses containing a positive instance of a
variable must be positioned near the top of the variable, and all clauses containing a
negative instance of the variable must be positioned near the bottom. We imposed no
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
338
uO
1
o-f-
0
9/!0
0
0
FIG. 14
FIG. 15
1:3
0
9/10
DAVID LICHTENSTEIN
E!
0
0
[]
PLANAR FORMULAE AND THEIR USES 339
such restriction in our definition of planar formulae. We do so now, and prove the
resulting problem is still NP-complete.
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
()
()
FIG. 16
Proof. Take the planar embedding of the graph of the formula (see Fig. 16), and
replace each variable a with a cycle of ma variables ai, together with clauses (ai + ak) for
variables ai and ak such that kak follows aj in a clockwise traversal of the cycle. (Notice
in Fig. 17 that the ordering of variables in the cycle is different from the ordering
followed by the A2 arcs.) These clauses have the effect of forcing ace ak for all a and ak
in the cycle. A2 arcs are embedded as in Fig. 17.
Now, back to the problem at hand. Let:
NV 1/2 the number of nodes in all the variable structures;
NC the number of forced nodes in all the clause structures;
NG the number of forced nodes in the ground.
Let k NV + NC + NG + m.
Claim. GCD(B) has a connected dominating set of size k if and only if B is
satisfiable.
: Choose top and bottom rows in variables according to whether the variable is
true or false in a given satisfying instance of B. Pick one circled node in each clause that
lies within 1 of a variable already chosen. Pick all the forced nodes in each clause and in
the ground.
::), Let GCD(B) have a connected dominating set of size k. We show that this set
must look right. Call a node live if it is in the cds. Suppose some variable switches from
true to false at least once. Then suppose we want to find a path from a live node in the
left half of the variable to the right half. Since the ground follows the route taken by A2
arcs, and is therefore a Hamiltonian line through the variables, the path we are looking
for must go through at least one clause, ci. This means some clause has two live circled
nodes, since otherwise clauses are culs de sac. Since our threshold, k is a sum of local
340 DAVID LICHTENSTEIN
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
FIG. 17
minima, there is no slack anywhere to make up for the extra live node in Ci. So every
variable has either the entire top row live, or the entire bottom row live.
The rest of the proof involves showing that the entire graph can be embedded in the
plane in such a way that nodes are at rational points whose precision is bounded by a
polynomial in the size of the number of points. This demonstration is straightforward,
and we omit it. QED.
7. Generalized geography.
DEFINITION. Generalized geography (GG) is a game played by two players on the
nodes of a directed graph. Play begins when the first player puts a marker on a
distinguished node. In subsequent turns, players alternately place a marker on any
unmarked node q, such that there is a directed arc from the last node played to q. The
first player who cannot move loses.
This is a generalization of a commonly played game in which players must name a
place not yet mentioned in the game, and whose first letter is the same as the last letter of
the last place named. The first player to be stumped loses. This instance of geography
would be modelled by a graph with as many nodes as there are places. Directed arcs
would go from a node, u, to all those nodes whose first letters are the same as u’s last
letter.
THEOREM 6. GG is P-space complete [11].
PLANAR FORMULAE AND THEIR USES 341
Qi # Qi+x for 1 <= <_- n. Construct the graph GG(B), which is shown in Fig. 18.
i,1
FIG. 18
Q0
O
02
bo
b
C2
Example"
3oVb3c Vd(o+b+c)(b+d)
FIG. 19
342 DAVID LICHTENSTEIN
Play proceeds as follows: One player chooses which path to take through
diamonds (i.e., diamonds representing universally quantified variables), and the other
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
player chooses which path to take through ::l-diamonds. After all diamonds have been
traversed, the ’d-player chooses a clause, and the :l-player then chooses a variable from
that clause. :1 then wins immediately if the chosen variable satisfies the clause;
otherwise, wins on the next move. Assuming both players play optimally, it follows
easily that ::! wins if and only if B is true (we leave the details to the reader).
Planar generalized geography.
THEOREM 6. Generalized geography is P-space complete even when played only on
planar graphs.
Proof. There is a problem which prevents us from merely invoking Lemma 1 to
give us the proof, namely, the set of arcs, {(v,, c)ll _-</_-<m}.
To solve this problem, we make the following observation" There is no need to wait
until all variables have had their truth values chosen before allowing the /-player to test
the truth of a clause; in fact, each clause can be tested as soon as its last variable has had
its value fixed. Moreover, it is only necessary to allow testing of clauses not satisfied by
their last chosen variable.
In order to implement this idea, we need variable structures which are large enough
so that every clause has a different node of attachment to the structure. Moreover, this
node must be one at which has the choice of direction. Since each variable occurs in at
most three clauses (by Lemma 1), the structure in Fig. 20 suffices.
FIG. 20
set {bl," ’, b7}, and (d2, ci), (d4, Ci) or (d6, Ci) if d is a V-variable, else (dl, ci), (d3, Ci) or
’ (ds, ci). Notice that if d is chosen true, there is no way for the player to test ci. In fact,
Downloaded 12/25/12 to 150.135.135.70. Redistribution subject to SIAM license or copyright; see http://www.siam.org/journals/ojsa.php
REFERENCES
[1 A.V. AHO, J. E. HOPCROFT AND J. D. ULLMAN, The Design and Analysis ol Computer Algorithms,
Addison-Wesley, Reading, Mass., 1974.
[2] S. A. COOK, The complexity of theorem-proving procedures, Proc. Third ACM Symposium on Theory of
Computing, 1971, pp. 151-158.
[3] A. S. FRAENKEL, M. R. GAREY, D. S. JOHNSON, T. SCHAEFER AND Y. YESHA, The complexity
checkers on an N x N board, Proc. 19th IEEE Symposium on Foundations of Computer Science,
1978, pp. 55-64.
[4] M. R. GAREY AND D. S. JOHNSON, The rectilinear Steiner tree is NP-complete, SIAM J. Appl. Math.,
32 (1977), pp. 826-834.
[5] M. R. GAREY, D. S. JOHNSON AND L. STOCKMEYER, Some simplified NP-complete problems, Proc.
Sixth ACM Symposium on Theory of Computing, 1974, pp. 47-63.
[6] M. R. GAREY, D. S. JOHNSON AND R. E. TARJAN, The planar Hamiltonian circuit problem is
NP-complete, this Journal 5 (1976), pp. 704-714.
[7] R.M. KARP, Reducibility among combinatorialproblems, Complexity of Computer Computations, R. E.
Miller and J. W. Thatcher, eds., Plenum Press, New York, 1972, pp. 85-104.
[8] D. LICHTENSTEIN AND M. SIPSER, GO is polynomial space hard, J. Assoc. Comput. Mach., 27 (1980),
pp. 393-401.
[9] A. R. MEYER AND L. J. STOCKMEYER, Word problems requiring exponential time, Proc. 5th ACM
Symposium on Theory of Computing, 1973, pp. 1-9.
[10] S. REISCH, Hex ist PSPACE-vollstandig, private communication.
[11] T. J. SCHAEFER, On the complexity of some two-person perfect in]ormation games, J. Comput. Systems
Sci, 16 (1978), pp. 185-225.
[12] L. STOCKMEYER, Planar 3-colorability is polynomial complete, SIGACT News 5 (1973), pp. 19-25.
[13] J. A. STORER, A note on the complexity ol chess, Proc. 1979 Conference on Information Sciences and
Systems, Dept. Electrical Engineering, The Johns Hopkins University, Baltimore, Maryland, 1979,
pp. 160-166.