Counting assignments to two nonempty labeled groups
Count how many ways distinct items can be split between two labeled groups when neither group may be left empty.
Two choices per item, multiplied
Start with the unrestricted version. Each distinct item picks one of two labeled groups, say Group A or Group B, and the choices for different items are independent. With three items there are 2 × 2 × 2 = 8 assignments, which the power calculator confirms as 2 to the third power. Listing them shows the structure: AAA, AAB, ABA, ABB, BAA, BAB, BBA, BBB, using one letter per item in order. Eight is the count before any rule about empty groups is applied. The same product principle works for any number of items n, giving 2 to the n. The count grows quickly, doubling every time one more item joins the pool, which is why a direct listing stops being practical well before 20 items.
Removing the two forbidden assignments
An empty group can only happen when every item went to the other group. That produces exactly two bad assignments: all items in Group A and all items in Group B. They are different assignments, so they do not overlap, and subtracting both from 8 leaves 6. In the basic calculator, 8 minus 2 returns 6. Written for n items the rule is 2 to the n, minus 2. The subtraction of 2 holds for every n of 2 or more. For a single item the formula would give 0, which is correct, because one item cannot fill two groups. The need to check small cases is a reason to test any counting rule on three or four items before trusting it on a larger set.
Checking the six by size of group
A second route to the same answer adds up cases by how many items land in Group A. With three items, Group A can hold one item or two items for both groups to be nonempty. Choosing one item for Group A can be done in 3 ways, and choosing two items can also be done in 3 ways, since the combination count for 3 choose 1 is 3 and for 3 choose 2 is 3. The total is 3 plus 3, or 6, agreeing with 8 minus 2. This cross-check is useful because it uses a different line of reasoning, so a mistake in one method rarely repeats in the other. Both methods count assignments of labeled items to labeled groups.
A larger set of five and ten items
With five items, the unrestricted count is 2 to the fifth power, which is 32, and removing the two single-group assignments leaves 30. With ten items the unrestricted count is 1,024 and the nonempty count is 1,022. The two excluded assignments become a tiny share of the total as n grows, so for ten items they are about 0.2 percent of the choices. For small n they matter a great deal: at n equal to 2 the formula gives 4 minus 2, which is 2, so half the assignments are removed. Tracking how the correction shrinks with n helps judge when an approximate count 2 to the n is good enough and when the exact subtraction is required.
Labeled groups versus unlabeled groups
The count of 6 treats the groups as different. Swapping the contents of Group A and Group B gives a new assignment. If the two groups are interchangeable, such as two unnamed teams, each split of the items is counted twice among the 6. Dividing by 2 gives 3 splits for three items: the singleton can be item 1, item 2 or item 3, and the other two items form the second group. The basic calculator confirms 6 divided by 2 equals 3. For n items the unlabeled count is 2 to the n minus 1, minus 1. Whether the groups carry labels, such as home and away, or red and blue, or morning and evening shift, decides which count answers the problem.
Distinct items versus identical items
The count also depends on whether the items can be told apart. If the three items are identical, only the number placed in Group A matters, and the options are 1 or 2 items in Group A, giving 2 outcomes for two nonempty groups. With distinct items the same sizes occur, but each size splits into several different assignments. Lining this up with a real situation matters: three different students assigned to two labeled rooms count as distinct items, while three identical chairs placed in two rooms do not. Mixing the two models is a common source of wrong answers on worksheets, so write down what is distinguishable before choosing a formula.
Where the model stops
This worksheet gives a count of assignments under a binary rule. It does not set group sizes, capacities, costs or preferences, and it does not turn counts into probabilities without a stated assumption about how assignments are chosen. If a group must contain at least two items, or the groups have fixed sizes, the all-in-one subtraction no longer matches the problem, and a case-by-case count with combinations is the better tool. The method also assumes every item must be placed, so no item is left unassigned. When a third option such as leaving an item out is allowed, each item has three choices and the structure changes to 3 to the n with a different set of exclusions.
Turning the count into a table of cases
Organizing the six valid assignments by group size makes the structure visible. With three items, Group A can have one item (three assignments) or two items (three assignments). The cases of zero and three items in Group A are the two forbidden ones, with one assignment each. So the full table reads 1, 3, 3, 1, which sums to 8. These are the combination counts 3 choose 0 through 3 choose 3, and the middle two entries add to the nonempty total of 6. The same row of counts for four items is 1, 4, 6, 4, 1, summing to 16, and removing the two end entries leaves 14, which equals 2 to the fourth minus 2.
Everyday settings for the count
Situations that match this model include assigning distinct tasks to two named workers when each must do at least one, sorting distinct files into two labeled folders with neither left empty, and assigning distinct people to two named rooms. In each case the items differ and the two destinations have names. The count answers how many assignments exist, not how many are sensible. A real plan usually adds constraints such as skills, capacities or conflicts, and each constraint removes assignments from the count. Starting from 2 to the n minus 2 gives a ceiling on the possibilities before such constraints are applied, which is a useful sanity bound when a proposed scheme claims to have enumerated every option.
Reproduce the checks
Unrestricted binary assignments
Open the Power calculator and enter:
- Base
2- Exponent
3
Expected output:
Power
8Every distinct item chooses one labeled group.
Both groups nonempty
Open the Basic calculator and enter:
- First number
8- Operation
subtract- Second number
2
Expected output:
Result
6The two excluded all-in-one assignments are disjoint.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.