5.370. some_equal

DESCRIPTIONLINKSGRAPH
Origin

Derived from πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš

Constraint

πšœπš˜πš–πšŽ_πšŽπššπšžπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Synonyms

πšœπš˜πš–πšŽ_𝚎𝚚, πš—πš˜πš_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš, πš—πš˜πš_πšŠπš•πš•πšπš’πšπš, πš—πš˜πš_πšŠπš•πš•πšπš’πšœπšπš’πš—πšŒπš, πš—πš˜πš_πšπš’πšœπšπš’πš—πšŒπš.

Argument
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšπšŸπšŠπš›)
Restrictions
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>1
Purpose

Enforce at least two variables of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ to be assigned the same value.

Example
(1,4,1,6)

The πšœπš˜πš–πšŽ_πšŽπššπšžπšŠπš• constraint holds since the first and the third variables are both assigned the same value 1.

Typical
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>2
πš—πšŸπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>2
Symmetries
  • Items of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ are permutable.

  • All occurrences of two distinct values of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš› can be swapped; all occurrences of a value of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš› can be renamed to any unused value.

Arg. properties

Extensible wrt. πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Counting
Length (n)2345678
Solutions3405057056112609205683242683841

Number of solutions for πšœπš˜πš–πšŽ_πšŽπššπšžπšŠπš•: domains 0..n

ctrs/some_equal-1-tikz

ctrs/some_equal-2-tikz

Used in

𝚜𝚘𝚏𝚝_πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš_πšŸπšŠπš›.

See also

negation: πšŠπš•πš•πšπš’πšπšπšŽπš›πšŽπš—πš.

Keywords

characteristic of a constraint: sort based reformulation.

constraint type: value constraint.

Arc input(s)

πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚

Arc generator
πΆπΏπΌπ‘„π‘ˆπΈ(<)β†¦πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ1,πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ2)

Arc arity
Arc constraint(s)
πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ1.πšŸπšŠπš›=πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ2.πšŸπšŠπš›
Graph property(ies)
𝐍𝐀𝐑𝐂>0

Graph model

We generate a clique with an equality constraint between each pair of distinct vertices and state that the number of arcs of the final graph should be strictly greater than 0.

PartsΒ (A) andΒ (B) of FigureΒ 5.370.1 respectively show the initial and final graph associated with the Example slot. The πšœπš˜πš–πšŽ_πšŽπššπšžπšŠπš• constraint holds since the final graph has at one arc, i.e.Β two variables are assigned the same value.

Figure 5.370.1. Initial and final graph of the πšœπš˜πš–πšŽ_πšŽπššπšžπšŠπš• constraint
ctrs/some_equalActrs/some_equalB
(a) (b)