9

How can I place one queen, two bishops, two knights, and two rooks, on a 5×5 chessboard without any of them attacking other pieces?

After placing just queen and rooks, I can't make room for the other four pieces.

8
  • 4
    It would be nice to include a reference to the source of this problem.
    – Stef
    Mar 16, 2022 at 9:22
  • 3
    I suppose the key is to realize the bishops can be placed on the same color as each other, since the puzzle doesn't specify otherwise. Mar 16, 2022 at 11:33
  • @Stef It was a task at my college for practice. Mar 16, 2022 at 14:17
  • 4
    @J... I actually did it by myself, before I got an answer here. I think the practice is the wrong word for it. Mar 16, 2022 at 14:50
  • 2
    The constraints applicable to this problem are rather interesting. The queen and each rook control one rank and one file, meaning that three ranks and three files are totally controlled by those three pieces alone. This leaves only two ranks and two files for the other four pieces to inhabit - which is exactly enough space!
    – Kevin
    Mar 17, 2022 at 22:50

4 Answers 4

13

For the sake of completeness, I used chessboard, a Python "CLI to solve combinatoric chess puzzles".

chessboard solve --length=5 --height=5 --queen=1 --bishop=2 --rook=2 --knight=2

outputs 24 boards, corresponding to 3 unique solutions, rotated or mirrored.

The queen must be on the edge of the board, but it can be anywhere along those edges (16 squares). There are 2 possible solutions if the queen is in the corner or in the middle square along the edge, for a total of 24 solutions.

Here's the output:

┌───┬───┬───┬───┬───┐
│ ♛ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│   │ ♝ │   │   │ ♞ │
├───┼───┼───┼───┼───┤
│   │ ♞ │   │   │ ♝ │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│ ♛ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♝ │ ♞ │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♜ │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♞ │ ♝ │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │ ♛ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♝ │ ♞ │
├───┼───┼───┼───┼───┤
│ ♜ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♞ │ ♝ │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♛ │   │   │
├───┼───┼───┼───┼───┤
│ ♜ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│   │ ♝ │   │   │ ♞ │
├───┼───┼───┼───┼───┤
│   │ ♞ │   │   │ ♝ │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♛ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♜ │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│ ♞ │   │   │ ♝ │   │
├───┼───┼───┼───┼───┤
│ ♝ │   │   │ ♞ │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │   │ ♛ │   │
├───┼───┼───┼───┼───┤
│ ♞ │ ♝ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♜ │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│ ♝ │ ♞ │   │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │   │   │ ♛ │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│ ♞ │   │   │ ♝ │   │
├───┼───┼───┼───┼───┤
│ ♝ │   │   │ ♞ │   │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │   │   │ ♛ │
├───┼───┼───┼───┼───┤
│   │ ♞ │ ♝ │   │   │
├───┼───┼───┼───┼───┤
│ ♜ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│   │ ♝ │ ♞ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│ ♛ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│   │ ♝ │   │   │ ♞ │
├───┼───┼───┼───┼───┤
│   │ ♞ │   │   │ ♝ │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♛ │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│ ♞ │   │   │ ♝ │   │
├───┼───┼───┼───┼───┤
│ ♝ │   │   │ ♞ │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♝ │ ♞ │
├───┼───┼───┼───┼───┤
│ ♛ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♞ │ ♝ │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │   │ ♞ │ ♝ │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│ ♛ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♝ │ ♞ │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│ ♞ │ ♝ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♛ │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│ ♝ │ ♞ │   │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│ ♝ │ ♞ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♛ │
├───┼───┼───┼───┼───┤
│ ♞ │ ♝ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │ ♞ │   │   │ ♝ │
├───┼───┼───┼───┼───┤
│   │ ♝ │   │   │ ♞ │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│ ♛ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│ ♝ │   │   │ ♞ │   │
├───┼───┼───┼───┼───┤
│ ♞ │   │   │ ♝ │   │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♛ │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│   │ ♞ │   │   │ ♝ │
├───┼───┼───┼───┼───┤
│   │ ♝ │   │   │ ♞ │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│ ♛ │   │   │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♞ │ ♝ │   │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♜ │
├───┼───┼───┼───┼───┤
│   │   │ ♝ │ ♞ │   │
├───┼───┼───┼───┼───┤
│ ♛ │   │   │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │   │ ♞ │ ♝ │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│ ♜ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♝ │ ♞ │
├───┼───┼───┼───┼───┤
│   │ ♛ │   │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│ ♝ │   │   │ ♞ │   │
├───┼───┼───┼───┼───┤
│ ♞ │   │   │ ♝ │   │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♜ │
├───┼───┼───┼───┼───┤
│   │   │ ♛ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │ ♞ │   │   │ ♝ │
├───┼───┼───┼───┼───┤
│   │ ♝ │   │   │ ♞ │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│ ♜ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♛ │   │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│ ♝ │ ♞ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♜ │
├───┼───┼───┼───┼───┤
│ ♞ │ ♝ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♛ │   │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │   │ ♜ │   │   │
├───┼───┼───┼───┼───┤
│ ♝ │   │   │ ♞ │   │
├───┼───┼───┼───┼───┤
│ ♞ │   │   │ ♝ │   │
├───┼───┼───┼───┼───┤
│   │ ♜ │   │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♛ │
└───┴───┴───┴───┴───┘
┌───┬───┬───┬───┬───┐
│   │ ♝ │ ♞ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │ ♜ │   │
├───┼───┼───┼───┼───┤
│ ♜ │   │   │   │   │
├───┼───┼───┼───┼───┤
│   │ ♞ │ ♝ │   │   │
├───┼───┼───┼───┼───┤
│   │   │   │   │ ♛ │
└───┴───┴───┴───┴───┘
3
  • 4
    So the different unique solutions (if we count symmetries) are only 3. Interesting Mar 17, 2022 at 14:52
  • 2
    Unicode for the win!
    – Joshua
    Mar 18, 2022 at 3:18
  • 2
    I rolled back the last edit; it seems to depend on OS / browser / other settings which version works better. For me (macOS, Safari/Firefox), revision 1 is correct.
    – Glorfindel
    Mar 18, 2022 at 16:06
15

Qa3, Rb1, Rc4, Bd2, Nd5, Ne2, Be5

Qa3, Rb1, Rc4, Bd2, Nd5, Ne2, Be5

9

Another solution (not clearly equivalent to Glorfindel's)

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.