## 5.116. differ_from_at_most_k_pos

Origin
Constraint

$\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi }_\mathrm{\pi \pi \pi }\left(\mathrm{\pi Ί},\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1},\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}\right)$

Type
 $\mathrm{\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)$
Arguments
 $\mathrm{\pi Ί}$ $\mathrm{\pi \pi \pi }$ $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}$ $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }$ $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}$ $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }$
Restrictions
 $|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }|\beta ₯1$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi },\mathrm{\pi \pi \pi }\right)$ $\mathrm{\pi Ί}\beta ₯0$ $\mathrm{\pi Ί}\beta €|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}|$ $|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}|=|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}|$
Purpose

Enforce two vectors $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}$ and $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}$ to differ from at most $\mathrm{\pi Ί}$ positions.

Example
$\left(3,β©2,5,2,0βͺ,β©3,6,2,0βͺ\right)$

The $\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi }_\mathrm{\pi \pi \pi }$ constraint holds since the first and second vectors differ from 2 positions, which is less than or equal to $\mathrm{\pi Ί}=3$.

Typical
 $\mathrm{\pi Ί}>0$ $\mathrm{\pi Ί}<|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}|$ $|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}|>1$
Symmetries
• Arguments are permutable w.r.t. permutation $\left(\mathrm{\pi Ί}\right)$ $\left(\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1},\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}\right)$.

• $\mathrm{\pi Ί}$ can be increased to any value $\beta €|\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}|$.

• Items of $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}$ and $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}$ are permutable (same permutation used).

Arg. properties

Contractible wrt. $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{1}$ and $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }\mathtt{2}$ (remove items from same position).

Used in

implied by: $\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi ‘\pi \pi \pi \pi \pi ’}_\mathrm{\pi }_\mathrm{\pi \pi \pi }$Β ($\beta €\mathrm{\pi Ί}$ replaced by $=\mathrm{\pi Ί}$).

Keywords
Arc input(s)

$\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{1}$ $\mathrm{\pi  \pi ΄\pi ²\pi \pi Ύ\pi }\mathtt{2}$

Arc generator
$\mathrm{\pi \pi  \pi \pi ·\pi \pi Ά\pi }$$\left(=\right)\beta ¦\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi \pi \pi \pi }\mathtt{1},\mathrm{\pi \pi \pi \pi \pi \pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$\beta €\mathrm{\pi Ί}$

Graph model

PartsΒ (A) andΒ (B) of FigureΒ 5.116.1 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi }$ graph property, the arcs of the final graph are stressed in bold.