This is a custom exam written by Trevor, from TrevTutor.com that covers Generating. Functions, Integer Partitions, Recur
Discrete Mathematics 2 TrevTutor.com Midterm 2 Time Limit: 60 Minutes
Name:
Class Section
This exam contains 7 pages (including this cover page) and 6 questions. The total number of points is 50. This is a custom exam written by Trevor, from TrevTutor.com that covers Generating Functions, Integer Partitions, Recurrence Relations, and Combinatorial Families. These questions are difficult and require practice beyond the videos. This is similar to an exam given at a real university. The average mark was 47% between 280 students. If you would like to see more practice exams, as well as the solution to this exam, check out TrevTutor.com.
Question Points Score 1
6
2
10
3
8
4
8
5
10
6
8
Total:
50
Discrete Mathematics 2
Midterm 2 - Page 2 of 7
1. (6 points) The following questions relate to coefficient extraction. √ x . (a) (2 points) Compute the coefficient of x7 in 1 − 7x + 1 − 4x
(b) (2 points) Use partial fractions to expand the function f (x) =
(c) (1 point) Give a numeric value for
(d) (1 point) Write
−3 6
1/4 4
.
using only positive integers.
1 − 7x . (1 − 3x)(1 + x)
Discrete Mathematics 2
Midterm 2 - Page 3 of 7
2. (10 points) The following questions relate to integer partitions and compositions. (a) (2 points) Write out all partitions of 4.
(b) (2 points) Write the generating function for the number of partitions of n where the number 3 appears exactly twice.
(c) (2 points) Write the generating function for the number of compositions of n into exactly 6 parts.
(d) (4 points) Show that the number of partitions of n where no summand is divisible by 4 equals the number of partitions of n where no even summand is repeated.
Discrete Mathematics 2
Midterm 2 - Page 4 of 7
3. (8 points) The following questions are related to combinatorial families. (a) (2 points) Let A = {10, 20, 30, . . . , 90, 110, 120, . . . } be the set of positive integers whose last digit is “0”, and have no other “0”s preceding it. Find the generating function for A(x).
(b) (2 points) Let B = {1, 2, 3, 4, 5, 6, 7, 8, 9}*= {∅, 1, 2, 3, . . . , 9, 11, 12, . . . }. That is, B contains all strings that do not contain “0”. Find the generating function for B(x).
(c) (2 points) Let C be the set of positive integers that do not contain “00”. How can we write C in terms of A, B and other related operators?
(d) (2 points) Using the generating functions you found for A(x) and B(x), find the generating function for C(x).
Discrete Mathematics 2
Midterm 2 - Page 5 of 7
4. (8 points) The following questions are related to recurrence relations. (a) (1 point) Write the first four values of an for an = 4an−1 − 4an−2 where a0 = 1 and a1 = 0.
(b) (2 points) Solve the homogeneous recurrence relation for an = 4an−1 − 4an−2 where a0 = 1 and a1 = 0.
(c) (5 points) Solve the non-homogeneous recurrence relation for an = 3an−1 +3n where a0 = 4.
Discrete Mathematics 2
Midterm 2 - Page 6 of 7
5. (10 points) The following questions are word problems relating to recurrence relations. (a) (5 points) Suppose that poker chips come in four colors − red, white, green, and blue. Find a recurrence relation for the number of ways to stack n poker chips so that there are no consecutive blue chips, given that a0 = 1 and a1 = 4. Do not solve.
(b) (5 points) Consider ternary strings (consisting of only the numbers 0, 1, and 2). For n ≥ 1, let an be the number of ternary strings of length n where there are no consecutive 1’s or 2’s. Find the recurrence relation for an given that a0 = 1 and a1 = 3. Do not solve.
Discrete Mathematics 2
Midterm 2 - Page 7 of 7
6. (8 points) Use Generating Functions to solve the following non-homogeneous recurrence relation. We define a0 = 1, a1 = 2, and n ≥ 0. an+2 − 2an+1 + an = 2n