Skip to content

Parity Constraint

Definition

For three binary decisions y1,y2,y3y_1,y_2,y_3, requiring an even number of yes decisions is equivalent to

y1+y2+y3=2x,x∈{0,1}.y_1+y_2+y_3=2x,\qquad x\in\{0,1\}.

The sum can therefore be 0 or 2, the only even values possible for three binary decisions.


Interpretation

The parity constraint counts yes decisions and requires the count to be even. Three binary decisions sum to at most 33, so the even counts are 00 and 22, and the auxiliary variable x∈{0,1}x\in\{0,1\} in y1+y2+y3=2xy_1+y_2+y_3=2x produces exactly these.

A number line for the sum of three binary variables from 0 to 3, with only the even values 0 and 2 allowed and the odd values 1 and 3 crossed out.

The number line shows the four possible counts. The even ones are reached with x=0x=0 (all three no) and x=1x=1 (exactly two yes); the odd counts 11 and 33 would need x=12x=\tfrac{1}{2} or x=32x=\tfrac{3}{2}, which are not allowed.

The parity condition comes from xx being an integer. If xx is relaxed to a continuous variable with 0≤x≤10\le x\le1, the odd count 11 becomes feasible with x=1/2x=1/2, so evenness is no longer enforced. The bound still excludes count 33, which would need x=3/2x=3/2. If those bounds are also removed, every count cc can be matched by x=c/2x=c/2. An odd count is required by writing 2x+12x+1, and more decisions need a larger integer range for xx.


Key Results

  • When x=0x=0, all three decisions are no.
  • When x=1x=1, exactly two decisions are yes.
  • Allowing xx to be continuous would remove the parity restriction.

Examples

  • (y1,y2,y3)=(1,1,0)(y_1,y_2,y_3)=(1,1,0) is allowed with x=1x=1.
  • (1,1,1)(1,1,1) is excluded because it would require x=3/2x=3/2.

Prerequisites

Sources

Symbols: element of

Last updated: 27 October 2026 11:52