The THRESHOLD instruction

Zebra puzzles: Glossary of Programming Instructions

The threshold instruction compares a subject to a value in an ordered series. It randomly sets a threshold in the series, beyond which values ​​are false.

This is an easy instruction, recommended for simple zebra puzzles. To use it, at least one ordered series is required. The threshold instruction does not require the series to be regular.

Ordered series: series containing values that are all increasing or all decreasing.
Regular ordered series: increasing or decreasing series whose values are separated by the same interval. The ranking of competitors is a regular increasing series, with interval +1.

Alice arrives before the third.
Bob arrives after the second.
The red jersey arrives after the third.
The competitor who drinks lemon juice arrives before the fourth.

In this example, all rows containing false signs are rows, but they can also be columns.

Designer

Randomly selects an ordered series, an item s forming a threshold in this series, and an item a which will apply this threshold.

If the instruction operates in isolated mode, the designer does not select rows that already contain signs, including Booleans.

Maximum number of executions of this instruction.

Generated formal proposals

a < s
a > s

a: item, s: item forming a threshold