Answers.Body: <p>because any path where any piece(other than pawns and knights) can access 2 or more connected squares relative to the way that it moves rules out all following positions in the tree of moves, the trivial cases of knight moves and the rooks contained by the pawns(including knight captures) account for all such positions, any involving castling are ruled out because it is impossible to release the bishop without presenting the possibility of breaking parity. also any attempt to use a piece other than a pawn (pawns work because their moves are irreversible) to block another pieces access to squares which would allow for violations of parity doesn't work precisely because those moves are reversible. for example you cannot block in the rook with the knight and then say that parity is preserved because the rook may have come out first and then the knight proceeded to block it in later. Even not all knight moves are possible as any that captures a pawn would break parity as well as any where you capture a bishop and the opposing knight is moved (because now the rooks and/or the queen will have 2+ connected). So ultimately the conclusion is that there are only the mentioned rook moves and the knight moves which don't create to much freedom for pieces</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T04:34:40.667Z
Answers.LastActivityDate: 2023-01-09T04:34:40.667Z
Answers.UserDisplayName: brekker
Answers.Body: <p>You found most of the possibilities where an argument about parity can determine which side has the move (<em>however, this is not all the 32-pieces positions, see the edit at the bottom</em>), which all have in common:</p>
  <ul>
  <li>pawns from b2 to g2</li>
  <li>bishops on their initial squares</li>
  <li>pawns on a2 or a3 and on h2 or h3</li>
  <li>rooks on a1-a2-b1 and h1-h2-g1</li>
  <li>either Ke1+Qd1, or Ke1 and no queen, or Kd1 and no queen</li>
  <li>same things for Black</li>
  <li>knights on any non-checking free square.</li>
  </ul>
  <p>For a gross estimate of 3^2 x 25^2 x 32 x 31 /2 x 30 x 29/2 = 1 213 650 000 positions
  (this is a lower bound because there's one more spot for Black knights when a white knight occupies a square from which it attacks the white king, and because we have more choice for knights when there's no queen - a more precise count is at the bottom of this answer)</p>
  <p>However, you are incorrect in your postulate that parity cases disappear once a capture occured.</p>
  <p>In this position, for instance, it is necessarily White's move because there is no ante move for White:</p>
  <pre><code>[fen &quot;4b2N/B5pp/1p6/4kPK1/4p1p1/8/2P3n1/4N2r w - - 0 1&quot;]
  </code></pre>
  <p>It can sometimes become very subtle to understand if a position can be reached with either side on move. Actually, because of Dead Reckoning, even something as simple as Ka8 vs Kc6 can be reached only with one color! (the last move was necessarily made by the king on c6)</p>
  <p>Anyway, that will add billions of positions that are not easily categorized.</p>
  <hr />
  <p><strong>Precise count for positions where only one side can be on move because of an argument about parity:</strong></p>
  <p>First, each pair rook + rook-pawn can be arranged in 5 differents ways, independantly of everything else, giving us a 5^4 factor.</p>
  <p>Then we must distinguish cases according to the presence of queens, and then whether wNs are on any of the 2 squares from where they could target their own king (d3 and f3 if the wK is on e1)</p>
  <p>A) <em>With both queens on the board</em> (one position for Ks and Qs):</p>
  <ul>
  <li><p>There are 30x29/2 ways to place the wNs without targetting the wK, and then 30x29/2 ways to place the bNs. A1=189 225</p>
  </li>
  <li><p>There are 2 ways to place a wN on d3 or f3, then 30 spots for the second wN, then 31x30/2 ways to place the bNs. A2=27 900</p>
  </li>
  <li><p>There is 1 way to place the wNs on d3 and f3, and then 32x31/2 ways to place the bNs. A3=496</p>
  </li>
  </ul>
  <p>subtotal: A = A1+A2+A3 = 189225+27900+496 = 217 621</p>
  <p>B) <em>With one queen on the board</em> (4 possibilities for Ks and Q):</p>
  <ul>
  <li><p>There are 31x30/2 ways to place the wNs without targetting the wK, and then 31x30/2 ways to place the bNs. B1=216 225</p>
  </li>
  <li><p>There are 2 ways to place a wN on d3 or f3, then 31 spots for the second wN, then 32x31/2 ways to place the bNs. B2=30 752</p>
  </li>
  <li><p>There is 1 way to place the wNs on d3 and f3, and then 33x32/2 ways to place the bNs. B3=528</p>
  </li>
  </ul>
  <p>subtotal: B = 4x(B1+B2+B3) = 4x(216225+30752+528)= 990 020</p>
  <p>C) <em>With no queen on the board</em> (4 possibilities for Ks):</p>
  <ul>
  <li><p>There are 32x31/2 ways to place the wNs without targetting the wK, and then 32x31/2 ways to place the bNs. C1=246 016</p>
  </li>
  <li><p>There are 2 ways to place a wN on d3 or f3, then 32 spots for the second wN, then 33x32/2 ways to place the bNs. C2=33 792</p>
  </li>
  <li><p>There is 1 way to place the wNs on d3 and f3, and then 34x33/2 ways to place the bNs. C3=561</p>
  </li>
  </ul>
  <p>subtotal: C = 4x(C1+C2+C3) = 4x(246016+33792+561)= 1 121 476</p>
  <p><em>Finally</em></p>
  <p>T = 5^4 x (A+B+C) = 1 455 698 125</p>
  <p>So my best guess is that overall there are <strong>1 455 698 125</strong> such positions with no captures but the queens, and many more with less material.</p>
  <p>If we require 32 pieces, the result becomes T2 = 5^4 x A = 136 013 125</p>
  <hr />
  <p>The argument about parity is not the only one that can ensure which side is on move when there are 32 pieces, because positions like this one also meet the requirement.</p>
  <pre><code>[fen &quot;r1bqkbN1/pppppp1N/7p/6p1/P7/r7/1PPPPPPP/nRBQKBnR w Kkq - 0 1&quot;]
  </code></pre>
  <p>It is necessarily Black who played last here, and it's now White's move.
  Since most Black pieces can be shuffled almost anywhere, such a matrix leads to zillions of possibilities !</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T08:57:54.913Z
Answers.Text: ...and you will meet tons of such positions in problem chess anyway, sometimes with hair-raising retroanalytical arguments why just one side can have the move. (As a rule of thumb, if it's in the FIDE laws, it has been used as reason in retro :-)
Answers.UserDisplayName: Hauke Reddmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T09:36:50.970Z
Answers.Text: Do you mean "It's necessarily white's move" for your example position? Also, I don't entirely follow your king example. Is it not possible for one king to move between a8 and a7, and the other king to triangulate c6, c5, d6, thus reaching your given position with either player to move?
Answers.UserDisplayName: Arthur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T09:47:53.060Z
Answers.Text: (Or, either king could've been checked by a queen on a8 or c6, then captured it. I realize that if you add rules like "the game ends the moment it is a dead draw, and not a single move later", then that's a different story.)
Answers.UserDisplayName: Arthur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T10:32:27.720Z
Answers.Text: @Arthur : thanks for your first remark, I've edited the correction. In case of White: Ka7 vs Black: Kc6,Qa8, the game is already finished per rule 9.6 (no possible mate, aka Dead Reckoning), so Ka7xQa8 is illegal. Yes, "the game ends the moment it is a dead draw, and not a single move later" is actually a rule in FIde Laws.
Answers.UserDisplayName: Evargalo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T10:55:29.613Z
Answers.Text: @Evargalo I just checked, and you're right. I thought the rules just allowed a player (or arbiter) to claim draw, rather than the game itself actually ending.
Answers.UserDisplayName: Arthur
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-09T08:28:01.247Z
Answers.LastActivityDate: 2023-02-24T14:16:57.193Z
Answers.LastEditDate: 2023-02-24T14:16:57.193Z
Answers.UserDisplayName: Evargalo
Body: <p>Most positions in chess can be reached with both black or white to move.</p>
  <p>Some positions are only legal with one color to move. One such position is the <em>starting position</em>, which famously can't be reached with black to move. This is because knight moves preserve parity.</p>
  <p><strong>How many such positions are there?</strong>
  (excluding <em>checks</em>, which can only be reached with the threatened side to move).</p>
  <p>A large and trivial family of such positions are all the knight permutations. These all have a unique side to move due to parity</p>
  <pre><code>[Title &quot;White to move&quot;]
  [fen &quot;r1bqkb1r/pppppppp/8/3NN3/3nn3/8/PPPPPPPP/R1BQKB1R w KQkq - 0 1&quot;]
  </code></pre>
  <p>All four knights must be present, as captures do not preserve parity:</p>
  <pre><code>[Event &quot;White to move&quot;]
  [FEN &quot;&quot;]
  [StartPly &quot;14&quot;]
  1.Nf3 Nf6 2.Ne5 Ng4 3.Nc3 Nc6 4.Nd5 (4... Ne3 5.Nxe3) Nb8 5.Nxg4 Nc6 6.Ne5 Nb8 7.Ne3 Nc6
  </code></pre>
  <p>The rooks, if kept in a properly confined area, also preserve parity. I see two versions of this, both with or without the a3/a6/h3/h6 pawns moved.</p>
  <p><a href="https://i.sstatic.net/sg9Aq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/sg9Aq.png" alt="thisall" /></a></p>
  <p>Are there more ways to raise the number of permutations? Letting bishops, queens and kings loose usually allows triangulation, but sufficiently small cages could potentially prevent that, just like with the rooks.</p>
  
Tags: <problems><retrograde-analysis>
Title: Legal positions with one color to move only?
ThreadText: # Legal positions with one color to move only?
  
  (Asked by: username_0 on 2023-01-08)
  
  Most positions in chess can be reached with both black or white to move.
  
  Some positions are only legal with one color to move. One such position is the *starting position*, which famously can't be reached with black to move. This is because knight moves preserve parity.
  
  **How many such positions are there?**
  (excluding *checks*, which can only be reached with the threatened side to move).
  
  A large and trivial family of such positions are all the knight permutations. These all have a unique side to move due to parity
  
  ```
  [Title "White to move"]
  [fen "r1bqkb1r/pppppppp/8/3NN3/3nn3/8/PPPPPPPP/R1BQKB1R w KQkq - 0 1"]
  
  ```
  
  All four knights must be present, as captures do not preserve parity:
  
  ```
  [Event "White to move"]
  [FEN ""]
  [StartPly "14"]
  1.Nf3 Nf6 2.Ne5 Ng4 3.Nc3 Nc6 4.Nd5 (4... Ne3 5.Nxe3) Nb8 5.Nxg4 Nc6 6.Ne5 Nb8 7.Ne3 Nc6
  
  ```
  
  The rooks, if kept in a properly confined area, also preserve parity. I see two versions of this, both with or without the a3/a6/h3/h6 pawns moved.
  
  [![thisall](https://i.sstatic.net/sg9Aq.png)](https://i.sstatic.net/sg9Aq.png)
  
  Are there more ways to raise the number of permutations? Letting bishops, queens and kings loose usually allows triangulation, but sufficiently small cages could potentially prevent that, just like with the rooks.
  
  **Tags:** problems, retrograde-analysis
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2023-01-09. Score: 9 | Accepted answer
  
  You found most of the possibilities where an argument about parity can determine which side has the move (*however, this is not all the 32-pieces positions, see the edit at the bottom*), which all have in common:
  
  * pawns from b2 to g2
  * bishops on their initial squares
  * pawns on a2 or a3 and on h2 or h3
  * rooks on a1-a2-b1 and h1-h2-g1
  * either Ke1+Qd1, or Ke1 and no queen, or Kd1 and no queen
  * same things for Black
  * knights on any non-checking free square.
  
  For a gross estimate of 3^2 x 25^2 x 32 x 31 /2 x 30 x 29/2 = 1 213 650 000 positions
  (this is a lower bound because there's one more spot for Black knights when a white knight occupies a square from which it attacks the white king, and because we have more choice for knights when there's no queen - a more precise count is at the bottom of this answer)
  
  However, you are incorrect in your postulate that parity cases disappear once a capture occured.
  
  In this position, for instance, it is necessarily White's move because there is no ante move for White:
  
  ```
  [fen "4b2N/B5pp/1p6/4kPK1/4p1p1/8/2P3n1/4N2r w - - 0 1"]
  
  ```
  
  It can sometimes become very subtle to understand if a position can be reached with either side on move. Actually, because of Dead Reckoning, even something as simple as Ka8 vs Kc6 can be reached only with one color! (the last move was necessarily made by the king on c6)
  
  Anyway, that will add billions of positions that are not easily categorized.
  
  ---
  
  **Precise count for positions where only one side can be on move because of an argument about parity:**
  
  First, each pair rook + rook-pawn can be arranged in 5 differents ways, independantly of everything else, giving us a 5^4 factor.
  
  Then we must distinguish cases according to the presence of queens, and then whether wNs are on any of the 2 squares from where they could target their own king (d3 and f3 if the wK is on e1)
  
  A) *With both queens on the board* (one position for Ks and Qs):
  
  * There are 30x29/2 ways to place the wNs without targetting the wK, and then 30x29/2 ways to place the bNs. A1=189 225
  * There are 2 ways to place a wN on d3 or f3, then 30 spots for the second wN, then 31x30/2 ways to place the bNs. A2=27 900
  * There is 1 way to place the wNs on d3 and f3, and then 32x31/2 ways to place the bNs. A3=496
  
  subtotal: A = A1+A2+A3 = 189225+27900+496 = 217 621
  
  B) *With one queen on the board* (4 possibilities for Ks and Q):
  
  * There are 31x30/2 ways to place the wNs without targetting the wK, and then 31x30/2 ways to place the bNs. B1=216 225
  * There are 2 ways to place a wN on d3 or f3, then 31 spots for the second wN, then 32x31/2 ways to place the bNs. B2=30 752
  * There is 1 way to place the wNs on d3 and f3, and then 33x32/2 ways to place the bNs. B3=528
  
  subtotal: B = 4x(B1+B2+B3) = 4x(216225+30752+528)= 990 020
  
  C) *With no queen on the board* (4 possibilities for Ks):
  
  * There are 32x31/2 ways to place the wNs without targetting the wK, and then 32x31/2 ways to place the bNs. C1=246 016
  * There are 2 ways to place a wN on d3 or f3, then 32 spots for the second wN, then 33x32/2 ways to place the bNs. C2=33 792
  * There is 1 way to place the wNs on d3 and f3, and then 34x33/2 ways to place the bNs. C3=561
  
  subtotal: C = 4x(C1+C2+C3) = 4x(246016+33792+561)= 1 121 476
  
  *Finally*
  
  T = 5^4 x (A+B+C) = 1 455 698 125
  
  So my best guess is that overall there are **1 455 698 125** such positions with no captures but the queens, and many more with less material.
  
  If we require 32 pieces, the result becomes T2 = 5^4 x A = 136 013 125
  
  ---
  
  The argument about parity is not the only one that can ensure which side is on move when there are 32 pieces, because positions like this one also meet the requirement.
  
  ```
  [fen "r1bqkbN1/pppppp1N/7p/6p1/P7/r7/1PPPPPPP/nRBQKBnR w Kkq - 0 1"]
  
  ```
  
  It is necessarily Black who played last here, and it's now White's move.
  Since most Black pieces can be shuffled almost anywhere, such a matrix leads to zillions of possibilities !
  
  > **Comments:**
  > **username_3**: ...and you will meet tons of such positions in problem chess anyway, sometimes with hair-raising retroanalytical arguments why just one side can have the move. (As a rule of thumb, if it's in the FIDE laws, it has been used as reason in retro :-)  
  > **username_4**: Do you mean "It's necessarily white's move" for your example position? Also, I don't entirely follow your king example. Is it not possible for one king to move between a8 and a7, and the other king to triangulate c6, c5, d6, thus reaching your given position with either player to move?  
  > **username_4**: (Or, either king could've been checked by a queen on a8 or c6, then captured it. I realize that if you add rules like "the game ends the moment it is a dead draw, and not a single move later", then that's a different story.)  
  > **username_2**: @username_4 : thanks for your first remark, I've edited the correction. In case of White: Ka7 vs Black: Kc6,Qa8, the game is already finished per rule 9.6 (no possible mate, aka Dead Reckoning), so Ka7xQa8 is illegal. Yes, "the game ends the moment it is a dead draw, and not a single move later" is actually a rule in FIde Laws.  
  > **username_4**: @username_2 I just checked, and you're right. I thought the rules just allowed a player (or arbiter) to claim draw, rather than the game itself actually ending.  
  
  ---
  
  ### Answer by username_1 on 2023-01-09. Score: 1
  
  because any path where any piece(other than pawns and knights) can access 2 or more connected squares relative to the way that it moves rules out all following positions in the tree of moves, the trivial cases of knight moves and the rooks contained by the pawns(including knight captures) account for all such positions, any involving castling are ruled out because it is impossible to release the bishop without presenting the possibility of breaking parity. also any attempt to use a piece other than a pawn (pawns work because their moves are irreversible) to block another pieces access to squares which would allow for violations of parity doesn't work precisely because those moves are reversible. for example you cannot block in the rook with the knight and then say that parity is preserved because the rook may have come out first and then the knight proceeded to block it in later. Even not all knight moves are possible as any that captures a pawn would break parity as well as any where you capture a bishop and the opposing knight is moved (because now the rooks and/or the queen will have 2+ connected). So ultimately the conclusion is that there are only the mentioned rook moves and the knight moves which don't create to much freedom for pieces
  
  
  ---
  
  