5.156. first_value_diff_0

DESCRIPTIONLINKSAUTOMATON
Origin

Paparazzi puzzle

Constraint

πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_0(πš…π™°πš,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Synonyms

πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_πšπš›πš˜πš–_0, πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπšπšŽπš›πšŽπš—πš_πšπš›πš˜πš–_0.

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

πš…π™°πš is equal to the first non-zero variable of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Example
(8,0,0,8,0,5)
(4,4,0,8,0,5)
Typical
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|>1
πš–πš’πš—πšŸπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)<0βˆ¨πš–πšŠπš‘πšŸπšŠπš•(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>1
|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|-πšŠπš–πš˜πš—πš_πšπš’πšπš_0(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)β‰₯1
⋁|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|≀4,|πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚|-πšŠπš–πš˜πš—πš_πšπš’πšπš_0(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.πšŸπšŠπš›)>1
Arg. properties

Functional dependency: πš…π™°πš determined by πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

Counting
Length (n)2345678
Solutions8636247775117648209715143046720

Number of solutions for πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_0: domains 0..n

ctrs/first_value_diff_0-1-tikz

ctrs/first_value_diff_0-2-tikz

Length (n)2345678
Total8636247775117648209715143046720
Parameter
value

14211561555196082995935380840
24211561555196082995935380840
3-211561555196082995935380840
4--1561555196082995935380840
5---1555196082995935380840
6----196082995935380840
7-----2995935380840
8------5380840

Solution count for πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_0: domains 0..n

ctrs/first_value_diff_0-3-tikz

ctrs/first_value_diff_0-4-tikz

See also

implies: πš‹πšŽπšπš πšŽπšŽπš—_πš–πš’πš—_πš–πšŠπš‘.

Keywords

characteristic of a constraint: joker value, automaton, automaton with counters.

modelling: functional dependency.

Automaton

FigureΒ 5.156.1 depicts an automaton that only accepts all the solutions to the πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_0 constraint. This automaton uses a counter in order to record the value of the first non-zero variable πš…π™°πš i already encountered. To each variable πš…π™°πš i of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ corresponds a 0-1 signature variable S i . The following signature constraint links πš…π™°πš i and S i : πš…π™°πš i β‰ 0⇔S i .

Figure 5.156.1. Automaton (with one counter) of the πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_0 constraint
ctrs/first_value_diff_0-5-tikz
Figure 5.156.2. Hypergraph of the reformulation corresponding to the automaton (with one counter) of the πšπš’πš›πšœπš_πšŸπšŠπš•πšžπšŽ_πšπš’πšπš_0 constraint
ctrs/first_value_diff_0-6-tikz