jeudi 15 avril 2010

Eight rooks (queens) on a chessboard

Probably, the chess game has the closest relation to elementary mathematics. The problem of eight rooks on a chessboard located as no any two of them can hit each other has an interpretation in the linear algebra. If we treat the 8x8 chessboard as an 8x8 matrix then the number of possible locations of eight rooks coincides with the number of summarized terms in the matrix determinant definition. Indeed, every term in determinant summation is a product of 8 (in our case) elements located in different rows and different columns. From that note it immediately follows that number of possible rooks locations is 8! = 40320.


The following complication is the eight queens, instead of rooks, located on a chessboard thus no two of them can hit each other.How many solutions exist? I did not think a lot and yesterday wrote a simple MATLAB program searching the all possible variants.
The answer is 92. If we treat any two solutions coinciding with the board rotation as one, the number of queens positions on board is 92/4 = 23. One of them you may see in the figure. This number should be well known but I did not know it before.

The corresponding flash game named "The eight queens" is here
http://www.novelgames.com/flashgames/game.php?id=57

Aucun commentaire:

Enregistrer un commentaire