

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
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
1 / 3
This page cannot be seen from the preview
Don't miss anything!


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:
(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.
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.
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.
(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.
(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
Number of solutions in nonnegative integers of x 1 + x 2 + · · · + x 6 = 18 and so
(18+6− 1 5
( 23 5
)