3 ms·
Yes. You need to select one piece from each row. Selections in different rows cannot have an O and X of the same color. If you think of this in terms of 3-SAT,
by vivegi 5y ago
Yes. You need to select one piece from each row.
Selections in different rows cannot have an O and X of the same color.
If you think of this in terms of 3-SAT, the O's are positive literals (like a, b, c etc.,) and X's are negative literals (like a', b', c' etc.,) and the color is used to denote the underlying variable (ie., a, b etc.,). Each row is a disjunctive clause (eg: a + b' + c, where + denotes Logical OR or disjunction). Consecutive rows represent a conjunction (eg: (a + b' + c).(a + b + c').
The condition ensures that we don't permit a selection such as b.b' or c.c' since they would evaluate to False in Boolean algebra. The goal is to get a selection that doesn't contain a literal and its complement.
Due to the distributive law in Boolean algebra, solving SAT is equivalent to finding a term that doesn't vanish to False when the formula is fully expanded out.
Thanks for trying it out.