MaximalRookPlacementCount
The ways to place as many non-attacking rooks as possible on the Ferrers board of the diagram.
✓ checked against that system · ! checked, with disagreements (hover a chip)FindStat
St001659via IntegerPartition✓St001660via SkewPartition✓MaximalRookPlacementCount(partition)The ways to place as many non-attacking rooks as possible on the Ferrers board of the diagram.Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer_partition | skew_partition) -> number | combinatorics | always |
Details
- Defined over
IntegerPartitionas an expression in_x, evaluated by compute-engine — the definition IS the implementation. - Takes a
IntegerPartitionand 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.
Definition
Epsil, as the implementation runs it.
on IntegerPartition, over _x
1 if Length(_x) < 1 else Apply(
(r: list<integer>) => r[Max(Map(
Function(i if r[i] >
0 else 0, i),
Range(
1,
Length(_x) +
1,
),
))],
Fold(
Function(Map(
Function(a[1] if i == 1 else a[i] +
(b -
(i - 2)) *
a[i - 1], i),
Range(1, Length(_x) + 1),
), a, b),
Map(
Function(1 if i == 1 else 0, i),
Range(1, Length(_x) + 1),
),
Map(
Function(_x[Length(_x) - i + 1], i),
Range(1, Length(_x)),
),
),
)on SkewPartition, over _x
1 if Length(_x[1]) == 0 else Apply((lam: list<integer>) => Apply((raw: list<integer>) => Apply(
(mu: list<integer>) => Apply(
(v: list<integer>) => Apply(
(top: integer) => Max(Sum(Map(Function(v[m + 1] if Max(Sum(Map(Function(1 if m %
2 ^
(c + 1) >=
2 ^ c else 0, c), Range(0, Max(lam) - 1))), 0) ==
top else 0, m), Range(0, 2 ^ Max(lam) -
1))), 0),
Max(Map(
Function(Max(Sum(Map(Function(1 if m %
2 ^
(c + 1) >=
2 ^ c else 0, c), Range(0, Max(lam) - 1))), 0) if v[m + 1] >
0 else 0, m),
Range(0, 2 ^ Max(lam) -
1),
)),
),
Fold(
Function(Map(Function(a[m + 1] +
Max(Sum(Map(
Function(a[m -
2 ^ c +
1] if m %
2 ^
(c + 1) >=
2 ^ c else 0, c),
Filter(Range(0, Max(lam) - 1), Function(mu[b] <= c &&
c < lam[b], c)),
)), 0), m), Range(0, 2 ^ Max(lam) -
1)), a, b),
Map(
Function(1 if m == 0 else 0, m),
Range(0, 2 ^ Max(lam) -
1),
),
Range(1, Length(lam)),
),
),
Map(
Function(raw[i] if i <= Length(raw) else 0, i),
Range(1, Length(lam)),
),
), _x[2]), _x[1])Examples
Properties #
About
| Examples | 5 |
|---|---|
| Crosswalk | FindStat ×2 |