MATH 240 Exam 2 Solutions: Problems on Combinatorics, Induction, and Sequences, Exams of Discrete Mathematics

Solutions to exam 2 of math 240, covering topics such as combinations, mathematical induction, and sequences. It includes calculations for problems involving factorials, boolean matrix multiplication, and recursive and iterative algorithms.

Typology: Exams

Pre 2010

Uploaded on 09/02/2009

koofers-user-z81-1
koofers-user-z81-1 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MATH 240; EXAM # 2, 100 points, November 8, 2002 (R.A.Brualdi)
TOTAL SCORE (10 problems):
Name: Solutions TA (circle): Matthew Petro Dilip Raghavan
Disc. (circle) TUES. THURS. TIME:
1. [15 points] Calculate explicitly the following:
(a) P(7,4) = 7!/3! = 840
(b) C(8,5) = 8
5= 8!/5!3! = 56
(c) The coefficient of x5y3in the expansion of (2xy)8:
8
325(1)3=1792
(d) The Boolean matrix product
"0 1 0
1 0 1 #K
1 1
0 1
1 0
="0 1
1 1 #.
(e) Let Sbe a program segment, and let pand qbe propositions. Explain the meaning
of the symbol p{S}q.
If proposition pholds and the program segment Sterminates, Then proposition qholds.
2. [12 points] Use mathematical induction to prove that
32n1 mod 8 for all n0.
Be sure to specify the two main steps in carrying out the induction.
(1) basis step (n= 0 in this case): One easily checks that 32·01 mod 8.
(2) inductive step: one needs to show that 32n1 mod 8 implies 32(n+1) 1 mod 8.
So suppose that 32n1 mod 8. Then 32(n+1) = 32n·32= 32n·91·11 mod 8, since
91 mod 8.
Thus the statement follows by induction.
3. [5 points]
Consider a theorem of the form:
Theorem: If p, then q.
1
pf3

Partial preview of the text

Download MATH 240 Exam 2 Solutions: Problems on Combinatorics, Induction, and Sequences and more Exams Discrete Mathematics in PDF only on Docsity!

MATH 240; EXAM # 2, 100 points, November 8, 2002 (R.A.Brualdi)

TOTAL SCORE (10 problems):

Name: Solutions TA (circle): Matthew Petro Dilip Raghavan

Disc. (circle) TUES. THURS. TIME:

  1. [15 points] Calculate explicitly the following:

(a) P (7, 4) = 7!/3! = 840

(b) C(8, 5) =

( 8 5

) = 8!/5!3! = 56

(c) The coefficient of x^5 y^3 in the expansion of (2x − y)^8 : ( 8 3

) 25 (−1)^3 = − 1792

(d) The Boolean matrix product

[ 0 1 0 1 0 1

] ⊙ 

  =

[ 0 1 1 1

] .

(e) Let S be a program segment, and let p and q be propositions. Explain the meaning of the symbol p{S}q.

If proposition p holds and the program segment S terminates, Then proposition q holds.

  1. [12 points] Use mathematical induction to prove that

32 n^ ≡ 1 mod 8 for all n ≥ 0.

Be sure to specify the two main steps in carrying out the induction.

(1) basis step (n = 0 in this case): One easily checks that 3^2 ·^0 ≡ 1 mod 8. (2) inductive step: one needs to show that 3^2 n^ ≡ 1 mod 8 implies 32(n+1)^ ≡ 1 mod 8. So suppose that 3^2 n^ ≡ 1 mod 8. Then 32(n+1)^ = 3^2 n^ · 32 = 3^2 n^ · 9 ≡ 1 · 1 ≡ 1 mod 8, since 9 ≡ 1 mod 8.

Thus the statement follows by induction.

  1. [5 points] Consider a theorem of the form: Theorem: If p, then q.

Explain the difference between a direct proof and an indirect proof of the Theorem. In a direct proof, one assumes that p is true and shows that q is true; i.e. the line p true and q false cannot occur in the truth table of the implication.

In an indirect proof, one assumes that q is false, and shows that p is false, leading to the same conclusion.

  1. [12 points] Let sn = 1^5 + 2^5 + · · · + n^5. Give recursive and iterative algorithms for computing sn.

(i) Recursive Algorithm:

If n = 1, then s 1 := 1. Else sn := sn− 1 + n^5.

(ii) Iterative Algorithm:

s 1 := 1 For i = 2, 3 ,... , n, si := si− 1 + i^5.

  1. [12 points] A password is to be 7 characters long with each character equal to one of the 10 digits 0, 1 ,... , 9 or one of the 26 lowercase letters a, b, c,... , x, y, z. (Repeated characters are allowed.)

(i) How many passwords are there such that the characters are distinct and one of the characters equals 0?

7 · 35 · 34 · · · · · 30

(ii) If a password is chosen at random from all possible passwords, what is the probability its characters are distinct and one of the characters equals 0?

above answer/ 367

  1. [12 points] A bakery has 6 different kinds of bagels and has on hand a large number of each kind. You want to buy a bag of 2 dozen bagels containing at least one bagel of each type. How many different bags could you buy?

Number of solutions in nonnegative integers of x 1 + x 2 + · · · + x 6 = 18 and so

(18+6− 1 5

)

( 23 5

)

  1. [10 points] Messages are to be transmitted over a communications channel using three different signals: one requires 1 nanosecond, another requires 2 nanoseconds, and a third requires 4 nanoseconds. A message consists of sequences of these three signals where each signal is immediately followed by the next signal.