Sub topic 6
Selections with At Least, At Most and Mixed Conditions
This chapter assumes you know the multiplication and addition principles, factorials, and the formula for nCr. It also assumes you know that nCr counts selections where order does not matter. You should be able to compute values like C(6, 2) = 15 without hesitation. If not, review the earlier chapters on combinations first.
Why Conditions Change the Count
A plain selection problem asks, "In how many ways can we choose r items from n?" The answer is nCr. CAT problems rarely stop there. They add conditions such as "at least 2 women", "at most 3 defective items" or "a particular person must be included". Each condition splits the selections into cases or removes some of them.
Three tools handle almost every such problem:
- Direct case count. List each allowed case, count each with a product of combinations, and add the cases.
- Complement method. Count all selections, then subtract the ones that break the condition.
- Fixing or excluding specific items. Force a person in, or keep a person out, and reduce the problem to a smaller selection.
Reading the Conditions Precisely
Most mistakes come from misreading the wording. Translate each phrase into a numeric range before you compute anything.
| Phrase | Meaning | Allowed counts of the special type |
|---|---|---|
| At least 2 | 2 or more | 2, 3, 4, ... up to the maximum possible |
| At most 2 | 2 or fewer | 0, 1, 2 |
| Exactly 2 | Only 2 | 2 |
| More than 2 | Strictly above 2 | 3, 4, ... |
| Fewer than 2 | Strictly below 2 | 0, 1 |
| No more than 2 | Same as at most 2 | 0, 1, 2 |
Also check the upper limit set by the pool. If a committee has 5 members and only 4 women are available, "at least 2 women" allows 2, 3 or 4 women, not 5.
Direct Case Counting
When you choose from two or more groups, each case fixes how many items come from each group. For each case you multiply the combinations from each group (multiplication principle). Then you add across cases (addition principle).
Example. A committee of 5 is chosen from 6 men and 4 women. It must have at least 2 women.
The number of women can be 2, 3 or 4. The number of men is then 3, 2 or 1.
- 2 women, 3 men: C(4, 2) × C(6, 3) = 6 × 20 = 120
- 3 women, 2 men: C(4, 3) × C(6, 2) = 4 × 15 = 60
- 4 women, 1 man: C(4, 4) × C(6, 1) = 1 × 6 = 6
The total is 120 + 60 + 6 = 186.
Notice that the two numbers in each product add up to the committee size (2 + 3 = 5). This is a quick check that each case is valid.
The Complement Method
When the allowed cases are many and the forbidden cases are few, subtract. The complement of "at least 2 women" is "0 or 1 woman".
- Total committees: C(10, 5) = 252
- 0 women (all 5 men): C(6, 5) = 6
- 1 woman, 4 men: C(4, 1) × C(6, 4) = 4 × 15 = 60
The answer is 252 − 6 − 60 = 186, which matches the direct count.
import math
# Committee of 5 from 6 men and 4 women with at least 2 women
total = math.comb(10, 5)
no_women = math.comb(6, 5)
one_woman = math.comb(4, 1) * math.comb(6, 4)
print(total - no_women - one_woman) # 186
# Direct case count gives the same result
direct = sum(math.comb(4, w) * math.comb(6, 5 - w) for w in range(2, 5))
print(direct) # 186Computing the answer both ways is a good habit when time allows. Two independent methods agreeing is strong evidence that the setup is right.
Choosing Between Direct and Complement
A practical rule: count the cases on each side. "At least 1" has one forbidden case (zero), so the complement is almost always faster. "At most 1" has two allowed cases (0 and 1), so a direct count is usually faster.
The "At Least One" Shortcut
"At least one" is the most common complement pattern. The only forbidden case is "none", so:
(at least one) = (all selections) − (selections with none)
Example. From 7 distinct fruits, how many non-empty selections can be made?
Each fruit is either in or out, giving 2⁷ = 128 subsets. Remove the empty one: 128 − 1 = 127. The same result comes from adding C(7, 1) + C(7, 2) + ... + C(7, 7).
For selections of any size from n distinct items, the count of non-empty subsets is 2ⁿ − 1.
Selecting with Specific Items Included or Excluded
Sometimes the condition names particular people or items.
- A particular item must be included. Put it in the selection and choose the remaining r − 1 from the other n − 1 items: C(n − 1, r − 1).
- A particular item must be excluded. Remove it and choose all r from the other n − 1 items: C(n − 1, r).
- Two particular items must be included. C(n − 2, r − 2).
- Two particular items must not both be present. Total minus the selections that contain both: C(n, r) − C(n − 2, r − 2).
Example. A team of 4 is chosen from 9 players. Player A must be in and player B must be out.
Fix A in and remove B from the pool. Choose 3 more from the remaining 7 players: C(7, 3) = 35.
A subtle case is "A and B cannot both be in the team". This does not mean neither is in. It allows A without B, B without A, or neither. The complement handles it cleanly: C(9, 4) − C(7, 2) = 126 − 21 = 105.
Mixed Conditions
Mixed conditions combine different requirements in one problem, for example "at least 2 women and at most 1 specific man". Handle them in layers.
- Choose the variable you will case-split on.
- Write each allowed case.
- Apply the other conditions inside each case.
- Add the cases.
Example. A group of 4 is chosen from 5 boys and 4 girls. It must contain at least 1 boy and at least 1 girl.
The complement removes the all-boys and all-girls groups.
- Total: C(9, 4) = 126
- All boys: C(5, 4) = 5
- All girls: C(4, 4) = 1
The answer is 126 − 5 − 1 = 120.
Here the complement has two forbidden cases that do not overlap, so you can subtract both. If forbidden cases could overlap, you would need inclusion-exclusion, covered in a later chapter.
Selections from Three Groups
With three groups, the case table grows. Keep it organized.
Example. Choose 4 people from 3 doctors, 4 engineers and 5 lawyers so that there is at least one from each profession.
The 4 people must split as 2-1-1 across the three groups, in some order. The group supplying 2 can be any of the three:
- 2 doctors, 1 engineer, 1 lawyer: C(3, 2) × 4 × 5 = 60
- 1 doctor, 2 engineers, 1 lawyer: 3 × C(4, 2) × 5 = 90
- 1 doctor, 1 engineer, 2 lawyers: 3 × 4 × C(5, 2) = 120
The total is 60 + 90 + 120 = 270.
Common Errors
- Treating "at most" as "exactly". At most 2 includes 0 and 1. Do not forget the zero case.
- Subtracting only part of the complement. "At least 2" excludes both 0 and 1. Subtracting only the 0 case overcounts.
- Choosing the special items first, then the rest from everyone. For example, picking 2 women first and then picking 3 more from all 10 people counts the same committee several times. Choose from the groups separately, with fixed counts per case.
- Ignoring pool limits. You cannot pick 4 women from a group that has only 3. C(3, 4) is 0, so such a case adds nothing, but make sure you do not invent it.
- Mismatched totals. In every case, the numbers chosen from each group must add up to the selection size.
A Quick Strategy
Exercises
Exercise
A committee of 4 is chosen from 5 men and 3 women. How many committees have at most 1 woman?
Show answer
At most 1 woman means 0 or 1 woman. With 0 women: C(5, 4) = 5. With 1 woman: C(3, 1) × C(5, 3) = 3 × 10 = 30. The total is 5 + 30 = 35. Check by complement: C(8, 4) = 70 total, and 70 − (2 women: C(3, 2) × C(5, 2) = 30) − (3 women: C(3, 3) × C(5, 1) = 5) = 35.
Exercise
From 8 players, a team of 5 is chosen. Players P and Q refuse to play together, so the team cannot contain both. How many teams are possible?
Show answer
Total teams are C(8, 5) = 56. Teams containing both P and Q need 3 more from the other 6 players: C(6, 3) = 20. The answer is 56 − 20 = 36. Direct check: neither P nor Q is in: C(6, 5) = 6. Exactly one of them is in: 2 × C(6, 4) = 2 × 15 = 30. The total is 6 + 30 = 36.
Exercise
A box has 4 red, 3 green and 2 blue balls, all distinguishable. In how many ways can 3 balls be chosen so that at least one is red?
Show answer
Use the complement. Total selections: C(9, 3) = 84. Selections with no red ball come from the other 5 balls: C(5, 3) = 10. The answer is 84 − 10 = 74.