CrossingsPlusTwiceNestings
The crossings plus twice the nestings.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000043via PerfectMatching✓CrossingsPlusTwiceNestings(partition)The crossings plus twice the nestings.Typed signatures
| Type | Package | Applies |
|---|---|---|
(perfect_matching) -> number | combinatorics | always |
Details
- Defined over
PerfectMatchingas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
PerfectMatchingand nothing else — it reads values against their positions, or walks the orbits, so it needs the bijection. Applying it to a bare list is a type error, not a wrong answer. - FindStat's St000043. For a pair opening before another, the other opens inside it when it crosses or nests, and closes inside it when it nests, so 1 for the first and 2 for both.
Definition
Epsil, as the implementation runs it.
on PerfectMatching, over _x
0 if Length(_x) < 1 else Apply((openers: list<integer>) => Apply(
(closers: list<integer>) => Max(Sum(Map(Function(Sum(Map(
Function((1 if openers[j] < closers[i] else 0) +
(1 if closers[j] < closers[i] else 0), j),
Filter(
Range(1, Length(_x)),
Function(j > i, j),
),
)), i), Range(1, Length(_x)))), 0),
Map(
Function(Last(b), b),
_x,
),
), Map(
Function(b[1], b),
_x,
))Examples
Properties #
About
| Examples | 4 |
|---|---|
| Crosswalk | FindStat |