Skip to content

BulgarianSolitaireOrbitSize ​

The partitions that Bulgarian solitaire (remove the first column, insert it as a row) visits from this one, itself included.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt001914via IntegerPartition✓
BulgarianSolitaireOrbitSize(partition)The partitions that Bulgarian solitaire (remove the first column, insert it as a row) visits from this one, itself included.
Typed signatures
TypePackageApplies
(integer_partition) -> numbercombinatoricsalways

Domain: Partition statistics

Details
  • Defined over IntegerPartition as an expression in _x, evaluated by compute-engine — the definition IS the implementation.
  • Takes a IntegerPartition and 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(
                                (c: list<integer>) => Apply(
                                                             (p: integer) => Sum(Fold(
                                                                                       Function([
                                                                                                  Map(Function((a[1][j + 1] if j < Sum(_x) else 0) +
                                                                                                               (1 if j == Sum(a[1]) else 0), j), Range(1, Sum(_x))),
                                                                                                  Map(Function((a[2][j + 1] if j < Sum(_x) else 0) +
                                                                                                               (1 if j == Sum(a[2]) else 0), j), Range(1, Sum(_x))),
                                                                                                  [a[3][1] +
                                                                                                   Min(1, Sum(Map(
                                                                                                                   Function(Abs(a[1][j] - a[2][j]), j),
                                                                                                                   Range(1, Sum(_x)),
                                                                                                                 )))],
                                                                                                ], a, b),
                                                                                       [
                                                                                         Map(
                                                                                              Function(Count(Filter(
                                                                                                                     Range(1, Length(_x)),
                                                                                                                     Function(_x[p] == j, p),
                                                                                                                   )), j),
                                                                                              Range(1, Sum(_x)),
                                                                                            ),
                                                                                         Fold(
                                                                                               Function(Map(Function((a[j + 1] if j < Sum(_x) else 0) +
                                                                                                                     (1 if j == Sum(a) else 0), j), Range(1, Sum(_x))), a, b),
                                                                                               Map(
                                                                                                    Function(Count(Filter(
                                                                                                                           Range(1, Length(_x)),
                                                                                                                           Function(_x[p] == j, p),
                                                                                                                         )), j),
                                                                                                    Range(1, Sum(_x)),
                                                                                                  ),
                                                                                               Range(1, p, 1),
                                                                                             ),
                                                                                         [0],
                                                                                       ],
                                                                                       Range(1, Sum(_x) *
                                                                                                (Sum(_x) + 1) +
                                                                                                1, 1),
                                                                                     )[3]),
                                                             Min(Filter(
                                                                         Range(1, Sum(_x)),
                                                                         Function(Sum(Map(Function(Abs(Fold(
                                                                                                             Function(Map(Function((a[j + 1] if j < Sum(_x) else 0) +
                                                                                                                                   (1 if j == Sum(a) else 0), j), Range(1, Sum(_x))), a, b),
                                                                                                             c,
                                                                                                             Range(1, l, 1),
                                                                                                           )[j] -
                                                                                                       c[j]), j), Range(1, Sum(_x)))) ==
                                                                                  0, l),
                                                                       )),
                                                           ) + Min(Filter(
                                                                          Range(1, Sum(_x)),
                                                                          Function(Sum(Map(Function(Abs(Fold(
                                                                                                              Function(Map(Function((a[j + 1] if j < Sum(_x) else 0) +
                                                                                                                                    (1 if j == Sum(a) else 0), j), Range(1, Sum(_x))), a, b),
                                                                                                              c,
                                                                                                              Range(1, l, 1),
                                                                                                            )[j] -
                                                                                                        c[j]), j), Range(1, Sum(_x)))) ==
                                                                                   0, l),
                                                                        )),
                                Fold(
                                      Function(Map(Function((a[j + 1] if j <
                                                                         Sum(_x) else 0) +
                                                            (1 if j == Sum(a) else 0), j), Range(
                                                                         1,
                                                                         Sum(_x),
                                                                       )), a, b),
                                      Map(
                                           Function(Count(Filter(
                                                                  Range(
                                                                         1,
                                                                         Length(_x),
                                                                       ),
                                                                  Function(_x[p] ==
                                                                           j, p),
                                                                )), j),
                                           Range(1, Sum(_x)),
                                         ),
                                      Range(1, Sum(_x) * (Sum(_x) + 1), 1),
                                    ),
                              )

Examples

Basic #

the partition 4+2+14 + 2 + 1 of 77

live ↗
InBulgarianSolitaireOrbitSize(IntegerPartition⁡([4,2,1]))\mathrm{BulgarianSolitaireOrbitSize}({\operatorname{IntegerPartition}}([4, 2, 1]))Out44

the partition 3+3+13 + 3 + 1 of 77

live ↗
InBulgarianSolitaireOrbitSize(IntegerPartition⁡([3,3,1]))\mathrm{BulgarianSolitaireOrbitSize}({\operatorname{IntegerPartition}}([3, 3, 1]))Out44
Properties #

FindStat's value for [1]

live ↗
InCombinatorialStat(IntegerPartition⁡([1]),BulgarianSolitaireOrbitSize)\mathrm{CombinatorialStat}({\operatorname{IntegerPartition}}([1]), \text{BulgarianSolitaireOrbitSize})Out11

Known value · FindStat St001914

FindStat's value for [2]

live ↗
InCombinatorialStat(IntegerPartition⁡([2]),BulgarianSolitaireOrbitSize)\mathrm{CombinatorialStat}({\operatorname{IntegerPartition}}([2]), \text{BulgarianSolitaireOrbitSize})Out22

Known value · FindStat St001914

FindStat's value for [3]

live ↗
InCombinatorialStat(IntegerPartition⁡([3]),BulgarianSolitaireOrbitSize)\mathrm{CombinatorialStat}({\operatorname{IntegerPartition}}([3]), \text{BulgarianSolitaireOrbitSize})Out22

Known value · FindStat St001914

About
Examples5
CrosswalkFindStat