Lecture 14

T given is a chess board a chess board has 8x8 fields

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: other. t Given is a chess board. A chess board has 8x8 fields. Is it possible to place 8 queens on this board, so that no two queens can attack each other? Q 3 4 The n Queens problem: Example: 2 Queens problem is not solvable. Given is a board of n b y n squares. Is it possible to place n queens (that behave exactly like chess queens) on this board, without having any one of them attack any other queen? QQ QQ 5 Q Q Q Q Q Q Q Q 6 Example 2: The 4-queens problem is solvable: Basic idea of solution: S • tart with one queen in the first column, first row. S • tart with another queen in the second column, first row. • o down with the second queen until you G reach a permissible situation....
View Full Document

This document was uploaded on 03/31/2014 for the course CS 114 at NJIT.

Ask a homework question - tutors are online