Counting examples
4²⁰
First year students at Hogwarts are sorted into 4 houses. If there are 20 students, how many ways are there to sort them?
Worst case: 250 + 250 + 250 + 1 Ravenclaw = 751 students
If there are 1000 students at Hogwarts, 250 per house. How many students must be gathered in the Great Hall to guarantee at least 1 Ravenclaw is present?
P(3, 2) = 3! / (3 - 2)! = 3! / 1! = 3 ⋅ 2 ⋅ 1 / 1 = 3 ⋅ 2 = 6
In how many ways may 2-element subsets be chosen from {A, B, C}?
6 + 5 + 7 - 2 - 3 - 2 + 1 = 18 - 7 + 1 = 12
Let |A| = 6, |B| = 5 |C| = 7, |A∩B| = 2, |A∩C| = 3, |B∩C| = 2 and |A∩B∩C| = 1. What is |A∪B∪C|?
3 ⋅ 6 ⋅ 5 ⋅ 2 = 180
Party choices: 3 to choose from on Thursday, 6 on Friday, 5 on Saturday, and 2 on Sunday. If you attend on party per day, how many party schedules can be created?
10² + 10³ + 10⁴ = 100 + 1000 + 10000 = 11100 passwords
Sir Cadigan creates passwords using 2, 3, or 4 words from a set of 10 magic words(a word may be repeated). How many possible passwords could he choose from?
P(16, 3) = 16! / (16 - 3)! = 16! / 13! = 16 ⋅ 15 ⋅ 14 ⋅ 13 / 13 = 16 ⋅ 15⋅ 14 = 3360
16 countries are competing for medals (gold, silver, bronze) in Team Discrete Math. in how many ways can medals be awarded?
C(7, 4) ⋅ C(3, 3) = (7! / 4!(7 - 3)!) ⋅ (3! / 3!) = (7! / 4! ⋅ 3!) ⋅ (3! / 3!) = (7 ⋅ 6 ⋅ 5 ⋅ 4 / 4 ⋅ 3 ⋅ 2) ⋅ 1 = 7 ⋅ 5 ⋅ 1 = 35
A cafeteria has 4 bins of utensils: forks, teaspoons, knives, and tablespoons. In how many ways can you take 4 utensils?
5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅ 1 = 5! = 120
Consider a golf tournament with a 5-way playoff between players A, B, C, D, and E. In how many ways can the order of play be formed.
1⁵ ⋅ C(7, 4) ⋅ C(3, 3) = 1 ⋅ (7! / 4!(7 - 3)!) ⋅ (3! / 3!) = 1 ⋅ (7! / 4! ⋅ 3!) ⋅ (3! / 3!) = 1 ⋅ (7 ⋅ 6 ⋅ 5 ⋅ 4 / 4 ⋅ 3 ⋅ 2) ⋅ 1 = 1 ⋅ 7 ⋅ 5 ⋅ 1 = 35
Consider a potluck meal with 5 platters of food. A child must have one serving from each platter but may have 3 more servings of anything. In how many ways may the child take 8 total servings?
n = 8, k = 3 C(8, 3) = 8! / 3!(8 - 3)! = 8! / 3! ⋅ 5! = 8 ⋅ 7 ⋅ 6 / 3 ⋅ 2 = 8 ⋅ 7 = 56
Find the coefficient of x⁵y³ in the expansion of (x + y)⁸.
5 rune phrase + 6 rune phrase P(30, 5) + P(30, 6)
Gandalf has forgotten a passphrase. The phrase consists of either five or six runes and the same rune does not appear twice within a phrase. There are 30 runes. How many possible phrases would there be? Write your answer as a mathematical expression.
C(7, 3) = 7!/3! ⋅ (7 - 3)! = 7!/3! ⋅ 4! = 7 ⋅ 6 ⋅ 5/3 ⋅ 2 = 7 ⋅ 5 = 35
Gimli wishing to leave a good impression pays Galadriel a compliment consisting of three distinct Elvish synonyms for the adjective "beautiful". Gimli knows seven such synonyms. In how many ways can Gimli complement Galadriel's beauty?
2⁷(3³ + 3⁴) = 128(27 + 81) = 128 ⋅ 108 = 13824
Harry needs to order Quidditch equipment: 7 brooms with 2 brands to choose from. 3 or 4 balls with 3 brands to choose from. How many option does he have?
L = "light reading" A = "assigned reading" R = "reference" |L| = 37, |A| = 5, |R| = 52, |L ∩ A| = 3, |L ∩ R| = 2, |R ∩ A| = 1, |L ∩ A ∩ R| = 1 |L ∪ A ∪ R| = (37 + 5 + 52) - (3 + 2 + 1) + 1 = 94 - 6 + 1 = 89 books
Hermione has 37 books in "light reading", 5 books in "assigned reading", 52 books in "reference". If 3 books are in "light reading" and "assigned reading", 1 book is "assigned reading" and "reference", 2 books are in "reference" and "light reading", and 1 book is in all three categories, how many books does she have?
P(5, 3) = 5! / (5 - 3)! = 5! / 2! = 5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅ 1 / 2 ⋅ 1 = 5 ⋅ 4 ⋅ 3 = 60
How many 3-permutations can be formed from 5 elements?
26 ⋅ 26 => 26² + 1
How many contacts must be in your cell phone to ensure that at least 2 last names begin with the same pair of letters?
P(6; 3, 2 1) = 6! / 3! ⋅ 2! ⋅ 1! = 6 ⋅ 5 ⋅ 4 ⋅ 3 ⋅ 2 / 3 ⋅ 2 ⋅ 2 = 6 ⋅ 5 ⋅ 2 = 60
How many distinguishable arrangements of the letters in the word TATTOO are possible.
8 ⋅ 7 ⋅ 6 = 336
How many possible 3-digit octal numbers are there without repetition?
8 ⋅ 8 ⋅ 8 = 8³ = 512
How many possible 3-digit octal numbers are there?
C(12, 6) = 12! / 6!(12 - 6)! = 12! / 6! ⋅ 6! = 12 ⋅ 11 ⋅ 10 ⋅ 9 ⋅ 8 ⋅ 7 / 6 ⋅ 5 ⋅ 4 ⋅ 3 ⋅ 2 = 2 ⋅ 11 ⋅ 2 ⋅ 3 ⋅ 7
How many traveling squads of 6 people can be formed from a 12-member chess club?
(a) 1 (Gandalf) ⋅ 8 ⋅ 7 ⋅ 6 ⋅ 5 ⋅ 4 ⋅ 3 ⋅ 2 ⋅ 1 = 8! (b) 2 ⋅ 1 (Frodo & Aragron) ⋅ 8! = 2! ⋅ 8!
The Fellowship arrives at the Bridge of Khazad-dum and must cross in single file. The Fellowship consists of 9 members. In how many ways can the Fellowship cross the bridge if: (a) Gandalf must cross last? or (b) Frodo must cross with Aragron (in front or behind)?
(16 + (25 - 1) over 16) = (16 + 24 over 16) = (40 over 16)
The king's drinking hall offers 25 varieties of ale. Suppose that orders total 16 mugs. In how many ways can an order be placed?
⌈(n/k)⌉ = ⌈(7/3)⌉ = 3
The last week of the semester has just 3 days of classes, but you have 7 assignments due. At least one day has at least how many assignments?
C(9, 5) ⋅ C(8, 4) = (9! / 6!(9 - 6)!) ⋅ (8! / 4!(8 - 4)!) = (9! / 6! ⋅ 3!) ⋅ (8! / 4! ⋅ 4!) = (9 ⋅ 8 ⋅ 7 / 3 ⋅ 2) ⋅ (8 ⋅ 7 ⋅ 6 ⋅ 5 / 4 ⋅ 3 ⋅ 2) = 3 ⋅ 4 ⋅ 7 ⋅ 7 ⋅ 2
The mighty U of A is forming a committee with 5 (of 9 available) faculty and 4 (of 8 available) staff members. In how many ways can the committee be formed?
C(11, 7) ⋅ 3⁷
What is the coefficient of the x⁴y⁷ term in the expansion (x + 3y )¹¹.
4 + 3 + 5 = 12 ways
You need to take a literature class. There are 4 English Lit, 3 Poetry, and 5 World Lit classes. How many ways can you take a literature class?
4-character: 95 ⋅ 95 ⋅ 95 ⋅ 95 = 95⁴ 5-character: 95⁵ 6-character: 95⁶ 7-character: 95⁷ 8-character: 95⁸ = 95⁴ + 95⁵ + 95⁶ + 95⁷ + 95⁸ = 6,707,780,953,650,625
You use 4-8 ASCII characters as student handles. There are 95 printable ASCII characters total. How many handles can you create?