Home / Computer science / Zebra puzzle / Computation
Constraints: Fact 4
The Ukrainian drinks tea.
Using
\begin{align*} a & = x_{5, i, 5} \\ b & = x_{2, 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.NATION, i, Nation.UKRAINIAN]
b = x[Attribute.DRINK, i, Drink.TEA]
model.add_bool_or(a.Not(), b)