Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Trying to solve N-Queens

by Solo (Deacon)
on Sep 09, 2002 at 03:53 UTC ( [id://196147]=note: print w/replies, xml ) Need Help??


in reply to Re: Trying to solve N-Queens
in thread Trying to solve N-Queens

I don't believe it is necessary to check the diagonals of previous columns, since if it were possible for a queen in col 3 to attack the Q in col 1, the reverse is also true... that is, the position the Q in col 3 would have to be in was previously ruled out by the diagonals of Q in col 1.

Replies are listed 'Best First'.
Re: Re: Re: Trying to solve N-Queens
by fokat (Deacon) on Sep 09, 2002 at 14:13 UTC
    I believe this depends in how are the queens placed in the board (ie, how the solutions are searched).

    For this particular case, you're correct, as queens are apparently placed in each row, from left to right.

    Regards.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://196147]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found