MCS 261, Nov 12, 2002
SAMPLE Hour Exam 2
Name:
Each problem is worth 20 points.
Write your solutions in your exam book.
Turn in this sheet along with your solutions.
Show and explain all of your work.
An unjustied answer is not correct!
(1) Prove or provi

From 6.2:
4. (a) The rst digit can be anything but 0, so we have 9 choices. The second
digit can be anything but the rst digit, so 9 choices. The last digit can be
anything but the rst two, 8 choices. The total is 9 9 8 = 648.
(b) There are ve choices for

From 5.2:
8. (a) a2 = 1(1 + 1) = 2, a3 = 2(2 + 1) = 6, a4 = 3(6 + 2) = 24, a5 = 4(24 + 6) =
120.
(b) Guess an = n!. Base Cases. n = 0 and n = 1. a0 = 1 by denition and
0! = 1 by convention. a1 = 1 by denition and 1! = 1. We get equality in both
cases so i

From 4.2:
18. We will use the Euclidean algorithm.
5k + 3 = 1 (3k + 2) + (2k + 1)
3k + 2 = 1 (2k + 1) + (k + 1)
2k + 1 = 1 (k + 1) + k
k+1 = 1k+1
k
= k1+0
The last nonzero remainder is 1 so it seems that gcd(5k + 3, 3k + 2) = 1.
We just need to check that

d
# r G T G 2( f & G r
9F lsyqi`y'9C3X gg
4 ! f 4 V 0 4 4 & & f 3 4 D & j r d G # 3 ! f 3 f D Y ( 4 f 3 & # r # W
m5vqwwC(qC(59E75C05gFSlE59y5is9C($ d lc"
4 (h 4 & 0 ! ( ! f & 2 ( 23 0 2 d 0 4 0 26 236 4 0 2 & 0 & 3 D 0 Y 4 f
wiBwu)0x5C3`is9ux5! 5@98751

From 1.4:
1. Verication of 6i:
pq
TT
TF
FT
FF
pq
T
T
T
F
(p q ) p q
F
F
F
F
FT
F
TF
T
TT
p q
F
F
F
T
The columns for (p q ) and p q are the same so they are logically
equivalent.
2. (c)
(13)
(3)
(3)
(9)
(7)
(7)
(7)
[(p q ) (q r)] (r s)
[(p q ) (q r)] (r s

From 1.2:
12. n2 n + 5 = n(n 1) + 5. Since n and n 1 are consecutive integers, one
of them must be even, so n(n 1) is even. Then n(n 1) + 5 must be odd
since an even number plus an odd number is odd.
Alternate: Using Cases.
Case 1: n is even. Then n = 2k

From 1.1:
1. (b) This is true only if both statements connected by the and are true. The
statement (4 = 2 + 2) is false, so the whole statement is false.
(i) This statement is true unless the rst statement is true and the second
statement is false. This i

MCS 261, May 3, 2002
Final Exam
Name:
There are nine (9) problems on this exam.
Each problem is worth 20 points.
Write your solutions in your exam book.
Turn in this sheet along with your solutions.
Show and explain all of your work.
An unjustied an

MCS 261, Nov 12, 2002
Name:
SAMPLE Hour Exam 2 : Some solutions
1. Solve the recursion relation
an = 6an1 9an2
with initial conditions a0 = 1 and a1 = 3.
Solution:
Applying the algorithm: solve x2 6 + 9 = 0 which has double roots at x = 3.
So the solution