Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSCI 2011 Midterm 2 Answers, Exams of Discrete Mathematics

Discrete Math Midterm 2 answers, Fall 2016 exam

Typology: Exams

2018/2019

Uploaded on 09/03/2019

sam-swanson
sam-swanson 🇺🇸

5

(1)

5 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Sample Midterm 2 Key
CSci 2011
(1) (a) False: a1= 1, a2= 3, a3= 7, a4= 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|band b|cthen there are integers pand qso b=pa and c=qb. So b=pqa
and therefore a|c.
(2)(a) The characteristic equation, r28r+ 16 = 0, has a double root at 4. So the solution
has the form an=α1(4n) + α2n(4n). Using the values for a0and a1we get a0= 3 = α1, and
a1= 8 = 3(41)+α2(1)(41). So α2=1 and the solution is an= 3(4n)n(4n) = (3n)(4n).
(b) From part (a) the solution to the associated linear homogeneous recurrence is of the
form an=α1(44) + α2n(4n). Since 3 is not a characteristic root, the particular solution is
of the form p0(3n). Substituting this into the nonhomogeneous recurrence gives
p0(3n) = 8p0(3n1)16p0(3n2) + (3n).
Dividing by 3n2and simplifying gives
p0(9) = 8p0(3) 16p0+ 9
which simplifies further to p0= 9.
Solutions to the linear nonhomogeneous recurrence relation therefore have the form
an=α1(4n) + α2n(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)+C(3,1)C(7,2)
C(10,3) .
(5) BASIS STEP: We need to show the fomula holds for n= 1. For n= 1 the sum becomes
4(1)(30) = 4 and the right hand side becomes (2(1) 1)(31) + 1 = 4. This proves the basis
step.
pf2

Partial preview of the text

Download CSCI 2011 Midterm 2 Answers and more Exams Discrete Mathematics in PDF only on Docsity!

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.