Crossings
SetPartition: pairs of arcs a < b < c < d with a~c and b~d. Permutation: pairs i, j with i < j <= p(i) < p(j) or p(i) < p(j) < i < j.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000042via PerfectMatching✓St000039via Permutation✓St000232via SetPartition✓Crossings(p)SetPartition: pairs of arcs a < b < c < d with a~c and b~d. Permutation: pairs i, j with i < j <= p(i) < p(j) or p(i) < p(j) < i < j.Typed signatures
| Type | Package | Applies |
|---|---|---|
(permutation | set_partition) -> number | combinatorics | always |
Details
- Defined over
SetPartitionas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
SetPartitionand 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. - Read off the standard arc representation: within each block, consecutive elements are linked, and a crossing is two arcs whose spans interleave rather than nest or sit apart.
- Defined over
Permutationas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
Permutationand 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. - Crossings of the arcs of the permutation diagram (Corteel).
Definition
Epsil, as the implementation runs it.
on Permutation, over _x
0 if Length(_x) < 1 else Sum(Map(Function(Count(Filter(
Range(1, Length(_x)),
Function(i < j && j <=
_x[i] && _x[i] <
_x[j] ||
_x[i] < _x[j] &&
_x[j] < i && i < j, j),
)), i), Range(
1,
Length(_x),
)))on SetPartition, over _x
0 if Length(Flatten(Map(Function(Most(b), b), _x))) < 2 else Sum(Map(
Function(Count(Filter(
Range(
i + 1,
Length(Flatten(Map(Function(Most(b), b), _x))),
1,
),
Function([Max(
Flatten(Map(Function(Most(b), b), _x))[i],
Flatten(Map(Function(Most(b), b), _x))[j],
) <
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j]) &&
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j]) <
(Flatten(Map(Function(Rest(b), b), _x))[j] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[i]), Max(
Flatten(Map(Function(Most(b), b), _x))[i],
Flatten(Map(Function(Most(b), b), _x))[j],
) <
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j]) &&
(Flatten(Map(Function(Rest(b), b), _x))[j] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[i]) <
(Flatten(Map(Function(Rest(b), b), _x))[i] if Flatten(Map(Function(Most(b), b), _x))[i] <
Flatten(Map(Function(Most(b), b), _x))[j] else Flatten(Map(Function(Rest(b), b), _x))[j])][1], j),
)), i),
Range(
1,
Length(Flatten(Map(Function(Most(b), b), _x))),
1,
),
))Examples
Basic #
Properties #
About
| Examples | 10 |
|---|---|
| Checked against | SageMath 5 agree |
| Crosswalk | FindStat ×3 |