On the Subject of Partitions
This is the way to make groups in class, okay maybe not.
This module displays a rectangular grid of regions. Highlighting a pixel will reveal the index and value of the group it belongs to (displayed as INDEX/TOTAL:VALUE). In order to solve the module, you must group the current groups until there is just one left. Initially there are 10 groups.
In order to obtain the grouping, repeat the following process until all groups are regrouped:
- Take the sum of all the group values.
- Modulo this number by the amount of groups and add 1.
- Take the value of the n’th group, where n is the value from step 2.
- Take this number reductive-modulo the amount of ungrouped squares and add 1. This is one of the groups.
Reductive modulo is a custom operator that works as follows (a reducmod b): - If a is less than b, returns a
- Otherwise subtract b from a and reduce b by 1. Then try the above again with your new values.
- If b gets to 0 before a gets below b, it returns 0.
- Disregard the group from step 3 for all steps, except for step 4.
To submit your groups, press a pixel, highlight until there are as many groups selected as required for one of the regroups, then press anywhere in the selected area. These pixels will no longer be selectable for further groups in this regrouping iteration and they will not reveal their colour again until a strike is incurred or the module advances.
The shapes of these groups or the order of entering them do not matter. Groups may even be disconnected