## 5.303. or

Origin

Logic

Constraint

$\mathrm{\pi \pi }\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Synonym

$\mathrm{\pi \pi \pi }$.

Arguments
 $\mathrm{\pi  \pi °\pi }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi }-\mathrm{\pi \pi \pi \pi }\right)$
Restrictions
 $\mathrm{\pi  \pi °\pi }\beta ₯0$ $\mathrm{\pi  \pi °\pi }\beta €1$ $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|\beta ₯2$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi },\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }\beta ₯0$ $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }.\mathrm{\pi \pi \pi }\beta €1$
Purpose

Let $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ be a collection of 0-1 variables ${\mathrm{\pi  \pi °\pi }}_{1},{\mathrm{\pi  \pi °\pi }}_{2},\beta ―,{\mathrm{\pi  \pi °\pi }}_{n}$ $\left(n\beta ₯2\right)$. Enforce $\mathrm{\pi  \pi °\pi }={\mathrm{\pi  \pi °\pi }}_{1}\beta ¨{\mathrm{\pi  \pi °\pi }}_{2}\beta ¨\beta ―\beta ¨{\mathrm{\pi  \pi °\pi }}_{n}$.

Example
 $\left(0,β©0,0βͺ\right)$ $\left(1,β©0,1βͺ\right)$ $\left(1,β©1,0βͺ\right)$ $\left(1,β©1,1βͺ\right)$ $\left(1,β©1,0,1βͺ\right)$
Symmetry

Items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ are permutable.

Arg. properties
• Functional dependency: $\mathrm{\pi  \pi °\pi }$ determined by $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

• Contractible wrt. $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ when $\mathrm{\pi  \pi °\pi }=0$.

• Extensible wrt. $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ when $\mathrm{\pi  \pi °\pi }=1$.

• Aggregate: $\mathrm{\pi  \pi °\pi }\left(\beta ¨\right)$, $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\left(\mathrm{\pi \pi \pi \pi \pi }\right)$.

Counting
 Length ($n$) 2 3 4 5 6 7 8 Solutions 4 8 16 32 64 128 256

Number of solutions for $\mathrm{\pi \pi }$: domains $0..n$

Length ($n$)2345678
Total48163264128256
 Parameter value

01111111
137153163127255

Solution count for $\mathrm{\pi \pi }$: domains $0..n$

Systems

reifiedOr in Choco, rel in Gecode, orbool in JaCoP, #\/ in SICStus.

Keywords
Cond. implications

$\beta ’$ $\mathrm{\pi \pi }\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Β Β Β  withΒ  $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>2$

Β Β implies $\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$.

$\beta ’$ $\mathrm{\pi \pi }\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Β Β Β  withΒ  $\mathrm{\pi  \pi °\pi }=0$

Β Β implies $\mathrm{\pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Β Β Β  whenΒ  $\mathrm{\pi  \pi °\pi }=1$.

$\beta ’$ $\mathrm{\pi \pi }\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Β Β Β  withΒ  $\mathrm{\pi  \pi °\pi }=1$

Β Β implies $\mathrm{\pi \pi \pi }$$\left(\mathrm{\pi  \pi °\pi },\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\right)$

Β Β Β  whenΒ  $\mathrm{\pi  \pi °\pi }=0$.

Automaton

FigureΒ 5.303.1 depicts a first deterministic automaton without counter associated with the $\mathrm{\pi \pi }$ constraint. To the first argument $\mathrm{\pi  \pi °\pi }$ of the $\mathrm{\pi \pi }$ constraint corresponds the first signature variable. To each variable ${\mathrm{\pi  \pi °\pi }}_{i}$ of the second argument $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ of the $\mathrm{\pi \pi }$ constraint corresponds the next signature variable. There is no signature constraint.

FigureΒ 5.303.3 depicts a second deterministic automaton with one counter associated with the $\mathrm{\pi \pi }$ constraint, where the argument $\mathrm{\pi  \pi °\pi }$ is unified to the final value of the counter.