Skip to content

CoarseningCount ​

The partitions that coarsen this one, whose parts subdivide to give its. Itself included.

✓ checked against that system · ! checked, with disagreements (hover a chip)FindStatSt000346via IntegerPartition✓
CoarseningCount(partition)The partitions that coarsen this one, whose parts subdivide to give its. 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 1 if Sum(_x) < 2 else Apply(
                                                      (mj: list<integer>) => Apply(
                                                                                    (ma: list<integer>) => Fold(
                                                                                                                 Function(Apply((fl: list<integer>) => Apply((ways: list<integer>) => Apply(
                                                                                                                                                                                             (ap: list<integer>) => Apply(
                                                                                                                                                                                                                           (cm: list<integer>) => Apply(
                                                                                                                                                                                                                                                         (sg: list<integer>) => Apply(
                                                                                                                                                                                                                                                                                       (kp: list<integer>) => [Map(Function(Apply(
                                                                                                                                                                                                                                                                                                                                   (r: integer) => Apply((c: integer) => cm[(kp[r] - 1) *
                                                                                                                                                                                                                                                                                                                                                                            Sum(_x) +
                                                                                                                                                                                                                                                                                                                                                                            c], 1 +
                                                                                                                                                                                                                                                                                                                                                                               (g - 1) %
                                                                                                                                                                                                                                                                                                                                                                               Sum(_x)),
                                                                                                                                                                                                                                                                                                                                   1 +
                                                                                                                                                                                                                                                                                                                                   (g - 1 -
                                                                                                                                                                                                                                                                                                                                    (g - 1) %
                                                                                                                                                                                                                                                                                                                                    Sum(_x)) /
                                                                                                                                                                                                                                                                                                                                   Sum(_x),
                                                                                                                                                                                                                                                                                                                                 ), g), Range(1, Length(kp) * Sum(_x))), [1], [a[3][1] + Length(kp)]],
                                                                                                                                                                                                                                                                                       Filter(
                                                                                                                                                                                                                                                                                               Range(1, Length(ap)),
                                                                                                                                                                                                                                                                                               Function(Count(Filter(
                                                                                                                                                                                                                                                                                                                      Range(1, Length(ap)),
                                                                                                                                                                                                                                                                                                                      Function(u < s &&
                                                                                                                                                                                                                                                                                                                               (Sum(Map(Function(Abs(cm[(s - 1) *
                                                                                                                                                                                                                                                                                                                                                        Sum(_x) +
                                                                                                                                                                                                                                                                                                                                                        k] -
                                                                                                                                                                                                                                                                                                                                                     cm[(u - 1) *
                                                                                                                                                                                                                                                                                                                                                        Sum(_x) +
                                                                                                                                                                                                                                                                                                                                                        k]), k), Range(1, Sum(_x)))) ==
                                                                                                                                                                                                                                                                                                                                0 if sg[s] == sg[u] else 1 == 0), u),
                                                                                                                                                                                                                                                                                                                    )) ==
                                                                                                                                                                                                                                                                                                        0, s),
                                                                                                                                                                                                                                                                                             ),
                                                                                                                                                                                                                                                                                     ),
                                                                                                                                                                                                                                                         Map(Function(Sum(Map(Function(cm[(s - 1) *
                                                                                                                                                                                                                                                                                          Sum(_x) +
                                                                                                                                                                                                                                                                                          k] *
                                                                                                                                                                                                                                                                                       (k * k +
                                                                                                                                                                                                                                                                                        1), k), Range(1, Sum(_x)))), s), Range(1, Length(ap))),
                                                                                                                                                                                                                                                       ),
                                                                                                                                                                                                                           Map(Function(Apply(
                                                                                                                                                                                                                                               (s: integer) => Apply((c: integer) => Apply(
                                                                                                                                                                                                                                                                                            (e: integer) => Apply((q: integer) => fl[(e - 1) *
                                                                                                                                                                                                                                                                                                                                     Sum(_x) +
                                                                                                                                                                                                                                                                                                                                     c] -
                                                                                                                                                                                                                                                                                                                                  (1 if c == mj[q] else 0) -
                                                                                                                                                                                                                                                                                                                                  (1 if c == ma[q] else 0) +
                                                                                                                                                                                                                                                                                                                                  (1 if c ==
                                                                                                                                                                                                                                                                                                                                        mj[q] + ma[q] else 0), 1 +
                                                                                                                                                                                                                                                                                                                                    (ap[s] - 1) %
                                                                                                                                                                                                                                                                                                                                    Length(mj)),
                                                                                                                                                                                                                                                                                            1 +
                                                                                                                                                                                                                                                                                            (ap[s] - 1 -
                                                                                                                                                                                                                                                                                             (ap[s] - 1) %
                                                                                                                                                                                                                                                                                             Length(mj)) /
                                                                                                                                                                                                                                                                                            Length(mj),
                                                                                                                                                                                                                                                                                          ), 1 +
                                                                                                                                                                                                                                                                                            (g - 1) %
                                                                                                                                                                                                                                                                                            Sum(_x)),
                                                                                                                                                                                                                                               1 +
                                                                                                                                                                                                                                               (g - 1 -
                                                                                                                                                                                                                                                (g - 1) %
                                                                                                                                                                                                                                                Sum(_x)) /
                                                                                                                                                                                                                                               Sum(_x),
                                                                                                                                                                                                                                             ), g), Range(1, Length(ap) * Sum(_x))),
                                                                                                                                                                                                                         ),
                                                                                                                                                                                             Filter(
                                                                                                                                                                                                     Range(1, (Length(fl) -
                                                                                                                                                                                                               Length(fl) % Sum(_x)) /
                                                                                                                                                                                                              Sum(_x) *
                                                                                                                                                                                                              Length(mj)),
                                                                                                                                                                                                     Function(Apply(
                                                                                                                                                                                                                     (e: integer) => Apply((q: integer) => fl[(e - 1) *
                                                                                                                                                                                                                                                              Sum(_x) +
                                                                                                                                                                                                                                                              mj[q]] >=
                                                                                                                                                                                                                                                           1 +
                                                                                                                                                                                                                                                           (1 if mj[q] == ma[q] else 0) &&
                                                                                                                                                                                                                                                           fl[(e - 1) *
                                                                                                                                                                                                                                                              Sum(_x) +
                                                                                                                                                                                                                                                              ma[q]] >=
                                                                                                                                                                                                                                                           1 +
                                                                                                                                                                                                                                                           (1 if mj[q] == ma[q] else 0), 1 +
                                                                                                                                                                                                                                                             (t - 1) %
                                                                                                                                                                                                                                                             Length(mj)),
                                                                                                                                                                                                                     1 +
                                                                                                                                                                                                                     (t - 1 -
                                                                                                                                                                                                                      (t - 1) %
                                                                                                                                                                                                                      Length(mj)) /
                                                                                                                                                                                                                     Length(mj),
                                                                                                                                                                                                                   ), t),
                                                                                                                                                                                                   ),
                                                                                                                                                                                           ), a[2]), a[1]), a, b),
                                                                                                                 [Map(Function(Count(Filter(
                                                                                                                                             Range(1, Length(_x)),
                                                                                                                                             Function(_x[i] == k, i),
                                                                                                                                           )), k), Range(1, Sum(_x))), [1], [1]],
                                                                                                                 Range(1, Length(_x) - 1, 1),
                                                                                                               ),
                                                                                    Flatten(Map(
                                                                                                 Function(Map(
                                                                                                               Function(pb, pb),
                                                                                                               Range(pa, Sum(_x) - pa),
                                                                                                             ), pa),
                                                                                                 Range(1, (Sum(_x) -
                                                                                                           Sum(_x) % 2) /
                                                                                                          2),
                                                                                               ), 1),
                                                                                  ),
                                                      Flatten(Map(
                                                                   Function(Map(
                                                                                 Function(pa, pb),
                                                                                 Range(pa, Sum(_x) - pa),
                                                                               ), pa),
                                                                   Range(
                                                                          1,
                                                                          (Sum(_x) -
                                                                           Sum(_x) %
                                                                           2) / 2,
                                                                        ),
                                                                 ), 1),
                                                    )[3][1]

Examples

Basic #

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

live ↗
InCoarseningCount(IntegerPartition⁡([4,2,1]))\mathrm{CoarseningCount}({\operatorname{IntegerPartition}}([4, 2, 1]))Out55

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

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

FindStat's value for [1]

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

Known value · FindStat St000346

FindStat's value for [2]

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

Known value · FindStat St000346

FindStat's value for [3]

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

Known value · FindStat St000346

About
Examples5
CrosswalkFindStat