% 9/16/2009 4:09 PM % Function Name: rooksCheck % Input: 1. char array - a char array containing coordinates of rooks on a % board % Output: 1. logical - true if specified board meets consrtaints, false if % it does not % % Function Description: % In 1848, Max Bezzel, a chess player, posed a problem to % mathematicians: how would one set up a chess board with 8 queens such % that no 2 queens could attack each other? In other words, how would % one place 8 objects on an 8x8 grid such that no two objects existed in % the same row, column, or diagonal? The question has been worked on % over the years by several mathematicians and, more recently, computer % scientists. % % One approach suggested by Dijkstra in 1972 was to preform a brute force % method using recursion. The gist of the idea was to place the first % queen on the board, then place another queen. If the second queen % conflicts with the first, move it, otherwise place the next queen. % % (Source: http://en.wikipedia.org/wiki/Queens_problem)
This is the end of the preview. Sign up
access the rest of the document.
This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.