home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / pascal / 6468 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.2 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!natinst.com!news.dell.com!texsun!cronkite.Central.Sun.COM!west.West.Sun.COM!rubio!tamber
  2. From: tamber@rubio.West.Sun.COM (Tom Amber SUN Tucson CSD-Kodak 602-577-5207)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Chess Puzzle
  5. Message-ID: <1dp5hbINNbu4@west.West.Sun.COM>
  6. Date: 10 Nov 92 20:19:55 GMT
  7. Reply-To: tamber@rubio.West.Sun.COM
  8. Organization: Sun Microsystems
  9. Lines: 13
  10. NNTP-Posting-Host: rubio.west.sun.com
  11.  
  12.  
  13.  
  14. Keywords:
  15.  
  16. This is my first posting to this group, so I hope it even gets there, here goes!
  17. I'm trying to work out a solution to the "Eight Queens" chess problem whereby you
  18. try to place 8 queens on a chessboard in such a way that no one queen can get 
  19. another queen. I've seen a solution to this problem using the "Icon" language but
  20. I,m interrested in a Pascal solution. I figure 2 arrays [1..8] can represent the
  21. chessboard and I've worked out a procedure on how to make a horizontal,vertical and
  22. both diagonals un-usable upon placement of a queen. The problem is in a recursive
  23. procedure to keep trying the next placement and so on. Anybody have any clues or
  24. has anyone seen this before. Steer me in the right direction!!! 
  25.