BreakpointGraphCycles
The alternating cycles of the breakpoint graph on 0, ..., n: a black edge from p(i) to p(i-1) and a grey edge from i to i+1, indices cyclic.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000696via Permutation✓BreakpointGraphCycles(p)The alternating cycles of the breakpoint graph on 0, ..., n: a black edge from p(i) to p(i-1) and a grey edge from i to i+1, indices cyclic.Typed signatures
| Type | Package | Applies |
|---|---|---|
(permutation) -> number | combinatorics | always |
Details
- 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. - Each cycle of the black-then-grey successor is one alternating cycle.
Definition
Epsil, as the implementation runs it.
on Permutation, over _x
1 if Length(_x) < 1 else Apply((w: list<integer>) => Apply(
(q: list<integer>) => Count(Filter(
Range(1, Length(_x) + 1),
Function(Fold(
Function(w if w <= 0 else 0 if w == i else -1 if w < i else q[w], w, k),
q[i],
Range(1, Length(_x) + 1, 1),
) ==
0, i),
)),
Map(
Function(w[(Sum(Map(
Function(m if w[m] == i else 0, m),
Range(1, Length(_x) + 1),
)) +
(Length(_x) -
1)) %
(Length(_x) +
1) + 1] %
(Length(_x) +
1) + 1, i),
Range(
1,
Length(_x) +
1,
),
),
), Join(
[1],
Map(
Function(
_x[i] + 1,
i,
),
Range(1, Length(_x)),
),
))Examples
Properties #
About
| Examples | 5 |
|---|---|
| Crosswalk | FindStat |