168k views
0 votes
Give the first two solutions of the n-Queens problem for n = 6 Write it in the form (1,2), (2,2), (3,2)

User DimonZa
by
4.7k points

1 Answer

2 votes

Answer:

(1,2), (2,4), (3,6), (4,1), ( 5,3), (6,5)

Explanation:

Given the first two solutions of the n-Queens problem for n = 6

The solution requires that no two queens share the same row, column, or diagonal and each variable lies in the domain [1,6] (6 rows).while finding a solution we must ensure that no two queens are not placed on the same row and in the same diagonal

hence the first two solutions can be expressed as :

(1,2), (2,4), (3,6),(4,1),( 5,3), (6,5)

User BitsAreNumbersToo
by
5.1k points