Quiz On Chessboard Problem

Last Updated : 25 Sep, 2023

Chessboard problems are defined as a class of puzzles that involve solving a problem based on a chessboard. These problems typically require participants to place or move chess pieces on the board following specific rules or constraints to achieve a particular objective.

More On ChessBoard Problems

Chessboard Problem Quiz

Chessboard Problem Quiz

Question 1

The "Eight Queens Puzzle" involves placing 8 queens on an 8x8 chessboard such that no two queens threaten each other. How many solutions are there for this problem?

Cross

8

Cross

12

Cross

32

Tick

92



Question 1-Explanation: 

The eight-queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other; thus, a solution requires that no two queens share the same row, column, or diagonal. There are 92 solutions.

Hence (D) is the correct answer.

Question 2

If a knight piece is placed on a chessboard, how many legal moves can it make in a single turn?

Cross

6

Tick

8

Cross

10

Cross

12



Question 2-Explanation: 

The knight's movement is unique: it moves two squares vertically and one square horizontally, or two squares horizontally and one square vertically (with both forming the shape of a capital L). Consequently, a knight alternates between light and dark squares with each move. When moving, the knight can jump over pieces to reach its destination. Knights capture in the same way, replacing the enemy piece on the square and removing it from the board. A knight can have up to eight available moves at once.

Hence (B) is the correct answer.

Question 3

Which of the following methods can be used to solve n-queen’s problem?

Cross

 Greedy algorithm

Cross

Iterative improvement

Cross

Divide and conquer

Tick

Backtracking



Question 3-Explanation: 

Backtracking methods is used to solve N- Queen's problem. The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other.

N- Queen Problem

Hence (D) is the correct answer.

Question 4

What is the N-Queens problem?

Tick

Placing N queens on an N x N chessboard so that no two queens threaten each other. 

Cross

Placing N kings on an N x N chessboard so that they can capture each other.

Cross

Placing N queens on an N x N chessboard with no constraints.

Cross

Placing N pawns on an N x N chessboard so that they can reach the other side.



Question 4-Explanation: 

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, the following is a solution for the 4 Queen problem.

N Queen Problem

Hence (A) is the correct answer.

Question 5

What is the Knight's Tour problem?

Cross

A puzzle involving a knight in chess capturing other pieces. 

Tick

A puzzle involving a knight moving to every square on a chessboard exactly once. 

Cross

A puzzle involving placing knights on a chessboard without conflicts. 

Cross

A puzzle involving the longest path a knight can take on a chessboard.



Question 5-Explanation: 

The Knight's Tour problem states that  "Given a N*N board with the Knight placed on the first block of an empty board. Moving according to the rules of chess knight must visit each square exactly once. Print the order of each cell in which they are visited."

Please refer this for more reference: https://www.geeksforgeeks.org/the-knights-tour-problem/

Hence (B) is the correct answer.

Question 6

Which type of graph problem is the Knight's Tour problem an example of?

Cross

Shortest path problem

Cross

Traveling Salesman problem 

Cross

Graph coloring problem 

Tick

Hamiltonian cycle problem



Question 6-Explanation: 

The knight's tour problem is an instance of the more general Hamiltonian path problem in graph theory. The problem of finding a closed knight's tour is similarly an instance of the Hamiltonian cycle problem. Unlike the general Hamiltonian path problem, the knight's tour problem can be solved in linear time.

Hence (D) is the correct answer.

Question 7

What is the output of the code below if the input is qX = 4, qY = 5, oX = 6, oY = 7 : 

C++

bool canQueenAttack(int qR, int qC, int oR, int oC)
{
    if (qR == oR)
        return true;
    if (qC == oC)
        return true;
    if (abs(qR - oR) == abs(qC - oC))
        return true;

    return false;
}
Tick

True

Cross

False



Question 7-Explanation: 

In the above problem, The task is to determine whether the queen can attack the opponent or not. for the above input, the queen can attack diagonally. So it will return true.

Please refer this for more reference:  https://www.geeksforgeeks.org/check-if-a-queen-can-attack-a-given-cell-on-chessboard/

Hence (A) is the correct answer.

Question 8

Given a square chessboard of N*N size, the position of the knight and the position of a target are given as (1, 3) and (5, 0) respectively. Find out the minimum steps a knight will take to reach the target position.


 

Cross

2

Cross

4

Tick

3

Cross

5



Question 8-Explanation: 

In the below image, we can see that 3 minimum steps are required for the knight to reach the target position.

 

In the above diagram, Knight takes 3 steps to reach from (1, 3) to (5, 0).
 (1, 3) -> (3, 4) -> (4, 2) -> (5, 0)  

Hence (C) is the correct answer.

Question 9

What is the total number of squares (including all sizes) on a standard 8x8 chessboard? 

Cross

36

Tick

64

Cross

72

Cross

128



Question 9-Explanation: 

Basic Terminologies of Chess

  • This is a two-player game that moves their pieces alternatively on a square board.
  • It has an 8×8 grid of 64 equal squares (32 black and 32 white ).
  • Horizontal lines are called ranks.
  • Vertical lines are called Files.

Chessboard

Hence (B) is the correct answer.

Question 10

How will Queen move in the chess-board?

Cross

Diagonal

Cross

Forward

Cross

Backward

Tick

All of these



Question 10-Explanation: 

Properties of a chessboard:

  • 1 Queen: It moves in continuous diagonal, forward, backward, and side to side.
  • 1 King: It can move in any direction one square at a time, it is the most important piece on the board.

Hence (D) is the correct answer.

There are 10 questions to complete.


Share your thoughts in the comments

Similar Reads