Discrete Material
Discrete Material
First Name:
Last Name:
Student Number:
For fairness, we will not answer any questions about the content of the midterm
while in session
1
1. Which of the following corresponds to the Generalized Pigeonhole Principle?
(a) If k+1 pigeons are placed into k holes, then there is a hole containing two pigeons.
(b) If more than k pigeons are placed into k holes, then then at least one holes contains two
pigeons.
(c) If N pigeons are placed into k holes, then there is exactly one hole containing at least
dN/ke pigeons.
(d) If N pigeons are placed into k holes, then there is at least one hole containing exactly
dN/ke pigeons.
(e) (none of the above)
Solution: (e)
2. How many binary strings of length n = 20 are there with exactly 7 ones?
(a) 220 − 27
(b) 27
20
(c) 13
13
(d) 2
(e) (none of the above)
20 20
Solution: (c) 13
= 7
3. How many one-to-one functions are there from a set A with n elements to a set B with m
elements, assuming n ≤ m?
(a) n!
(b) m!
(c) nm
(d) P (m, n)
(e) (none of the above)
Solution: (d)
4. How many bijective functions are there from a set A with n elements to a set B with n
elements?
(a) n!
(b) nn
(c) 2n
(d) n2
(e) (none of the above)
Solution: (a)
2
5. Consider a 3-dimensional grid. How many ways can you travel from (0,0,0) to (5,10,10) if
each step is of unit length along one of the axes and gets you closer to your destination?
25!
(a) 5!·10!·10!
(b) 5! · 10! · 10!
(c) 25 · 210 · 210
(d) 325
(e) (none of the above)
20
X
6. The expression 2j can be simplified to:
j=5
(a) 221 − 25
(b) 221 − 24
(c) 221 − 17
(d) 220 + 25
(e) (none of the above)
Solution: (a)
7. In the upcoming provincial election the top four candidates are Doug, Marit, Bonnie and
Mike. If there are 101 votes cast then
Solution: (d)
3
8. The number of binary strings of length 2n with exactly two 0s is
(a) 2 n2 + n2
(b) (2n)!/2!
(c) n(n + 1)/2
(d) (2n)(2n − 1)
(e) (none of the above)
Solution: (b)
10. Consider any random sequence S of 101 distinct negative integers. Which of the following
must be true?
(a) S contains an increasing subsequence of length 10
(b) S contains an decreasing subsequence of length 10
(c) S contains an increasing subsequence of length 11
(d) S contains an decreasing subsequence of length 11
(e) (none of the above)
Solution: (e)
Solution: (c)
4
12. A proposition P (n) is true for all integers n ≥ 4 if (a) P (4) is true and (b) the implication
P (k) → P (k + 1) evaluates to true for any k ≥ 4.
Solution: (a)
13. The Guelph Storm are gearing up for a new season. In the final practice before the regular
season, the coach divides the players into three teams. After three games the three teams
have scored a total of 40 goals. One possible outcome is that Team A scored 25 goals, Team B
scored 13 goals, and Team C scored 2 goals. How many such different outcomes are possible?
(a) 40
3
(b) 40!/3!
(c) 42
2
42
(d) 39
(e) (none of the above)
Solution: (c)
14. The Toronto Sceptres are gearing up for a new season. Their practice roster has 21 players.
In the final practice before the regular season, the coach divides them into three teams. How
many different ways can the 21 players be assigned to teams if each team has exactly 6 players?
(a) 321
(b) 21!
21!
(c) 7!7!7!
21
(d) 3
(e) (none of the above)
Solution: (e) – also accepting (c) as it seems all 21 players belong to a team, and thought 6
was a typo for 7.
15. A local charity is giving away hats to the homeless. They come in one of three colours: Red,
White, Green. How many different ways can the first 15 people select their hat?
(a) 15
3
(b) 315
5
15!
(c) 5!5!5!
(d) P (15, 3)
(e) (none of the above)
6
16. What is T (2), T (3), T (4), and T (5) for the following recurrence for n ≥ 0?
0 if n = 0,
T (n) = 1 if n = 1,
T (n − 2) + n if n > 1.
(a) 3,6,10,15
(b) 2,3,4,5
(c) 2,4,6,8
(d) 2,4,6,9
(e) (none of the above)
Solution: (d)
dn/2e
X
17. Suppose that T (n) = (2j − 1). What is T (119) as a decimal number?
j=1
(a) 3600
(b) 3540
(c) 3660
(d) 7260
(e) (none of the above)
40
18. Express C(40, 38) = 38
as a decimal number.
(a) 79
(b) 780
(c) 1560
(d) This number is too big to reasonably compute without a calculator
(e) (none of the above)
Solution: (b)
19. How many binary strings of length 12 begin and end with the same value?
(a) 210
(b) 211
(c) 212 − 210
(d) 210 + 210 − 29
(e) (none of the above)
Solution: (b)
7
20. How many binary strings of length 10 begin with 000 or contain exactly 4 zeros?
(a) 331
(b) 335
10
(c) 27 + 4
(d) 447
(e) (none of the above)
Solution: (a)
21. How many ternary strings (strings with symbols 0,1,2) of length 10 include at least one of
each symbol?
(a) P (10, 3) · 37
(b) 37 10
3
(c) 37
(d) 310 − 3 · 210
(e) (none of the above)
Solution: (e)
22. Trick or treat. Five children show up looking for candy at Halloween. You have 20 identical
candy bars to give to the 5 children. How many ways can you distribute the candy bars if
each child gets at least 2 candy bars?
(a) 14
4
20!
(b) 2!2!2!2!2!10!
20
(c) 5
20
− 10
(d) 5 5
(e) (none of the above)
Solution: (a)
23. How many subsets of S = {1, 2, . . . , 10} contain 6 consecutive integers? One such subset
would be {2, 4, 5, 6, 7, 8, 9}.
(a) 40
(b) 48
(c) 52
(d) 56
(e) (none of the above)
Solution: (b)
8
24. How many permutations of the 26 capital letters A-Z contain the substring EXAM ?
(a) 22!
(b) 26! − 22!
(c) 23
1
· 22!
26
(d) 4 · 22!
(e) (none of the above)
Solution: (c)
25. Which pioneer in Discrete Mathematics is credited for the Online Encyclopedia of Integer
Sequences?
(a) Fibonnacci
(b) Sloane
(c) Pascal
(d) Ruskey
(e) (none of the above)
Solution: (b)
26. In the upcoming winter Olympics, Team Canada has 100 athletes but Team Jamaica has
only 10 athletes. As a show of solidarity, the two teams decide to enter the opening ceremony
together. If the players march out one at a time, how many different ways can they be ordered
so no athlete from Jamaica follows another athlete from Jamaica?
(a) 101
91
· 100! · 10!
(b) 101
10
(c) 110! − 109!
10
(d) 110! − 109! 2
(e) (none of the above)
Solution: (a)
27. Consider a 10 x 20 grid. A route is defined to be a path from (0,0) to (10,20) that only moves
up and to the right. How many routes are there that do not go through the point (2,7)?
(a) 92 + 21
8
(b) 30 − 21
9
10 8 2
(c) 1076
(d) 210 220 − 22 27
9
(e) (none of the above)
Solution: (b)
– END OF MIDTERM –
10