## 5.97. deepest_valley

 DESCRIPTION LINKS AUTOMATON
Origin

Derived from $\mathrm{𝚟𝚊𝚕𝚕𝚎𝚢}$.

Constraint

$\mathrm{𝚍𝚎𝚎𝚙𝚎𝚜𝚝}_\mathrm{𝚟𝚊𝚕𝚕𝚎𝚢}\left(\mathrm{𝙳𝙴𝙿𝚃𝙷},\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}\right)$

Arguments
 $\mathrm{𝙳𝙴𝙿𝚃𝙷}$ $\mathrm{𝚍𝚟𝚊𝚛}$ $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ $\mathrm{𝚌𝚘𝚕𝚕𝚎𝚌𝚝𝚒𝚘𝚗}\left(\mathrm{𝚟𝚊𝚛}-\mathrm{𝚍𝚟𝚊𝚛}\right)$
Restrictions
 $\mathrm{𝙳𝙴𝙿𝚃𝙷}\ge 0$ $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}.\mathrm{𝚟𝚊𝚛}\ge 0$ $\mathrm{𝚛𝚎𝚚𝚞𝚒𝚛𝚎𝚍}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂},\mathrm{𝚟𝚊𝚛}\right)$
Purpose

A variable ${V}_{k}$ $\left(1 of the sequence of variables $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}={V}_{1},...,{V}_{m}$ is a valley if and only if there exists an $i$ $\left(1 such that ${V}_{i-1}>{V}_{i}$ and ${V}_{i}={V}_{i+1}=...={V}_{k}$ and ${V}_{k}<{V}_{k+1}$. $\mathrm{𝙳𝙴𝙿𝚃𝙷}$ is the minimum value of the valley variables. If no such variable exists $\mathrm{𝙳𝙴𝙿𝚃𝙷}$ is equal to the default value $\mathrm{𝙼𝙰𝚇𝙸𝙽𝚃}$.

Example
$\left(\begin{array}{c}2,〈\begin{array}{c}\mathrm{𝚟𝚊𝚛}-5,\hfill \\ \mathrm{𝚟𝚊𝚛}-3,\hfill \\ \mathrm{𝚟𝚊𝚛}-4,\hfill \\ \mathrm{𝚟𝚊𝚛}-8,\hfill \\ \mathrm{𝚟𝚊𝚛}-8,\hfill \\ \mathrm{𝚟𝚊𝚛}-2,\hfill \\ \mathrm{𝚟𝚊𝚛}-7,\hfill \\ \mathrm{𝚟𝚊𝚛}-1\hfill \end{array}〉\hfill \end{array}\right)$

The $\mathrm{𝚍𝚎𝚎𝚙𝚎𝚜𝚝}_\mathrm{𝚟𝚊𝚕𝚕𝚎𝚢}$ constraint holds since 2 is the deepest valley of the sequence $53488271$.

##### Figure 5.97.1. The sequence and its deepest valley Typical
 $\mathrm{𝙳𝙴𝙿𝚃𝙷}\le$$\mathrm{𝚖𝚊𝚡𝚟𝚊𝚕}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}.\mathrm{𝚟𝚊𝚛}\right)$ $|\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}|>1$ $\mathrm{𝚛𝚊𝚗𝚐𝚎}$$\left(\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}.\mathrm{𝚟𝚊𝚛}\right)>1$
Symmetry

Items of $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ can be reversed.

See also
Keywords
Automaton

Figure 5.97.2 depicts the automaton associated with the $\mathrm{𝚍𝚎𝚎𝚙𝚎𝚜𝚝}_\mathrm{𝚟𝚊𝚕𝚕𝚎𝚢}$ constraint. To each pair of consecutive variables $\left({\mathrm{𝚅𝙰𝚁}}_{i},{\mathrm{𝚅𝙰𝚁}}_{i+1}\right)$ of the collection $\mathrm{𝚅𝙰𝚁𝙸𝙰𝙱𝙻𝙴𝚂}$ corresponds a signature variable ${𝚂}_{i}$. The following signature constraint links ${\mathrm{𝚅𝙰𝚁}}_{i}$, ${\mathrm{𝚅𝙰𝚁}}_{i+1}$ and ${𝚂}_{i}$:

${\mathrm{𝚅𝙰𝚁}}_{i}<{\mathrm{𝚅𝙰𝚁}}_{i+1}⇔{𝚂}_{i}=0\wedge {\mathrm{𝚅𝙰𝚁}}_{i}={\mathrm{𝚅𝙰𝚁}}_{i+1}⇔{𝚂}_{i}=1\wedge {\mathrm{𝚅𝙰𝚁}}_{i}>{\mathrm{𝚅𝙰𝚁}}_{i+1}⇔{𝚂}_{i}=2$.

##### Figure 5.97.2. Automaton of the $\mathrm{𝚍𝚎𝚎𝚙𝚎𝚜𝚝}_\mathrm{𝚟𝚊𝚕𝚕𝚎𝚢}$ constraint ##### Figure 5.97.3. Hypergraph of the reformulation corresponding to the automaton of the $\mathrm{𝚍𝚎𝚎𝚙𝚎𝚜𝚝}_\mathrm{𝚟𝚊𝚕𝚕𝚎𝚢}$ constraint 