DoubleStepVisiblePoints
Points below the path, at the parity of the path's height there, from which the north-east diagonal meets a double fall and the north-west diagonal meets a double rise.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St000683via DyckPath✓DoubleStepVisiblePoints(path)Points below the path, at the parity of the path's height there, from which the north-east diagonal meets a double fall and the north-west diagonal meets a double rise.Typed signatures
| Type | Package | Applies |
|---|---|---|
(dyck_path) -> number | combinatorics | always |
Details
- Defined over
DyckPathas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
DyckPathand 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. - A point (v, j) has j = h - 2m under the path's vertex v of height h. Its north-east diagonal meets the path at a double fall (v, h') with v - j = v' - h'; its north-west diagonal at a double rise with v + j = v' + h'.
Definition
Epsil, as the implementation runs it.
on DyckPath, over _x
0 if Length(_x) < 2 else Apply(
(vp: list<integer>) => Apply(
(doubleRises: list<integer>) => Apply(
(doubleFalls: list<integer>) => Sum(Map(Function(Apply(
(h: number) => 0 if h < 2 else Count(Filter(
Range(1, h),
Function(2m <= h &&
Count(Filter(doubleRises, Function(s ==
v +
(h - 2m), s))) >
0 &&
Count(Filter(doubleFalls, Function(s ==
v -
(h - 2m), s))) >
0, m),
)),
vp[v + 1],
), v), Range(0, Length(_x)))),
Map(
Function(i -
Sum(Map(Function(2 * _x[k] -
1, k), Range(1, i))), i),
Filter(
Range(1, Length(_x) - 1),
Function(_x[i] == 0 &&
_x[i + 1] ==
0, i),
),
),
),
Map(
Function(i +
Sum(Map(
Function(2 * _x[k] -
1, k),
Range(1, i),
)), i),
Filter(
Range(1, Length(_x) - 1),
Function(_x[i] == 1 &&
_x[i + 1] ==
1, i),
),
),
),
Join(
[0],
Map(
Function(
Sum(Map(
Function(
2 *
_x[k] - 1,
k,
),
Range(1, i),
)),
i,
),
Range(1, Length(_x)),
),
),
)Examples
Properties #
About
| Examples | 5 |
|---|---|
| Crosswalk | FindStat |