in Algorithms retagged by
1,836 views
0 votes
0 votes

What is the type of the algorithm used in solving the $4$ Queens problem?

  1. Greedy
  2. Branch and Bound
  3. Dynamic
  4. Backtracking
in Algorithms retagged by
by
1.8k views

1 Answer

1 vote
1 vote

Answer (D)We can solve 4-queens problem through backtracking by taking it as a bounding function .in use the criterion that if (x1, x2, ……., xi) is a path to a current E-node, then all the children nodes with parent-child labelings x (i+1) are such that (x1, x2, x3, ….., x(i+1)) represents a chessboard configuration in which no queens are attacking

In 4- queens problem, we have 4 queens to be placed on a 4*4 chessboard, satisfying the constraint that no two queens should be in the same row, same column, or in same diagonal.

The solution space according to the external constraints consists of 4 to the power 4, 4-tuples i.e., Si = {1, 2, 3, 4} and 1<= I <=4, whereas according to the internal constraints they consist of 4! solutions i.e., permutation of 4.

Answer: