Home / Computer science / Zebra puzzle / Computation
Constraints: Fact 6
The Old Gold smoker owns snails.
Using
\begin{align*} a & = x_{3, i, 4} \\ b & = x_{1, i, 4} \\ \end{align*}derive the conjunctive normal form as in Fact 1
\begin{equation*} \forall i \quad (\lnot a \lor b) \end{equation*}and compute
for i in range(m):
a = x[Attribute.CIGARETTES, i, Cigarettes.OLD_GOLD]
b = x[Attribute.ANIMAL, i, Animal.SNAILS]
model.add_bool_or(a.Not(), b)