How can we express that exactly one of the 2 variables is true:
(x1⇒¬x2)∧(¬x1⇒x2)
How can we express that at most one of the 2 variables is true:
(x1⇒¬x2)
How can we express that exactly one of the 3 variables is true:
(x1->(¬x2∧¬x3))∧(¬x1⇒(x2⇒¬x3)∧(¬x2⇒x3))
How can we express that at most one of the 3 variables is true:
(x1->(¬x2∧¬x3))∧(¬x1⇒(x2⇒¬x3))
How can we express that exactly one of the 4 variables is true:
(x1->(¬x2∧¬x3∧¬x4))∧(¬x1⇒(x2->(¬x3∧¬x4))∧(¬x2⇒(x3⇒¬x4)∧(¬x3⇒x4)))
How can we express that at most one of the 4 variables is true:
(x1->(¬x2∧¬x3∧¬x4))∧(¬x1⇒(x2->(¬x3∧¬x4))∧(¬x2⇒(x3⇒¬x4)))
How can we express that exactly one of the n variables is true:
(x1->(¬x2∧..∧¬xn))∧(¬x1⇒...))
How can we express that at most one of the n variables is true:
(x1->(¬x2∧..∧¬xn))∧(¬x1⇒...))
Example: N=3
((x0⇒(¬x1∧¬x2))∧(¬x0⇒((x1⇒¬x2)∧(¬x1⇒x2)))) ∧
((x3⇒(¬x4∧¬x5))∧(¬x3⇒((x4⇒¬x5)∧(¬x4⇒x5)))) ∧
((x6⇒(¬x7∧¬x8))∧(¬x6⇒((x7⇒¬x8)∧(¬x7⇒x8)))) ∧
Exactly one queen in each column:
((x0⇒(¬x3∧¬x6))∧(¬x0⇒((x3⇒¬x6)∧(¬x3⇒x6)))) ∧
((x1⇒(¬x4∧¬x7))∧(¬x1⇒((x4⇒¬x7)∧(¬x4⇒x7)))) ∧
((x2⇒(¬x5∧¬x8))∧(¬x2⇒((x5⇒¬x8)∧(¬x5⇒x8)))) ∧
at most one queen in each diagonal:
((x0⇒(¬x4∧¬x8))∧(¬x0⇒(x4⇒¬x8))) ∧
(x1⇒¬x5) ∧
(x3⇒¬x7) ∧
((x2⇒(¬x4∧¬x6))∧(¬x2⇒(x4⇒¬x6))) ∧
(x1⇒¬x3) ∧
(x5⇒¬x7)
The resulting formula is not satisfiable: the problem does not have solution (one cannot put 3 queens in a chessboard 3x3).