Counting groups that must contain specified members
When a group must contain certain members, those members use up open places and drop out of the pool. This guide counts four-item groups from eight items that must include two named items.
A required member is already chosen
Suppose a team of four is picked from eight distinct people, and two particular people must be on the team. Those two are in every valid team, so there is nothing left to decide about them. What remains is to fill the other two places from the six people who are not required. The problem has shrunk from choosing 4 from 8 to choosing 2 from 6. This reduction is the main idea of the guide. Handle the fixed members first, subtract them from both the group size and the pool, and count only what is left to decide with an ordinary combination.
Counting the open places
The number of ways to choose 2 items from 6 is 6 times 5 divided by 2, which is 15. The combination calculator returns 15 for n equal to 6 and r equal to 2, as the first case records. Each of the 15 choices, joined with the two required items, forms a distinct valid group of four. No valid group is missed, because every valid group contains the required pair and a two-person remainder from the other six. No group is counted twice, because the remainder determines the group. The count of 15 is therefore complete and free of duplicates.
Comparing with the unconstrained count
Without the requirement, the number of four-item groups from eight is 70, since 8 times 7 times 6 times 5 divided by 24 is 70. The combination calculator gives the same value for n equal to 8 and r equal to 4, and the second case records it. The constrained count of 15 is the part of the 70 that includes the required pair. Reading 70 as the answer to the constrained problem is the mistake this worksheet targets. The larger count includes groups that leave out one or both of the required items, and these are not allowed.
Partitioning the 70 groups
The 70 groups can be sorted by how many of the two named items they contain. Groups with both named items number 15. Groups with neither number C(6, 4), which is also 15, since all four members come from the other six. Groups with exactly one are chosen by picking which of the two named items appears, 2 ways, and then 3 of the six others, 20 ways, for 40. The three parts add to 15 plus 15 plus 40, which is 70, matching the total. It is a coincidence that the first two counts are equal. They are equal here because choosing 2 from 6 and choosing 4 from 6 are mirror images.
Another example with larger numbers
Choose a committee of 5 from 10 people with 3 required members. Fix the three, and 2 places remain to fill from the 7 others. The count is C(7, 2), which is 7 times 6 divided by 2, or 21. The unrestricted count is C(10, 5), which is 252. The share of committees that include all three required people is 21 out of 252, or about 8.3 percent. Since the pool shrinks by the number of required members and the open places shrink by the same number, the formula for k required members is C(n minus k, r minus k), as long as k does not exceed r.
Excluded members work differently
A person who must not be on the team is removed from the pool, but the group size stays the same. If two people from the eight are barred, the four places are filled from the remaining six, giving C(6, 4), which is 15. Required members reduce both numbers. Excluded members reduce only the pool. Mixing up the two is a common error, and the different effects on the group size are why it is worth stating each constraint before writing the combination. When a problem has both kinds, apply the required members and the exclusions in turn, then count the open places from what is left. For the group of four from eight with two required and one barred, the required pair is fixed, the barred item leaves the pool, and the two open places are filled from the other five, which gives C(5, 2), or 10 groups. Each constraint changes only the number it affects, and a short table of pool size and open places helps keep them straight.
Roles are a different constraint
This worksheet treats the fixed items as members with no named positions. If one of them must hold a specific role, such as captain, the question changes. Assigning roles introduces order or labels, and the count needs its own reasoning. For instance, choosing a four-person team with a designated captain from the required pair multiplies the 15 by 2 for the choice of captain between them. The subset model has no order, so a position-sensitive question belongs in a separate calculation. Keeping membership and roles apart keeps each count simple.
Checking the reduction with a small case
A small case verifies the reasoning. From the four items A, B, C and D, choose groups of 3 that must contain A. The reduction says choose 2 from the remaining 3, giving C(3, 2), which is 3. Listing them directly gives A with B and C, A with B and D, and A with C and D, which is 3 groups. The unconstrained count of 3-item groups from 4 is 4, and the extra one is the group B, C and D, which leaves A out. Listing by hand for a small case confirms the formula before it is applied to larger numbers.
When the requirements cannot be met
If the number of required members exceeds the group size, no valid group exists and the count is zero. If it equals the group size, there is exactly one group, since no open places remain and C(n minus k, 0) is 1. Requiring all four members of a four-person group from the named four, for instance, fixes the whole team. The reduction handles these edge cases automatically, but the arithmetic needs to be read with care. A negative number of open places means the constraints contradict each other, and the correct answer is zero groups rather than an error. The pool can also run short: if three required members are fixed from a pool of eight and the group has four places, the one open place comes from five items, giving 5 groups. When the pool after removing required members has fewer items than there are open places, the count is again zero.
Reproduce the checks
Open membership choices
Open the Combination calculator and enter:
- Total items n
6- Items selected r
2
Expected output:
Combinations
15Two fixed items have already filled half the group.
Unconstrained four-item groups
Open the Combination calculator and enter:
- Total items n
8- Items selected r
4
Expected output:
Combinations
70This larger count does not enforce the required pair.
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.