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.