On the Subject of 27,644,437

A scientific calculator is recommended! Please use a scientific calculator!
Use a scientific calculator!

The module contains:

  • A circle of 13 white LEDs representing elements.
    • Ordered 0-12 clockwise from the top.
  • A lower screen cycling through sets 0-12.
  • An upper screen displaying a Base-36 number representing the partition ID. (100000-ZZZZZZ)

A partition is a particular combination of subsets (groups) that can be made with a set of n elements. There are 27,644,437 possible partitions in a set of 13 elements. Clicking the LEDs will toggle their presence in the selected subset.

Partitions can be displayed in two ways:

  • Integer Partition: Shows how many elements are in each subset:
  •         [1, 1, 1, 2, 2, 3, 3]
  • Set Partition: Shows which specific elements are in each subset:
  •         [[0], [2], [7], [1,8], [3,12], [5,10,11], [4,6,9]]

Locate and submit the correct partition to solve the module. Use the Instruction Table on the next page. The order you input subsets does not matter, and the module will never strike.

Variables

The following is a list of variables that will appear regularly throughout the instructions.

n Amount of unset elements.
Starts at 13, n - r for each subset found.
r Subset length.
[x] → r = 1    [x,x] → r = 2
j Amount of subsets with length r.
[[x], [x]] → j = 2    [[x,x], [x,x], [x,x]] → j = 3

Instruction Table

1. Convert the upper screen into base-10. See Converting Bases on Page 3. Base Index = (Converted upper screen) % 27,644,437 Locate the cell in Appendix B on page 5 that matches with the Base Index.
2. Take the PTF and IPC of the cell found in Appendix B, then plug into the formula. Index A = Base Index - PTF + IPC - 1 Your initial IPC is equal to the same IPC as the found cell.
3. Locate Subset N that has the smallest length that has not been affixed a value.
If r = 1, group subset length 1s together into Subset N*.
Use the current IPC to calculate SnV.

nCr (n Choose r):

nCr = n! / ( r! × ( n - r! ) )

CPSn (Combos per single value of Subset N):

CPSn = IPC / nCr

SnV (Subset N Value):

SnV = floor( Index A / CPSn )
4. Count up to the SnVth combination of Subset N. See Counting Subset Values on Page 3. Save Subset N as part of the final answer.
If you grouped subset 1s together, split elements into their own subsets.
Remove r from the integer partition. If you split Subset N, then instead remove all 1s from the integer partition.
5.

Calculate your new IPC with Subset N removed.

IPC = CPSn × j
n = n - r

Calculate your new Index A.

Index A = ( Index A % CPSn ) × j
% is the modulo operator (remainder after division).
6. If Index A = 0, continue from here. If not, repeat Steps 3-5 until it does. Use the first available combination for each subset in order of whichever subset would be Subset N next.

* If you grouped subset length 1s together, then set r equal to j, then j equal to 1.

Converting Bases

To convert from Base-36 to Base-10, take each letter’s alphanumeric value and add 9 to it. Then starting from the leftmost number, multiply each number by 36n. n in this case starts at 5, and decreases incrementally by one for the next number. Finally, add each product.

ABZ129 ⇒ 10, 11, 35, 1, 2, 9
(10 × 365) + (11 × 364) + (35 × 363) + (1 × 362) + (2 × 361) + (9 × 360)
(10 × 60,466,176) + (11 × 1,679,616) + (35 × 46,656) + (1 × 1,296) + (2 × 36) + (9 × 1)
= 624,771,873

Alternatively, you can use the following formula to convert a length-6 base-36 number to base-10:
( ( ( ( A×36 + B )×36 + C )×36 + D )×36 + E )×36 + F
( ( ( ( 10×36 + 11 )×36 + 35 )×36 + 1 )×36 + 2 )×36 + 9 = 624,771,873

Counting Subset Values

Note down the current list of unset elements in ascending order.

For a subset of r = 2, its combinations are ordered/indexed like so. Subsets with a higher r are ordered similarly (assuming n=13 in this example):

SnV =0123
[0, 1],[0, 2],[0, 3],[0, 4],…,[0, 9],[0, 10],[0, 11],[0, 12],
SnV =121314
[1, 2],[1, 3],[1, 4],…,[1, 9],[1, 10],[1, 11],[1, 12],
SnV =2324
[2, 3],[2, 4],…,[2, 10],[2, 11],[2, 12],

If a subset of r = 2 were to be given the elements [4, 9], later subsets can not use either of the elements, as they are already fixed to a subset. Instead, select xth element from the list of unset elements (zero-indexed).

If SnV is too large a number to count quickly, refer to Appendix A on the next page.

Appendix A

Start off at the cell at column = r, row = n, and take a variable s = SnV.

While the current cell is less than or equal to s, do the following:

  • Subtract the selected cell's value from s.
  • Move into the cell below.

Take the vertical distance between the starting cell and the stopped-at cell, as a variable e (Example: row 13 - row 10 = 3).
Then, select the eth element in the list of unset elements (zero-indexed). Set the selected element to Subset N.
If r > 1, then move to the cell below and to the left followed by repeating this process.

12345678910111213
131126622049579292479249522066121
121115516533046246233016555111
111104512021025221012045101
10193684126126843691
918285670562881
8172135352171
71615201561
615101051
514641
41331
3121
211
11

Appendix B

In reading order, the list displays every possible integer partition that can be made in a list of 13 elements.

PTF = Partitions Thus Far (the index for each int. partition)
IPC = Integer Partition Combos (# of set partitions in an int. partition)

The Base Index matches with a cell if BOTH:

  • Base Index is greater than the previous cell’s PTF
  • Base Index is less than or equal to the selected cell’s PTF
Shade ~Amount

If a PTF surpasses a multiple(s) of one million partitions, the cell will be shaded for the sake of convenience.

Format of cells:
Integer Partitions: r0, r1, r2, ...
[IPC]
PTF
LightDark Gray1,000,000
DarkLight Gray2,000,000
BlackWhite3,000,000
13
[1]
0
1, 12
[13]
13
2, 11
[78]
91
1, 1, 11
[78]
169
3, 10
[286]
455
1, 2, 10
[858]
1313
1, 1, 1, 10
[286]
1599
4, 9
[715]
2314
1, 3, 9
[2860]
5174
2, 2, 9
[2145]
7319
1, 1, 2, 9
[4290]
11609
1, 1, 1, 1, 9
[715]
12324
5, 8
[1287]
13611
1, 4, 8
[6435]
20046
2, 3, 8
[12870]
32916
1, 1, 3, 8
[12870]
45786
1, 2, 2, 8
[19305]
65091
1, 1, 1, 2, 8
[12870]
77961
1, 1, 1, 1, 1, 8
[1287]
79248
6, 7
[1716]
80964
1, 5, 7
[10296]
91260
2, 4, 7
[25740]
117000
1, 1, 4, 7
[25740]
142740
3, 3, 7
[17160]
159900
1, 2, 3, 7
[102960]
262860
1, 1, 1, 3, 7
[34320]
297180
2, 2, 2, 7
[25740]
322920
1, 1, 2, 2, 7
[77220]
400140
1, 1, 1, 1, 2, 7
[25740]
425880
1, 1, 1, 1, 1, 1, 7
[1716]
427596
1, 6, 6
[6006]
433602
2, 5, 6
[36036]
469638
1, 1, 5, 6
[36036]
505674
3, 4, 6
[60060]
565734
1, 2, 4, 6
[180180]
745914
1, 1, 1, 4, 6
[60060]
805974
1, 3, 3, 6
[120120]
926094
2, 2, 3, 6
[180180]
1106274
1, 1, 2, 3, 6
[360360]
1466634
1, 1, 1, 1, 3, 6
[60060]
1526694
2, 2, 2, 2, 6
[180180]
1706874
1, 1, 1, 2, 2, 6
[180180]
1887054
1, 1, 1, 1, 1, 2, 6
[36036]
1923090
1, 1, 1, 1, 1, 1, 1, 6
[1716]
1924806
3, 5, 5
[36036]
1960842
1, 2, 5, 5
[108108]
2068950
1, 1, 1, 5, 5
[36036]
2104986
4, 4, 5
[45045]
2150031
1, 3, 4, 5
[360360]
2510391
2, 2, 4, 5
[270270]
2780661
1, 1, 2, 4, 5
[540540]
3321201
1, 1, 1, 1, 4, 5
[90090]
3411291
2, 3, 3, 5
[360360]
3771651
1, 1, 3, 3, 5
[360360]
4132011
1, 2, 2, 3, 5
[1081080]
5213091
1, 1, 1, 2, 3, 5
[720720]
5933811
1, 1, 1, 1, 1, 3, 5
[72072]
6005883
2, 2, 2, 2, 5
[135135]
6141018
1, 1, 2, 2, 2, 5
[540540]
6681558
1, 1, 1, 1, 2, 2, 5
[270270]
6951828
1, 1, 1, 1, 1, 1, 2, 5
[36036]
6987864
1, 1, 1, 1, 1, 1, 1, 1, 5
[1287]
6989151
1, 4, 4, 4
[75075]
7064226
2, 3, 4, 4
[450450]
7514676
1, 1, 3, 4, 4
[450450]
7965126
1, 2, 2, 4, 4
[675675]
8640801
1, 1, 1, 2, 4, 4
[450450]
9091251
1, 1, 1, 1, 1, 4, 4
[45045]
9136296
3, 3, 3, 4
[200200]
9336496
1, 2, 3, 3, 4
[1801800]
11138296
1, 1, 1, 3, 3, 4
[600600]
11738896
2, 2, 2, 3, 4
[900900]
12639796
1, 1, 2, 2, 3, 4
[2702700]
15342496
1, 1, 1, 1, 2, 3, 4
[900900]
16243396
1, 1, 1, 1, 1, 1, 3, 4
[60060]
16303456
1, 2, 2, 2, 2, 4
[675675]
16979131
1, 1, 1, 2, 2, 2, 4
[900900]
17880031
1, 1, 1, 1, 1, 2, 2, 4
[270270]
18150301
1, 1, 1, 1, 1, 1, 1, 2, 4
[25740]
18176041
1, 1, 1, 1, 1, 1, 1, 1, 1, 4
[715]
18176756
1, 3, 3, 3, 3
[200200]
18376956
2, 2, 3, 3, 3
[600600]
18977556
1, 1, 2, 3, 3, 3
[1201200]
20178756
1, 1, 1, 1, 3, 3, 3
[200200]
20378956
1, 2, 2, 2, 3, 3
[1801800]
22180756
1, 1, 1, 2, 2, 3, 3
[1801800]
23982556
1, 1, 1, 1, 1, 2, 3, 3
[360360]
24342916
1, 1, 1, 1, 1, 1, 1, 3, 3
[17160]
24360076
2, 2, 2, 2, 2, 3
[270270]
24630346
1, 1, 2, 2, 2, 2, 3
[1351350]
25981696
1, 1, 1, 1, 2, 2, 2, 3
[900900]
26882596
1, 1, 1, 1, 1, 1, 2, 2, 3
[180180]
27062776
1, 1, 1, 1, 1, 1, 1, 1, 2, 3
[12870]
27075646
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3
[286]
27075932
1, 2, 2, 2, 2, 2, 2
[135135]
27211067
1, 1, 1, 2, 2, 2, 2, 2
[270270]
27481337
1, 1, 1, 1, 1, 2, 2, 2, 2
[135135]
27616472
1, 1, 1, 1, 1, 1, 1, 2, 2, 2
[25740]
27642212
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2
[2145]
27644357
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
[78]
27644435
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
[1]
27644436