Question

Kindly assist with the solution to this problem. Thank youQuestion 5 1 ptl: The goal of the 5-Queens problem is to place 5 Queens on a 5 rows 5 columns chessboard, e.g., the one showing in Figure 3, such that no two Queens attach each other. Please use forward checking to find a solution to the 5 Queens problem. Please use Table 3 to show the assignment of each variable till the solution to be found (only need to report one solution) [1 pt] Figure 3: 5-Queens problem board Table 3 Q3 Q4 Q5

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please do rate the answer thanks...

Step 1: Draw an empty table of 5 rows and 5 columns. Step 2: Queen 1 Now place the first queen Q in the board (row 1, column 1). The colored boxes (light green) indicate that in these boxes, the next queen cannot be placed. (Because, the queen can attack in the corresponding row, corresponding column or diagonally) Step 2: Queen 2: Now look on the boxes which are not colored and place the second queen in any of the non-colored boxes. Assume it is placed as row 2, column 3 such that it not attacked by queen 1. Step 3: Color the boxes which can be attacked by the second queen as shown below (light blue color). The boxes are colored on the basis of attacks that can be made by second queen (corresponding row, corresponding column and diagonals)

Add a comment
Know the answer?
Add Answer to:
Kindly assist with the solution to this problem. Thank you Question 5 1 ptl: The goal...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT