Skip to content

LargestPartPartitions ​

The partitions of nn whose largest part is exactly mm.

LargestPartPartitions(n, m)the partitions of nn whose largest part is exactly mm
Typed signatures
TypePackageApplies
(integer<0..>, integer<0..>) -> indexed_collection<integer_partition>combinatoricsalways

Domain: Collections

Details
  • Count is row nn of the triangle of partitions by largest part (A008284); m=0m = 0 only admits the empty partition of n=0n = 0.
  • Each element is [m,…][m, …]: mm followed by a partition of n−mn-m with every part ≤m\le m.

Definition

Epsil, as the implementation runs it.

count(_n, _m)

_tables[_n * 2 * (_n + 1) + (_n + 1 if _m >= 1 else 0) + Min(_m, _n) + 1]

unrank(_n, _m, _r)

Drop(Fold(
           Function(Apply((pw_m: integer) => Apply((pw_c: integer) => Apply((pw_r: integer) => pw_u if pw_m == 0 else Apply(
                                                                                                                             (pw_chosen: list<integer>) => Join(
                                                                                                                                                                 [pw_m - pw_chosen[2], pw_chosen[2], pw_chosen[1]],
                                                                                                                                                                 Drop(pw_u, 3),
                                                                                                                                                                 [pw_chosen[2]],
                                                                                                                                                               ),
                                                                                                                             Fold(
                                                                                                                                   Function(pw_pick if pw_pick[2] != 0 else Apply(
                                                                                                                                                                                   (pw_k: integer) => [pw_pick[1], pw_p] if pw_pick[1] < pw_k else [pw_pick[1] - pw_k, 0],
                                                                                                                                                                                   _tables[(pw_m - pw_p) *
                                                                                                                                                                                           2 *
                                                                                                                                                                                           (_n + 1) + pw_p + 1],
                                                                                                                                                                                 ) if (pw_c -
                                                                                                                                                                                      pw_c %
                                                                                                                                                                                      (_n + 1)) /
                                                                                                                                                                                     (_n + 1) ==
                                                                                                                                                                                     0 ||
                                                                                                                                                                                     pw_p == _m else pw_pick, pw_pick, pw_p),
                                                                                                                                   [pw_r, 0],
                                                                                                                                   Range(Min(pw_m, pw_c %
                                                                                                                                                   (_n + 1)), 1, -1),
                                                                                                                                 ),
                                                                                                                           ), pw_u[3]), pw_u[2]), pw_u[1]), pw_u, pw_i),
           [_n, (_n + 1 if _m >= 1 else 0) + Min(_m, _n), _r],
           Range(1, _n, 1),
         ), 3)

rank(_n, _m, _x)

Fold(
      Function(
                Apply((pw_r: integer) => Apply((pw_m: integer) => Apply((pw_c: integer) => [pw_r +
                                                                                            Fold(
                                                                                                  Function(pw_s +
                                                                                                           (_tables[(pw_m - pw_q) *
                                                                                                                    2 *
                                                                                                                    (_n + 1) + pw_q + 1] if (pw_c -
                                                                                                                                     pw_c %
                                                                                                                                     (_n + 1)) /
                                                                                                                                    (_n + 1) ==
                                                                                                                                    0 ||
                                                                                                                                    pw_q == _m else 0), pw_s, pw_q),
                                                                                                  0,
                                                                                                  Range(
                                                                                                         pw_x + 1,
                                                                                                         Min(pw_m, pw_c %
                                                                                                                   (_n + 1)),
                                                                                                         1,
                                                                                                       ),
                                                                                                ), pw_m - pw_x, pw_x], pw_a[3]), pw_a[2]), pw_a[1]),
                pw_a,
                pw_x,
              ),
      [0, _n, (_n + 1 if _m >= 1 else 0) + Min(_m, _n)],
      _x,
    )[1]

valid(_n, _m, _x)

Apply(
       (pw_end: list<integer>) => pw_end[1] == 1 && pw_end[2] == 0 && (1 if (pw_end[3] -
                                                                             pw_end[3] %
                                                                             (_n +
                                                                              1)) /
                                                                            (_n +
                                                                             1) ==
                                                                            0 else 0) !=
                                                                      0,
       Fold(
             Function(Apply((pw_f: integer) => Apply((pw_m: integer) => Apply(
                                                                               (pw_c: integer) => [1, pw_m - pw_y, pw_y] if pw_f == 1 &&
                                                                                                                            pw_y >= 1 &&
                                                                                                                            pw_y <=
                                                                                                                            Min(pw_m, pw_c %
                                                                                                                                      (_n + 1)) &&
                                                                                                                            ((pw_c -
                                                                                                                              pw_c %
                                                                                                                              (_n + 1)) /
                                                                                                                             (_n + 1) ==
                                                                                                                             0 ||
                                                                                                                             pw_y == _m) else [0, 0, 0],
                                                                               pw_v[3],
                                                                             ), pw_v[2]), pw_v[1]), pw_v, pw_y),
             [1, _n, (_n + 1 if _m >= 1 else 0) + Min(_m, _n)],
             _x,
           ),
     )

tables(_n, _m)

Fold(Function(
               Join(
                     pw_t,
                     Fold(Function(
                                    ReplaceAt(
                                               pw_row,
                                               pw_c + 1,
                                               Fold(
                                                     Function(
                                                               pw_a +
                                                               (pw_t[(pw_s -
                                                                      pw_p) * 2 * (_n +
                                                                               1) +
                                                                     pw_p + 1] if (pw_c -
                                                                           pw_c %
                                                                           (_n +
                                                                            1)) /
                                                                          (_n +
                                                                           1) == 0 ||
                                                                          pw_p ==
                                                                          _m else 0),
                                                               pw_a,
                                                               pw_p,
                                                             ),
                                                     0,
                                                     Range(1, Min(pw_s, pw_c %
                                                                        (_n + 1)), 1),
                                                   ),
                                             ),
                                    pw_row,
                                    pw_c,
                                  ), Map(
                                         Function(0, pw_z),
                                         Range(0, 2 * (_n + 1) - 1, 1),
                                       ), Range(0, 2 * (_n + 1) - 1, 1)),
                   ),
               pw_t,
               pw_s,
             ), Fold(
                     Function(ReplaceAt(
                                         pw_row,
                                         pw_c + 1,
                                         1 if (pw_c - pw_c % (_n + 1)) /
                                              (_n + 1) == 0 else 0,
                                       ), pw_row, pw_c),
                     Map(Function(0, pw_z), Range(0, 2 * (_n + 1) - 1, 1)),
                     Range(0, 2 * (_n + 1) - 1, 1),
                   ), Range(1, _n + 1 - 1, 1))

Statistics

On IntegerPartition, called as CombinatorialStat(x, "Name").

Maps

Into and out of IntegerPartition, called as CombinatorialMap(x, "Name"). Properties are the laws we state and what FindStat records.

From IntegerPartition

  • BinaryWordIntegerPartition → BinaryWordInjectionMp00095The shape's boundary read from the first row down: 1 for a step down, 0 for a step left.
  • BulgarianSolitaireIntegerPartition → IntegerPartitionGraded mapMp00308A move of Bulgarian solitaire: the first column of the Ferrers diagram becomes a new row.
  • GlaisherFranklinIntegerPartition → IntegerPartitionbijectioninverseBijectionGraded mapMp00312The Glaisher-Franklin bijection: even part sizes halved become repeated parts, and repeated odd parts merge into their binary multiples.
  • InitialTableauIntegerPartition → StandardTableauInjectionGraded mapMp00042The standard tableau of the shape filled row by row with 1, 2, ..., n.
  • InverseGlaisherFranklinIntegerPartition → IntegerPartitionbijectioninverseBijectionGraded mapMp00313The inverse of GlaisherFranklin: repeated parts merge into doubled parts, and a leftover part splits into copies of its odd part.
  • MinimalDyckPathIntegerPartition → DyckPathInjectionMp00043The shortest Dyck path tracing the shape of the Ferrers diagram.
  • OddPartsWordIntegerPartition → BinaryWordSurjectionMp00317The binary word marking which parts are odd, the parts taken largest first.
  • ParallelogramPolyominoDyckPathIntegerPartition → DyckPathInjectionMp00230The Dyck path of the partition read as a parallelogram polyomino, one column per part.
  • ReadingTableauIntegerPartition → StandardTableauInjectionGraded mapMp00045The recording tableau of the row reading word of the shape filled row by row.
  • RemoveFirstPartIntegerPartition → IntegerPartitionSurjectionMp00202The partition without its largest part: its first row removed.
  • TransposePartitionIntegerPartition → IntegerPartitioninvolutionBijectionGraded mapInvolutionMp00044The conjugate partition: column i of the Ferrers diagram becomes row i.

To IntegerPartition

  • BlockSizePartitionSetPartition → IntegerPartitionsurjectionSurjectionGraded mapMp00079The partition of n a set partition's block sizes form, largest first.
  • ConjugateAfterCycleTypePermutation → IntegerPartitionThe conjugate partition of the cycle type.
  • CutOutPartitionDyckPath → IntegerPartitionInjectionMp00027The partition cut out of the staircase by the path: part i is the number of downs before the (n + 1 - i)-th up step.
  • CycleTypePermutation → IntegerPartitionsurjectionSurjectionGraded mapMp00108The multiset of cycle lengths, as a partition.
  • NegativeCycleTypeSignedPermutation → IntegerPartitionSurjectionMp00169The lengths of the negative cycles, largest first: those of the underlying permutation with an odd number of negative entries.
  • PositiveCycleTypeSignedPermutation → IntegerPartitionSurjectionMp00166The lengths of the positive cycles, largest first: those of the underlying permutation with an even number of negative entries.
  • RskShapePermutation → IntegerPartitionsurjectionSurjectionGraded mapMp00060The common shape of the RSK tableaux: the row lengths, as a partition of n.
  • SortedPartitionIntegerComposition → IntegerPartitionsurjectionSurjectionGraded mapMp00040The partition a composition's parts form, sorted largest first.
  • TableauShapeStandardTableau → IntegerPartitionsurjectionSurjectionGraded mapMp00083The shape of a standard tableau: its row lengths.
21 more in FindStat, not implemented here
  • Mp00021CorePartition → IntegerPartitionGraded mapBijectionto bounded partition
  • Mp00022CorePartition → IntegerPartitionSurjectionto partition
  • Mp00037LabeledGraph → IntegerPartitionSurjectionGraded mapto partition of connected components
  • Mp00077SemistandardTableau → IntegerPartitionSurjectionGraded mapshape
  • Mp00110Posets → IntegerPartitionSurjectionGraded mapGreene-Kleitman invariant
  • Mp00179IntegerPartition → SkewPartitionInjectionGraded mapto skew partition
  • Mp00182SkewPartition → IntegerPartitionSurjectionouter shape
  • Mp00183SkewPartition → IntegerPartitionSurjectioninner shape
  • Mp00186SkewPartition → IntegerPartitionSurjectionGraded mapdominating partition
  • Mp00204Permutation → IntegerPartitionSurjectionGraded mapLLPS
  • Mp00225SemistandardTableau → IntegerPartitionSurjectionweight
  • Mp00251LabeledGraph → IntegerPartitionclique sizes
  • Mp00275LabeledGraph → IntegerPartitionSurjectionto edge-partition of connected components
  • Mp00276LabeledGraph → IntegerPartitionto edge-partition of biconnected components
  • Mp00306Posets → IntegerPartitionrowmotion cycle type
  • Mp00307Posets → IntegerPartitionpromotion cycle type
  • Mp00311PlanePartition → IntegerPartitionGraded mapto partition
  • Mp00321IntegerPartition → IntegerPartitionBijectionGraded mapInvolution2-conjugate
  • Mp00322IntegerPartition → IntegerPartitionBijectionGraded mapLoehr-Warrington
  • Mp00323IntegerPartition → IntegerPartitionBijectionGraded mapLoehr-Warrington inverse
  • Mp00332Posets → IntegerPartitionSurjectionGraded mapJordan block partition

Enumeration

Examples

2 more kept as data, checked against the oracles
Basic #

Count(LargestPartPartitions(10,4))=9Count(LargestPartPartitions(10, 4)) = 9

live ↗
InCount(LargestPartPartitions(10,4))\mathrm{Count}(\mathrm{LargestPartPartitions}(10, 4))Out99

The first element in enumeration order

live ↗
InLargestPartPartitions(10,4)[1]\mathrm{LargestPartPartitions}(10, 4)[1]OutIntegerPartition⁡([4,4,2]){\operatorname{IntegerPartition}}([4, 4, 2])
About
Examples4
CrosswalkOEISSageMath

See also: IntegerPartitions