3.5 Correctness
We now argue that the constructed position will mimic a generalized geog-raphy game if both of the players play “correctly”. If a player does not play correctly, then it leads to a losing game within a few moves. Let us consider the case that the starting vertex is of in-degree 1 and out-degree 1 as shown in Figure 3.12. The arguments for the other five cases are similar.
Proposition 1 Consider Figure 3.3 and Figure 3.12. In the first move, if P1 does not place stones at one of c1, c2,· · · , cp points in Figure 3.12 and one of a1, a2,· · · , ap in Figure 3.3 in each of the auxiliary zones, then P2 can win immediately.
Proof. Since P1 has no threat, he cannot win in the first move. W.L.O.G., assume that P1 does not place stone at any of a1, a2,· · · , ap in Figure 3.3, then P2can place p white stones at a1, a2,· · · , apand win in the second move.
2
Proposition 2 P1 will have p threats against the second move if and only if he places stones at c1 in Figure 3.12 and a1 in Figure 3.3 in each of the auxiliary zones in the first move. Moreover, P2 has no threat before the second move.
Proof. Clear. 2
Proposition 3 P2 will have p threats against the third move if and only if he places stones at d in Figure 3.12 and w in Figure 3.3 in each of the auxiliary zones in the second move. Moreover, P1 has no threat before the third move.
Proof. The same as for Proposition 2. 2
Proposition 4 In the first move, if P1 does not place a black stone at c1 in Figure 3.12 or a1 in Figure 3.3 in one of the auxiliary zones, then P2 can win in two moves.
40 CHAPTER 3. PSPACE-COMPLETENESS Proof. By Proposition 2, P1 will have less than p threats in the second move.
W.L.O.G., we can assume that P1 has no threat in the simulation zone (see Figure 3.12). Then by Proposition 3, P2 can place p − 1 stones on w’s in the auxiliary zones to get p − 1 threats and make P1 have no threat. Moreover, P2 can place one white stone at a in the winning zone in Figure 3.2 to get 2 threats. Since P1 has no threat and P2 has more than p threats against the third move, P2 can win in the fourth move. 2
Proposition 5 In the second move, if P2 does not place a white stone at d in Figure 3.12 or w in Figure 3.3 in one of the auxiliary zones, then P1 can win within two moves.
Proof. Similar to Proposition 4. 2
The arguments for the following moves are similar and can be verified easily.
Next, we show the cases of different situations.
Proposition 6 The constructed position in Figure 3.9 simulates a vertex of in-degree 1 and out-degree 2 in Black group.
Proof. According to the construction, when entering such a vertex, P1 is forced to place a black stone at a, otherwise, with a similar argument to the proof of Proposition 1, P1 would lose. Then P2 is forced to respond a white stone at b, P1 is forced to respond a black at c, and then P2 is forced to respond a white stone at d. Now, P1 can respond at e or f since p > 1 (if p = 1, P1 is forced to respond at e). Actually, the choice of e and f simulates a vertex with out-degree 2. The arguments for the following moves are straightforward. 2
Proposition 7 The constructed position in Figure 3.10 simulates a vertex of in-degree 1 and out-degree 2 in Black group.
Proof. Similar to Proposition 6. 2
3.5. CORRECTNESS 41 Proposition 8 If a player chooses to visit a visited vertex (not the starting vertex), then it leads to a losing game.
Proof. W.L.O.G., assume P2 revisits a vertex. Then this vertex must be of in-degree 2. Consider Figure 3.7. Assume this vertex has been visited via the left entry point and hence there must be black stones at a, c and i, and white stones at b and d, otherwise P1 would have lost the game earlier. Next, according to the construction of the connect position, when reentering such a vertex, P1 is forced to place one black stone at e, P2 is forced to respond a white stone at f , and P1 is forced to respond a black stone at g. Now, in the whole game board, P2 has no threat and P1 has p threats by Proposition 2. In the auxiliary zones, P2 can get p − 1 threats in the following move and make P1 no threat there. However, in the simulation zone (Figure 3.7), P2 can only make P1 no threat but cannot create new threat at the same time, since there is already a black stone at i. Finally, similar to the argument in Proposition 4, P2 will lose in two moves and P1 will win. The case of Figure 3.8 is similar. 2
Proposition 9 If P2 chooses to visit the starting vertex, then he will lose.
Proof. Similar to Proposition 8. 2
Since the play in the simulation zone will terminate when a player chooses to revisit a vertex and the opponent will then win, we have shown that the ∃-player has a winning strategy in the generalized geography game if and only if P1 has a winning strategy from the constructed position of the Connect(m, n, k, p, q) game. Moreover, the setting k − p ≥ p and the large enough constant distance between any two mapped coordinates ensure the required empty squares, e.g. c1, c2,· · · , cp in Figure 3.12, will not be affected by any components of the constructed position. The reason why k − p ≥ 3 is trivial, i.e., in Figure 3.7, there are two consecutive black stones next to b, and hence k − p must be greater than 2.
42 CHAPTER 3. PSPACE-COMPLETENESS Finally, we have to make sure that the reduction can be done in polyno-mial time. We estimate the required size for each zone of the constructed position in the following:
1. Winning zone: O(k − p) × O(k − p), see Figure 3.2.
2. Simulation zone: Since k and p are fixed constants, the size of the simulation zone is bounded by O(V ) × O(V ), refer to Theorem 2.
3. Auxiliary zone: We now determine the number of the repeated parts in Figure 3.3. Since we require that the play in the simulation zone always terminates a few moves earlier than the play in the auxiliary zones, the number of the repeated parts is related to the size of the simulation zone. Hence, the required size is O(1) × O(V ).
Therefore, we obtain that m = O(V ) and n = O(V ). Since the construction mentioned above can be done in polynomial time, we have the following lemma.
Lemma 6 The decision Connect(m, n, k, p, q) problem is PSPACE-hard when k− p ≥ max{3, p} and p ≥ 2.
Theorem 4 The decision Connect(m, n, k, p, q) problem is PSPACE-complete when k − p ≥ max{3, p} and p ≥ 2.
Proof. Immediately from Lemma 4 and 6. 2
Corollary 3 To determine whether P1 has a winning strategy in a given non-empty Connect6 game position is PSPACE-complete.
Proof. Immediately from Theorem 4. 2
Corollary 4 The decision Connect(m, n, k, p, q) problem is PSPACE-complete when k − p ≥ max{3, p}.
Proof. Immediately from Lemma 5 and Theorem 4. 2
Chapter 4
Conclusion and remarks
The main results in this paper are: (1) Fairness issue: no one can win Connect(m, n, k, p, q) for any m, n when q ≤ p and k ≥ 4p + 7. (2) Complex-ity issue: The decision Connect(m, n, k, p, q) problem is PSPACE-complete when k − p ≥ max{3, p}.
Open problems: (1) Can we have a better bound than the first result, since Zetters[17] showed that P2 can tie the game when k ≥ 8 and p = q = 1? (2) Is the decision Connect(m, n, k, p, q) problem still PSPACE-complete if the restriction, k − p ≥ max{3, p}, is removed?
43
44 CHAPTER 4. CONCLUSION AND REMARKS
Appendix A
Drawing 3-planar graphs orthogonally in linear time
We introduce the framework of a linear time algorithm for drawing 3-planar graphs orthogonally (refer to Theorem 2), which is proposed by Kant[3] and used in our reduction in chapter 3. For details, we refer to Kant’s paper[3].
Input: A 3-planar graph of n vertices.
(1) Find vertices v1, v2, vn such that v2 and vn are v1’s neighbors. This can be done in O(n) time easily.
(2) Given v1, v2 and vn, there is a O(n) time algorithm to sort the vertices in a special order: {v1, v2,· · · , vn}, which is called lmc-ordering.
(3.1) For any triconnected 3-planar graph, there is a O(n) time algorithm to draw it on a grid orthogonally according to the lmc-ordering.
(3.2) For any biconnected 3-planar graph, we can decompose it into tricon-nected components in O(n) time. Calling (3.1) as subroutines, there is a O(n) time algorithm to draw it on a grid orthogonally.
(3.3) For an arbitrary 3-planar graph, we can decompose it into biconnected components in O(n) time. Calling (3.2) as subroutines, there is a O(n) time algorithm to draw it on a grid orthogonally.
45
46APPENDIX A. DRAWING 3-PLANAR GRAPHS ORTHOGONALLY IN LINEAR TIME
Bibliography
[1] A.S. Fraenkel, M.R. Garey and D.S. Johnson, The Complecity of Check-ers on an N × N Board - Preliminary Report, In the 19th IEEE Sympo-sium on Foundations of Computer Science, 55-64, 1978.
[2] S. Iwata and T. Kasai, The Othello game on an n×n board is PSPACE-complete, Theoretical Computer Science, 123: 329-340, 1994.
[3] G. Kant, Drawing planar graphs using the canonical ordering, Algorith-mica, 16(1): 4-32, 1996.
[4] R. Kaye, Minesweeper is NP-complete, Mathematical Intelligencer, 22(2): 9-15, 2000.
[5] D. Lichtenstein and M. Sipser, Go is polynomial-space hard, Journal of the ACM, 27: 393-401, 1980.
[6] W.-J. Ma, Generalized Tic-tac-toe, http://www.klab.caltech.edu/
~ma/tictactoe.html, 2005.
[7] R.J. Nowakowski, Games of no chance: combinatorial games at MSRI, Cambridge University Press, 1994.
[8] R.J. Nowakowski, More games of no chance, Cambridge University Press, 2002.
[9] C.H. Papadimitriou, Computational complexity, Addison Wesley Pub-lishing Company, 1994.
47
48 BIBLIOGRAPHY [10] A. Pluh´ar, The accelerated k-in-a-row game, Theoretical Computer
Sci-ence, 270: 865-875, 2002.
[11] S. Reisch, Gobang ist vollst¨andig (Gobang is PSPACE-complete), Acta Informatica, 13: 59-66, 1980.
[12] J.M. Robson, N by N Checkers is EXPTIME complete, SIAM Journal on Computing, 13(2): 252-267, May 1984.
[13] M. Sipser, Introduction to the Theory of Computation, PWS Publishing Company, 1997.
[14] H.J. van den Herik, J.W.H.M. Uiterwijk and J. van Rijswijck, Games Solved: Now and in the Future, Artificial Intelligence, 134: 277-311, 2002.
[15] I.-C. Wu and D.-Y. Huang, A new family of k-in-a-row games, In the 11th Advances in Computer Games Conference (ACG’11), Taipei, Taiwan, September 2005.
[16] J. Yolkowski, Tic-tac-toe, http://www.stormloader.com/ajy/
tictactoe.html, 2003.
[17] T.G.L. Zetters, 8(or More) in a Row, American Mathematical Monthly, 87: 575-576, 1980.