VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-the-counters-and-board/

⇱ Puzzle | The Counters and Board - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | The Counters and Board

Last Updated : 9 Apr, 2026

Given 2n counters where n > 1. You have to place these 2n counters on an n Ɨ n board so that no more than two counters are in the same row, column, or diagonal.

Check if you were right - full answer with solution below.  

Since we need to place 2n counters on an n Ɨ n board, and each row and each column can contain at most two counters, it follows that every row and every column must contain exactly two counters.

Case 1: Even n (n = 2k)

We can construct a solution by placing the counters symmetrically in the left and right halves of the board. Number the rows from top to bottom and the columns from left to right.

  • In the first half of the board, place two counters in rows 1 and 2 of column 1, rows 3 and 4 of column 2, and so on, until rows nāˆ’1 and n of column k.
  • Then repeat the same pattern in the second half of the board: place two counters in rows 1 and 2 of column k+1, rows 3 and 4 of column k+2, and so on, until rows nāˆ’1 and n of column 2k.

This gives a symmetric placement of counters across the board.
For example, when n=8, the board is divided into two halves of 4 columns each.

šŸ‘ Image
2n Counters problem for n = 8

Case 2 : Odd n (n = 2k + 1)

Again, number the rows from top to bottom and the columns from left to right. The construction is symmetric about the central square.

  • In the left part of the board, place two counters in rows 1 and 2 of column 1, rows 3 and 4 of column 2, and so on, until rows nāˆ’2 and nāˆ’1 of column k.
  • In the middle column k+1, place two counters in rows 1 and n.
  • In the right part of the board, place counters symmetrically to those on the left: two counters in rows 2 and 3 of column k+2, rows 4 and 5 of column k+3, and so on, until rows nāˆ’1 and n of the last column.

For example, when n = 7, this pattern produces a valid arrangement on a 7 Ɨ 7 board.

šŸ‘ Image
2n counters problem for n = 7
Comment
Article Tags: