***=== THE N (>=4) QUEENS PROBLEM (Demo by Dr. Zheng) ===*** Number of Rows(N) For NxN Chessboard (to Exit, type 3 or less): 8 The Coordinates of the N-Queens are given by (Row#,Col#). Rows & Colums are numbered between 1 ~ N; (1,1) is at Lower-Left corner. 8-Queens problem solution: (1,1); (2,5); (3,8); (4,6); (5,3); (6,7); (7,2); (8,4); The number of moves is 981 --------------------------------- | | | | Q | | | | | --------------------------------- | | Q | | | | | | | --------------------------------- | | | | | | | Q | | --------------------------------- | | | Q | | | | | | --------------------------------- | | | | | | Q | | | --------------------------------- | | | | | | | | Q | --------------------------------- | | | | | Q | | | | --------------------------------- | Q | | | | | | | | --------------------------------- ___________________________________________________________________________ ___________________________________________________________________________ ***=== THE N (>=4) QUEENS PROBLEM (Demo by Dr. Zheng) ===*** Number of Rows(N) For NxN Chessboard (to Exit, type 3 or less): 16 The Coordinates of the N-Queens are given by (Row#,Col#). Rows & Colums are numbered between 1 ~ N; (1,1) is at Lower-Left corner. 16-Queens problem solution: (1,1); (2,3); (3,5); (4,2); (5,13); (6,9); (7,14); (8,12); (9,15); (10,6); (11,1 6); (12,7); (13,4); (14,11); (15,8); (16,10); The number of moves is 170748 ----------------------------------------------------------------- | | | | | | | | | | Q | | | | | | | ----------------------------------------------------------------- | | | | | | | | Q | | | | | | | | | ----------------------------------------------------------------- | | | | | | | | | | | Q | | | | | | ----------------------------------------------------------------- | | | | Q | | | | | | | | | | | | | ----------------------------------------------------------------- | | | | | | | Q | | | | | | | | | | ----------------------------------------------------------------- | | | | | | | | | | | | | | | | Q | ----------------------------------------------------------------- | | | | | | Q | | | | | | | | | | | ----------------------------------------------------------------- | | | | | | | | | | | | | | | Q | | ----------------------------------------------------------------- | | | | | | | | | | | | Q | | | | | ----------------------------------------------------------------- | | | | | | | | | | | | | | Q | | | ----------------------------------------------------------------- | | | | | | | | | Q | | | | | | | | ----------------------------------------------------------------- | | | | | | | | | | | | | Q | | | | ----------------------------------------------------------------- | | Q | | | | | | | | | | | | | | | ----------------------------------------------------------------- | | | | | Q | | | | | | | | | | | | ----------------------------------------------------------------- | | | Q | | | | | | | | | | | | | | ----------------------------------------------------------------- | Q | | | | | | | | | | | | | | | | -----------------------------------------------------------------