> The selected pieces must not contain both a and of the same color.
The following example shows a couple X's selected with the same color in different rows. Are you trying to say O's and X's cannot share a color?
> The selected pieces must not contain both a and of the same color.
The following example shows a couple X's selected with the same color in different rows. Are you trying to say O's and X's cannot share a 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.