

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Discrete Math Midterm 2 answers, Fall 2016 exam
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Sample Midterm 2 Key CSci 2011
(1) (a) False: a 1 = 1, a 2 = 3, a 3 = 7, a 4 = 15.
(b) False: the strings that both end and begin with ’000’ will be double counted, so you need to subtract the probability of selecting a bitstring that both ends and begins with ’000’.
(c) True. If a | b and b | c then there are integers p and q so b = pa and c = qb. So b = pqa and therefore a | c.
(2)(a) The characteristic equation, r^2 − 8 r + 16 = 0, has a double root at 4. So the solution has the form an = α 1 (4n) + α 2 n(4n). Using the values for a 0 and a 1 we get a 0 = 3 = α 1 , and a 1 = 8 = 3(4^1 )+α 2 (1)(4^1 ). So α 2 = −1 and the solution is an = 3(4n)−n(4n) = (3−n)(4n).
(b) From part (a) the solution to the associated linear homogeneous recurrence is of the form an = α 1 (4^4 ) + α 2 n(4n). Since 3 is not a characteristic root, the particular solution is of the form p 0 (3n). Substituting this into the nonhomogeneous recurrence gives
p 0 (3n) = 8p 0 (3n−^1 ) − 16 p 0 (3n−^2 ) + (3n).
Dividing by 3n−^2 and simplifying gives
p 0 (9) = 8p 0 (3) − 16 p 0 + 9
which simplifies further to p 0 = 9.
Solutions to the linear nonhomogeneous recurrence relation therefore have the form
an = α 1 (4n) + α 2 n(4n) + 9(3n).
(3) This is a permutation with indistinguishable objects with 6 objects total: 3 l’s, 2 e’s, and 1 a. So the number is 6!/(3!2!1!) = 60.
(4)(a) The total number of possibilities is C(10, 3). The number of possibilities that have exactly two of the winning digits is the number of ways of choosing two of the three winning digits multiplied by the number of ways of choosing any one of the seven nonwinning digits, so C(3, 2)C(7, 1). So the probability is C(3, 2)C(7, 1)/C(10, 3).
(b) The number of ways of getting at most one digit correct is the number of ways of getting no digits correct plus the number of ways of getting exactly one correct. The number of ways of getting none correct is the number of ways of choosing three of the seven nonwinning digits, or C(7, 3). The number of ways of choosing exactly one is the number of ways of choosing one of the three winning digits times the number of ways of choosing two of the seven nonwinning digits, or C(3, 1)C(7, 2). So the answer is C(7,3)+ CC(10(3,,3)1) C(7,2).
(5) BASIS STEP: We need to show the fomula holds for n = 1. For n = 1 the sum becomes 4(1)(3^0 ) = 4 and the right hand side becomes (2(1) − 1)(3^1 ) + 1 = 4. This proves the basis step.
INDUCTIVE STEP: We need to show that if the formula holds for an arbitrary positive integer k ≥ 1, then it holds for k + 1. Now
k∑+
j=
(4j(3j−^1 )) = [
∑^ k j=
(4j(3j−^1 ))] + 4(k + 1)(3k).
By the inductive hypothesis, the right hand side equals [(2k − 1)(3k) + 1] + 4(k + 1)(3k). Then simplifying gives
[(2k − 1)(3k) + 1] + 4(k + 1)(3k) = (2k − 1 + 4k + 4)(3k) + 1 = (6k + 3)(3k) + 1 = (2k + 1)(3)(3k) + 1 = (2(k + 1) − 1)(3k+1) + 1.
This proves the inductive step.
So, by induction,
∑n j=1(4j(3j−^1 )) = (2n^ −^ 1)(3n) + 1 for all positive integers^ n.