Which of the following statements is correct about n-queen problem?
2022
Which of the following statements is correct about n-queen problem?
- A.
3-queen problem has 1 solution.
- B.
4-queen problem has 3 solutions.
- C.
5-queen problem has 2 solutions.
- D.
6-queen problem has 4 solutions.
Attempted by 17 students.
Show answer & explanation
Correct answer: D
The n-queen problem asks for distinct arrangements of N queens on an NxN board. For n=3, there are 0 solutions. For n=4, there are exactly 2 distinct solutions. For n=5, there are 10 solutions. However, for n=6, there are exactly 4 distinct solutions, making the statement regarding six queens correct.