5.261. min_width_valley

Origin
Constraint

Synonym

$\mathrm{\pi \pi \pi }_\mathrm{\pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi ’}$.

Arguments
 $\mathrm{\pi Ό\pi Έ\pi ½}_\mathrm{\pi \pi Έ\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 ½}_\mathrm{\pi \pi Έ\pi ³\pi \pi ·}\beta ₯0$ $\mathrm{\pi Ό\pi Έ\pi ½}_\mathrm{\pi \pi Έ\pi ³\pi \pi ·}\beta €|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|-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)$
Purpose

Given a sequence $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ constraint $\mathrm{\pi Ό\pi Έ\pi ½}_\mathrm{\pi \pi Έ\pi ³\pi \pi ·}$ to be fixed to the width of the smallest valley, or to 0 if no valley exists.

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

The first constraint holds since the sequence $335542234665555556$ contains two valleys of respective width 5 and 6 (see FigureΒ 5.261.1) and since its argument $\mathrm{\pi Ό\pi Έ\pi ½}_\mathrm{\pi \pi Έ\pi ³\pi \pi ·}$ is fixed to the smallest value 5.

Typical
 $\mathrm{\pi Ό\pi Έ\pi ½}_\mathrm{\pi \pi Έ\pi ³\pi \pi ·}>1$ $|\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }|>2$
Symmetries
• Items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ can be reversed.

• One and the same constant can be added to the $\mathrm{\pi \pi \pi }$ attribute of all items of $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

Arg. properties

Functional dependency: $\mathrm{\pi Ό\pi Έ\pi ½}_\mathrm{\pi \pi Έ\pi ³\pi \pi ·}$ determined by $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$.

Counting
 Length ($n$) 2 3 4 5 6 7 8 Solutions 9 64 625 7776 117649 2097152 43046721

Number of solutions for : domains $0..n$

Length ($n$)2345678
Total9646257776117649209715243046721
 Parameter value

095029517921108869498439791
1-14230320556637117439826327058
2--1002100284204249289363060
3---679170242687223413256
4----44801304522345982
5-----29154968946
6------188628

Solution count for : domains $0..n$

FigureΒ 5.261.2 depicts the automaton associated with the constraint. To each pair of consecutive variables $\left({\mathrm{\pi  \pi °\pi }}_{i},{\mathrm{\pi  \pi °\pi }}_{i+1}\right)$ of the collection $\mathrm{\pi  \pi °\pi \pi Έ\pi °\pi ±\pi »\pi ΄\pi }$ corresponds a signature variable ${S}_{i}$. The following signature constraint links ${\mathrm{\pi  \pi °\pi }}_{i}$, ${\mathrm{\pi  \pi °\pi }}_{i+1}$ and ${S}_{i}$: $\left({\mathrm{\pi  \pi °\pi }}_{i}<{\mathrm{\pi  \pi °\pi }}_{i+1}\beta {S}_{i}=0\right)\beta §\left({\mathrm{\pi  \pi °\pi }}_{i}={\mathrm{\pi  \pi °\pi }}_{i+1}\beta {S}_{i}=1\right)\beta §\left({\mathrm{\pi  \pi °\pi }}_{i}>{\mathrm{\pi  \pi °\pi }}_{i+1}\beta {S}_{i}=2\right)$.