Do there exist chess positions that require exponentially many moves to reach? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-23T02:12:58Z http://mathoverflow.net/feeds/question/27944 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/27944/do-there-exist-chess-positions-that-require-exponentially-many-moves-to-reach Do there exist chess positions that require exponentially many moves to reach? Timothy Chow 2010-06-12T16:39:43Z 2013-04-06T00:49:48Z <p>By "chess" here I mean chess played on an $n\times n$ board with an unbounded number of (non-king) pieces. Some care is needed if you want to generalize some of the subtler rules of chess to an $n\times n$ board, but I will not dwell on this point because the answer to the question I'm interested in should be the same under any reasonable generalization. Namely, does there exist an infinite sequence $(A_n, B_n)$ of pairs of chess positions on an $n\times n$ board such that the minimum number of legal moves required to get from $A_n$ to $B_n$ is exponential in $n$? Here I allow any <i>legal</i> moves and not only strategically intelligent moves.</p> <p>Technically this question might be classified as an "open problem" (which is illegal on MO) because it was implicitly asked by A. Fraenkel and D. Lichtenstein in "Computing a perfect strategy for $n\times n$ chess requires time exponential in $n$," <i>J. Comb. Th. A</i> 31 (1981), 199–214. However, I think it is fair game for MO because I'm pretty confident that this has not been looked at much. Fraenkel and Liechtenstein showed that determining whether a given chess position is won for White (with best play) is EXPTIME-complete and asked for the computational complexity of the chess reachability problem ("is $B_n$ reachable from $A_n$?"). Clearly chess reachability is in NPSPACE = PSPACE, and <a href="http://groups.google.com/group/rec.games.abstract/msg/a84165cdf6be1d10" rel="nofollow">Hans Bodlaender has shown that it is NP-hard</a>. If the answer to the question I've posed above is "No, it can always be done with polynomially many moves" then it would solve this problem by showing that chess reachability is NP-complete, because exhibiting the sequence of moves yields a short certificate.</p> <p>If you have some experience with retrograde chess problems and if you've read Hearn and Demaine's lovely book <i>Games, Puzzles, and Computation</i> then you may get the intuition that shuffling chess pieces around is reminiscent of other rearrangement puzzles that have been shown to be PSPACE-complete. However, I've asked both Demaine and Hearn and neither of them saw immediately how to show that chess reachability is PSPACE-complete.</p> <p>[Edit: Searching more carefully through Hearn and Demaine's book, I see that they list this problem in their list of open problems at the end of the book under the name "Retrograde Chess." I didn't notice it before because for some reason that page is not listed in the index under "chess." I can perhaps be blamed for using the name "Retrograde Chess" for this problem because that's what I called it when I first posted this question to USENET way back when. I think that "reachability" is a better name for it.]</p> http://mathoverflow.net/questions/27944/do-there-exist-chess-positions-that-require-exponentially-many-moves-to-reach/27950#27950 Answer by Zirui Wang for Do there exist chess positions that require exponentially many moves to reach? Zirui Wang 2010-06-12T17:30:25Z 2010-06-12T20:37:56Z <p>If reachability is in PSPACE, then it's in NP because during the search once you reach the target you can immediately stop, without backtracking results. Unlikely Othello, in which a configuration requires children configurations to return a value, reachability can be done with non-deterministic machine. It doesn't require keeping the list of visited configurations. You can forget them immediately. If you still don't understand what I'm saying, contrast the difference between Othello evaluation and reachability.</p> <p>P.S. The exponential-length possibility is ruled out since it's in PSPACE. Otherwise PSPACE is not enough to store the current path. Here you need to store the path because PSPACE machines are not non-deterministic (or branching), hence it has to backtrack.</p> http://mathoverflow.net/questions/27944/do-there-exist-chess-positions-that-require-exponentially-many-moves-to-reach/88869#88869 Answer by Jirka Hanika for Do there exist chess positions that require exponentially many moves to reach? Jirka Hanika 2012-02-18T23:52:51Z 2012-03-01T22:53:36Z <p>I think that you deserve at least a partial answer to your partial question.</p> <p>You are taking a great leap when not specifying the generalized rules, including the <a href="http://en.wikipedia.org/wiki/Fifty-move_rule" rel="nofollow">fifty-move rule</a>.</p> <p>If this rule stays as it is in chess (50), or generalizes to a polynomial of your choice (bounded by $O(n^k)$ for a fixed $k$), then the answer to your question is "No", aside from the possibility of completely unreachable pairs of positions. An upper limit on the length of any legal sequence of moves is $O(n^{k+3})$, given that you allow at most $n^2$ pieces per player and that each piece can contribute less than $n$ pawn moves.</p> http://mathoverflow.net/questions/27944/do-there-exist-chess-positions-that-require-exponentially-many-moves-to-reach/126491#126491 Answer by JHI for Do there exist chess positions that require exponentially many moves to reach? JHI 2013-04-04T08:41:03Z 2013-04-06T00:49:48Z <p>With n/100 black kings, one white king, its possible. </p> <p>The idea is to make a "switch", a room which is in one of two states, has 1 entrance, e, and 2 exits; x and y, the white king enters the room through a tunnel of pawns, if its in state 1, it must exit through x, while switching the state of the room to 0, in state 0 it must exit through y leaving the room in state 1. </p> <p>With k switches labeled 1 to k, connect all the x_i with e_1, and y_j to e_(j+1) for all j. Start it with king in e_1=x_i, and all switches at 0, to turn the last switch on youll see that you need to transition thorugh all possible states, giving a minimum 2^k moves. </p> <p>The switch really needs a diagram, but the idea is to have a black king for each switch, the black king will block a black rook preventing check, so the white king can get to a next room, where it will block a white rook, so that the black king can get to a third room, blocking a black rook, having the white king exit, the black king cant go back without the white king, but it can continue to the black entrance of a second such sequence of rooms, the black exit of which is connected to the black entrance of this sequence. The two white entrances are connected, and the two white exits are x and y. So the black king is in one of two tunnels, corresponding to the states 0/1, which determines which exit is available for the white king. </p> <p>There might be some way to construct the switches without kings aswell. </p> <p>There should be a row of pawns below and above the diagram of the switch component.<br> Couple 4 of these of each color to make 1 switch.<br> <img src="http://www.eddins.net/steve/chess/ChessImager/ChessImager.php?fen=PP1P1PPP/1KP1P3/PPP1PPPP/PPp1pPPP/ppp1pppp/pp1r1ppp/1kprp3/ppprpppp" alt="alt text"></p>