Counting HW
Counting HW
1. How many license plates can be made using either 3 digits followed by
3 letters or three letters followed by 3 digits?
2. How many license plates can be made using either 3 letters followed
by 3 digits or 4 letters followed by 2 digits?
1
4. How many functions are there from the set {a, b, c, d, e} to the set
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}?
6. How many functions are there from a set with 10 elements to a set
with 3 elements?
8. Each student in the discrete maths class will be given a final grade of
A, B, C or D. If the class has 23 students, how many possible final
grade outcomes are there for the whole class?
9. How many 3-permutations are there from the set {a, b, c, d, e}? List
all of them.
10. How many 4-combinations are there from the set {a, b, c, d, e, f }? List
all of them.
11. Five runners take part in a race. Assuming there are no ties, how
many different outcomes of the race are possible (when looking at the
order that the contestants finish the race in)?
2
(a) the string ED?
(b) the string BA and FGH?
(c) the string DC and CGH?
(d) the string DC and CAD?
15. How many ways can we select 6 letters from the set {A, B, C, D, E, F, G, H, I, J}
if it is specified that E can only be selected if F is also chosen? Note
that it is not saying that you have to have E, but if you have E you
must have F as well.
17. How many ways are there for 10 adults and 6 children to stand in a
line so that no two children stand next to each other? [Hint: First
position the adults and then consider the placement of children.]
18. How many positive integers with exactly four decimal digits, that is,
positive integers between 1000 and 9999 inclusive,
19. You should think how you would do the above questions if instead of
5 and 7, the numbers are 8 and 12.
20. For each of the expressions below, come up with a simple counting
problem to which it is the answer:
(a) 2n
3
(b) 3n
(c) 4n
(d) 15n
(e) k n
(f) 5!
(g) n!
n
(h) 3
n n
(i) 3 + 4
n
(j) k
n nk
(k)
(l) 12 ∗ 11 ∗ 10 ∗ 9 ∗ 8 ∗ 7
(m) n(n − 1)(n − 2)(n − 3)(n − 4)...(n − 12)
21. Count the number of ways to get from the lower left corner of the grid
(given below) to the upper right corner. Along the route, you are only
allowed to take steps right or up.
22. Solve the above problem for a general m × n grid. The grid given
above is a 3 × 5 grid.
23. (Slightly more challenging problem) Count the number of all rectangles
you see in the above grid.
25. A discrete maths class has 30 students. The professor has asked each
student to pick a length 10 string of English letters as the student’s
class name. How many outcomes are possible?
26. Under the above scenario, how many outcomes are possible if the pro-
fessor doesn’t allow any two students to pick the same class name?
4
27. Under the above scenario, if we don’t care which student has which
string, how many outcomes are possible? The restriction of uniqueness
of class name string is still applicable here. In other words, if the
professor just writes down the 30 strings on a piece of paper (the
sequence in which these 30 strings are written doesn’t matter), how
many outcomes are possible? Being precise mathematically, one would
say, how many possible sets of 30 such strings are possible?
5
8. How many strings can be made from the letters in ALAKHAWAY-
NUNIVERSITY if all the letters have to be used?
9. How many 2-word strings can be made from the letters in ALAKHAWAY-
NUNIVERSITY if all the letters have to be used? [Hint: first make a
1-word string and then figure out how many ways can you split it into
a 2-word string.]
10. How many 3-word strings can be made from the letters in ALAKHAWAY-
NUNIVERSITY if all the letters have to be used?
12. A father brought home 10 chocolates and 8 mint candies for his 3
children. The chocolates are all the same, and all the mint candies are
the same as well. In how many ways can he distribute these among
his children under
(a) x2 y 2 in (x + y)4 ?
(b) x5 y in (x + y)6 ?
(c) x3 y 9 in (x − y)12 ?
6
(d) x5 y 4 in (x − y)9 ?
(e) x6 y 4 in (x + 2y)10 ?
(f) x6 y 2 in (3x + y)13 ?
(g) x7 y 2 in (2x − y)9 ?
2. Write the 7th row of Pascal’s triangle (without generating the whole
triangle from the top)?
3. Expand (x + y)7 .
4. Expand (x − 2y)4 .
7
Principle of Inclusion-Exclusion
1. The following information was found about a group of students at AUI:
38 played basketball
21 played tennis
56 played football
8 played basketball and tennis
17 played basketball and football
13 played tennis and football
5 played all three
72 did not play any of these 3 sports
How many students are in this group? Hint: Draw a Venn diagram to
help you.
3. Count the number of binary strings of length 12 that start with a 001,
or end with a 001, or have a 001 starting at the 6th place.
4. Count the number of binary strings of length 12 that start with a 001,
or end with a 001, or have a 001 starting at the 8th place.
8
12. Count the number of functions from {a, b, c, d, e, f } to {1, 2, 3, 4, 5}
that don’t contain 1 in the range, or don’t contain 2 in the range, or
don’t contain 3 in the range.
13. Count the number of selections of size 6 from {1, 2, 3, · · · , 10} that
don’t contain 1 or 2 or 3 or 4.
16. For each of the grids shown here, count the number of grid paths
from Start to Finish that don’t go through any of the labelled interior
points.
Pigeonhole Principle
1. What’s the minimum number of people needed in a group to guarantee
that at least two people in the group have their last names begin with
the same letter of English alphabet?
9
Generating Combinations and Permutations in Lexicographi-
cal Order
1. Put these permutations of {1, 2, 3, 4, 5, 6} in lexicographic order: 234561,
231456, 165432, 156423, 543216, 541236, 231465, 314562, 432561,
654321, 654312, 435612.
2. For each of these permutations, find the next one and the previous one
in lexicographic order:
(a) 4532761
(b) 78436521
(c) BJHFACDIGE
(a) {1, 2, 3, 4, 5, 6}
(b) {1, 5, 6, 7, 8, 12}
(c) {2, 4, 5, 10, 11, 12}
(a) {a, g, k, l, o, p, u, w, y, z}
(b) {b, e, g, i, l, m, n, o, y, z}
10