Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Generalization of 3d Queens Adam Pendry Dr. Robinson May 2 nd 2012.

Similar presentations


Presentation on theme: "A Generalization of 3d Queens Adam Pendry Dr. Robinson May 2 nd 2012."— Presentation transcript:

1 A Generalization of 3d Queens Adam Pendry Dr. Robinson May 2 nd 2012

2 8 Queens Rules of the 8 Queens Puzzle, 8 Queens 8x8 Chess Board 8 Directions of movement No conflicts allowed

3 Four Distinct Solutions for 8 Queens

4 Generalizing Into N Queens Rules of the N Queens Puzzle N Queens NxN Chess Board 8 Directions of Movment No Conflicts allowed N:12345678910111213 Soln10021010 44092352724268014,20073,312

5 Generalize Into 3d NxN Queens NxNxN Chess Board 26 Directions of Movement No Conflicts allowed

6 Generating a Solutions Bank Using Java to Create Solutions Using Java to Quantify Solutions queenSolutions.get(0) = {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0, 0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0} 10000000 00001000 00000001 00000100 00100000 00000010 01000000 00010000 10000000 00000100 00000001 00100000 00000010 00010000 01000000 00001000 10000000 00000010 00010000 00000100 00000001 01000000 00001000 00100000 10000000 00000010 00001000 00000001 01000000 00010000 00000100 00100000

7 Creating a Template Start with a solution from the bank Create a corresponding template Isolate a queen Determine what layer Add appropriate numbers to indexes 22022200 22022222 00022222 02222222 22220222 22222222 22222000 10000000 00001000 00000001 00000100 00100000 00000010 01000000 00010000 30300303 00333333 30303303 00333333 33333303 03033333 33333000 03033330... 80080008 00008000 80000008 00000800 00800000 00000080 08000000 80080008

8 Sample Code for Template

9 Trimming The Solution Bank

10 Finding 3d Solutions

11 Fit Method

12 Combine Method

13 Sample Output Base layer is now 0 Entering Conditional Statement 9 975 fits on top of 0 Entering Conditional Statement 8 2357 fits on top of 975 and 0 Entering Conditional Statement 7 97 fits on top of 2357 and 975 and 0 Entering Conditional Statement 6 1370 fits on top of 97 and 2357 and 975 and 0 Entering Conditional Statement 5 2365 fits on top of 1370 and 97 and 2357 and 975 and 0 Entering Conditional Statement 4 325 fits on top of 2365 and 1370 and 97 and 2357 and 975 and 0 Entering Conditional Statement 3 1780 fits on top of 325 and 2365 and 1370 and 97 and 2357 and 975 and 0 Entering Conditional Statement 2 2592 fits on top of 1780 and 325 and 2365 and 1370 and 97 and 2357 and 975 and 0 Entering Conditional Statement 1 578 fits on top of 2592 and 1780 and 325 and 2365 and 1370 and 97 and 2357 and 975 and 0 Entering Conditional Statement 0 2108 fits on top of 578 and 2592 and 1780 and 325 and 2365 and 1370 and 97 and 2357 and 975 and 0 This is solution number 1 0, 975, 2357, 97, 1370, 2365, 325, 1780, 2592, 578, 2108,

14 Results Size # Of Solutions Found # Of Solutions Previously Claimed 800 11260264 1200

15 Proof Of Concept


Download ppt "A Generalization of 3d Queens Adam Pendry Dr. Robinson May 2 nd 2012."

Similar presentations


Ads by Google