N-queen examples – Discrete Mathematics, Kenneth Rosen (pg-33)

discrete mathematicspropositional-calculus

enter image description here

From the first paragraph and Q1 we see that the author chose i is a row and j column in p(i,j)
Then in Q2, we see that innermost loop is of k, which designates row of second coordinate in Q2.

The description specifies that Q2 asserts that there is at most one queen in each row, but innermost loop makes conjunction of the column values from j+1 to n . How does that make sense?
I have a sense that Q2 asserts for columns, not rows.

enter image description here

It's the opposite, assertion works for rows, at most 1 queen in a row.

I'm trying to wrap my head around this, maybe write down what "loop" would create but not sure where to begin.

Thank you.

Edit:
[Full example] 3

Best Answer

It does appear to me like there's a typo in the second paragraph and the Q2 expression; it seems like it's accidentally flipping between $p(i, k)$ in some places and $p(k, j)$ in others. I'd replace the $p(k, j)$ expressions with $p(i, k)$.

Perhaps there was a copy-paste error from Q3 where $p(k, j)$ appears to be correctly used. Probably a good thing to send in an errata note to the publisher contact.