You are on page 1of 7

Phutball Endgames are Hard

Daniel Dörr
16th August 2007

Contents
1 Introduction 2

2 Phutball – a Mathematical Play 2

3 The NP-Completeness Proof of Phutball 2


3.1 What is NP-complete? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.2 Why is it NP-complete? – Intuitive Hardness . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.3 Reducing a 3-SAT instance to a Phutball position . . . . . . . . . . . . . . . . . . . . . . 3
3.4 The Gadgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.5 The Overall Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4 Comparison to Other Games 5

5 Conclusion 7

6 References 8

1
1 Introduction
Phutball is a two player board game which was first described in the book “Winning ways for your
Mathematical Plays” in 1982. The game is played on the intersections of a 19x15 grid board using one
white stone and as many black stones as needed. In many ways the Phutball rules resemble the ones in
Checkers, a fairly common board game.
Phutball derives its name from that of a Monty Python Sketch, “Philosopher’s Football”, which is part
of the “Flying Cirus” collection illustrated during 1972. In this sketch German Philosophers play soccer
against Greek Philosophers. The game is won by the Greek since the only goal that is scored in the
match is a header by Socrates.

2 Phutball – a Mathematical Play


The objective of the game is to score goals by using the men (the black stones) to move the football (the
white stone) onto or over the opponent’s goal line.
At the start of the game the football is placed on the central point. During the game players alternate
making moves as in most board games. A move is either to add a man to any vacant point on the board
or to move the ball. There is no difference between men played by any of the two players. The football is
moved by a series of jumps over adjacent men. That means multiple jumps during one move are allowed.
Each jump is to the first vacant point in a straight line horizontally, vertically, or diagonally over one or
more men. The jumped men are then removed from the board. Figure 1 shows a jump sequence which
is counted as one move in Phutball.

Figure 1: A Phutball move from K14 over G11 and G9 to J9

3 The NP-Completeness Proof of Phutball


3.1 What is NP-complete?
In many other board games the problem of determining the outcome of the game, given an optimal play,
is mostly PSPACE-complete. In games where the player can return to a previous position as in Chess or
Go the problem is even EXPTIME-complete.
However the following theorem aims at a different kind of complexity. That is, the determination whether
a player has a move that immediately wins the game.
Theorem 3.1 Testing whether a Phutball position allows a winning jump sequence is NP-complete.
This complexity is quite astonishing since in most games – including Chess and comparable games – the
same problem can be tested in polynomial time as there are only a small number of legal moves.

2
3.2 Why is it NP-complete? – Intuitive Hardness
Testing for a winning jump sequence is clearly in NP, since a jump sequence can only be as long as the
number of men on the board.
In Phutball the exponential number of jump sequences possible in a single move, together with the ways in
which parts of a jump sequence can interfere with each other, leads to the high computational complexity
of finding a winning move.
This can be proven by reducing this problem to a 3-SAT instance, which is known to be NP-complete.
A 3-SAT instance is a boolean expression in conjunctive normal form with at most three variables per
clause.

3.3 Reducing a 3-SAT instance to a Phutball position


In order to show that testing whether a Phutball position allows a winning jump sequence is NP-complete,
a given 3-SAT instance must be translated into a Phutball position.
Given a boolean expression (see Figure 5) which has been defined by the 3-SAT instance, two horizontal
lines of men for each variable used in this expression are put on the Phutball board. The two horizontal
lines correspond to the boolean value of each variable. That is, the upper horizontal line of each variable
is associated with assigning the value “true” to the variable in the boolean expression, the lower with
assigning the value “false”.
Furthermore according to each clause within the boolean expression (which must consist of exactly three
variables) three vertical lines of men are put on the board. The described formation of men must lead to
a Phutball position which is shown in Figure 2. It still must be shown how the negated and non-negated
variables in the boolean expression are displayed in the Phutball position. This will be described in the
next section.

Figure 2: The horizontal lines define the truth value of each variable, whereas the vertical lines are
associated with the triple clauses of the boolean expression.

3.4 The Gadgets


At the next step, gadgets will be used to transform the boolean expression of the 3-SAT instance into a
Phutball position.
The fan-in and fan-out gadgets are used at the borders of the board. They are responsible that a possible
jump sequence zigzags horizontally and vertically along the lines of men on the board. The fan-in and
fan-out gadgets at the end of each vertical line allow movement from one triple clause to the next, whereas
the same gadgets at the end of each horizontal line make it possible to assign a truth value for every
variable that is used in the boolean expression when zigzagging along the horizontal lines.
The next two gadgets are used at the intersections of the horizontal and vertical lines. Jumping through
a non-interacting line crossing gadget does not destroy the chain of men at the orthogonal line. That is,

3
this gadget can be used twice within the same jump sequence. Other than the interacting line crossing
gadget: Jumping horizontally or vertically through this gadget destroys the possible jump sequence on
the orthogonal line and can no longer be used within the same move. In both gadgets it is not possible
to change the direction of the jump sequence. Therefore once entered at one end, the jump sequence has
to leave the gadget at the opposite position on the same line.

Figure 3: From left to right: Fan-in and fan-out gadget, non-interacting line crossing gadget, interacting
line crossing gadget.

3.5 The Overall Structure


On every horizontal line which has been assigned to a non-negated variable, an interaction gadget is placed
on the intersection with the vertical line where the negated variable occurs in the boolean expression. On
horizontal lines which have been assigned to a negated variable, it is exactly the opposite: if the horizontal
line intersects with the vertical line of the non-negated variable an interaction gadget is placed. For all
other intersections, a non-interacting line crossing gadget is used. The described formation of men leads
to a Phutball position which is shown in Figure 4.

Figure 4: Complete translation of the boolean expression (a ∨ b ∨ c) ∧ (ā ∨ b̄ ∨ c̄) into a Phutball position.
The intersections where an interacting line crossing gadget has been placed, are highlighted.

Figure 5 shows the boolean expression which has been reduced to the Phutball position in Figure 4. As

4
the table reveals there are six among eight possible assignments which satisfy the boolean expression.
Therefore, there also must be exactly six different winning jump sequences in the Phutball position of
Figure 4. One possible jump sequence is shown in Figure 6.

a b c (a ∨ b ∨ c) ∧ (ā ∨ b̄ ∨ c̄)
1 true true true false
2 true true false true
3 true false true true
4 true false false true
5 false true true true
6 false true false true
7 false false true true
8 false false false false

Figure 5: The table shows all possible truth assignments for the boolean expression (a ∨ b ∨ c) ∧ (ā ∨ b̄ ∨ c̄).

Figure 6: Winning jump sequence for a = f alse, b = true, c = true. In the left clause (a ∨ b ∨ c) there
are two possible jump sequences which both satisfy the boolean expression since both variables b and c
are set to true.

4 Comparison to Other Games


Checkers resembles Phutball in many ways. That is, players move stones by sequences of jumps and the
jumped pieces are removed from the board. Furthermore, one objective of the game is to move as many
stones as possible to the opposite side of the board. As in Phutball multiple jumps in one move are
allowed, too.
For checkers it is already proven that determining the outcome of the game is PSPACE-complete or
EXPTIME-complete, depending on the termination rules. But what is the complexity of testing if there
exists a winning jump sequence for a given Checkers position? Surprisingly, it can be tested in polynomial

5
Figure 7: A Checkers Position can be transformed into an Euler Path.

time. This can be proven by transforming a Checkers position into an Euler path (Figure 7). The main
difference between Checkers and Phutball is that in Checkers the jump sequence can not be influenced
by previous jumps within the same move. This corresponds to the definition of an Euler path, which
is a path that visits each edge of a graph exactly once. Translated into a Checkers position, an edge is
associated with a jumpable stone of the opponent player.

5 Conclusion
The previous section showed that in Checkers jumps do not interfere with each other within the same
jump sequence. Therefore, even if there may exist an exponential number of possible jump sequences, it
is still possible to test for a winning jump sequence within polynomial time.
It could also be proven that in Phutball testing if there exists a winning jump sequence for a given
position is NP-complete. But still, it has not been studied yet how much the complexity is to determine
the outcome of the game for a given Phutball position. That is, even if there does not exist a winning
jump sequence for a given Phutball position, how complex is it to calculate if the player may win the
game in the following moves?

6
6 References
ˆ Phutball Endgames are Hard Erik D. Demaine, Martin L. Demaine, David Eppstein

ˆ Boolean Satisfiability Problem http://www.cs.sunysb.edu/∼algorith/lectures-good/node19.html

ˆ Phutball rules http://www.gaissa.com/Board Games/modern/Phutball.htm

ˆ Phutball rules http://www.gamerz.net/pbmserv/phutball.html

ˆ Monty Python’s Philosphers’ Phutball Match http://youtube.com/watch?v=i2TicMbH4OY

ˆ John Conway Biography http://en.wikipedia.org/wiki/John Horton Conway

You might also like