Sub topic 7
Restrictions, “At Least” Conditions, and the Complement Method
Prerequisites and the main idea
This chapter assumes that you can use factorials, permutations, and combinations. You should also be comfortable translating words such as “and,” “or,” and “at least” into counting steps.
A restriction is a condition that limits which outcomes are allowed. For example:
- Two particular people must sit together.
- A committee must include at least one woman.
- A password must contain no repeated digits.
You can count a restricted group directly, or you can count the complement. The complement is the set of outcomes that do not satisfy the condition.
The key equation is:
\text{desired outcomes}=\text{all outcomes}-\text{undesired outcomes}This method is especially useful for “at least one” conditions.
Restrictions on arrangements
Suppose five people sit in a row, and two specific people must sit together. Treat the pair as one block. This gives four objects to arrange: the block and the other three people.
The block can be arranged in \(4!\) ways. The two people inside the block can switch places in \(2!\) ways.
4!\cdot 2!=24\cdot 2=48So, 48 arrangements have the two people together.
If the question asks for arrangements in which they are not together, use the complement:
5!-4!\cdot 2!=120-48=72import math
# Five people in a row; two specific people must sit together
together = math.factorial(4) * math.factorial(2)
print(together) # 48
print(math.factorial(5) - together) # 72: not togetherThe block method works because every arrangement with the required pair has exactly one pair-block. Do not use it when the condition allows several different groupings without checking for overlap.
“At least” conditions
“At least one” means one or more. It includes every possible positive amount:
1,2,3,\ldotsListing all those cases can be slow. Instead, count the complement. The complement of “at least one woman” is “no women.”
Example: A committee of three is chosen from six men and four women. How many committees contain at least one woman?
First count all committees:
\binom{10}{3}=120Then count committees with no women. All three members must come from the six men:
\binom{6}{3}=20Subtract:
120-20=100import math
total = math.comb(10, 3)
no_women = math.comb(6, 3)
at_least_one_woman = total - no_women
print(at_least_one_woman) # 100The same pattern applies to statements such as:
- At least one success: all outcomes minus no successes.
- At least one repeated digit: all passwords minus passwords with no repeats.
- At least one defective item: all groups minus groups with no defective items.
A condition with “at most” may also be easier through a complement. For example, “at most two” can sometimes be counted as all outcomes minus outcomes with three or more.
Checking a restricted count
Use these checks:
- The restricted count cannot exceed the total count.
- A required pair or other restriction should usually reduce the count.
- For an “at least one” condition, verify that the excluded case truly contains zero qualifying objects.
- If you use subtraction, make sure every outcome belongs either to the desired set or to its complement, but not both.
Exercise
A group of four is chosen from seven engineers and five designers. How many groups contain at least one designer?
Show answer
There are \(\binom{12}{4}=495\) total groups. The complement has no designers, so it contains \(\binom{7}{4}=35\) groups. The answer is \(495-35=460\).