Discrete Mathematics 2007

Discrete Mathematics 2007-Spring Midterm
Please remember to write down your name and student ID.
Please write down the procedures leading to your answers or you may not get perfect score.
1. If f and f。g are one-to-one, does it follow that g is one-to-one?Justify your
answer. (10%)
2. Use rules of inference to show that the premises
,
and
, where a is in the universe of discourse,
imply the conclusion
. (10%)
3. Find all solutions to the system of congruence. (10%)
4. Use the extended Euclidean algorithm to express gcd(252, 356) as a linear
combination of 252 and 356. (10%)
5. Use mathematical induction to show that 3 divides
nonnegative integer. (10%)
whenever n is a
6. Use structural induction to show that l(T), the number of leaves of a full
binary tree T, is 1 more than i(T), the number of internal vertices of T. (10%)
7. Prove or disprove the set of positive rational numbers is countable. (10%)
3.2 Example 19 (p.234)
8. Use mathematical induction to prove that
n with
. (10%)
3.3 Example 9 (p.246)
for every positive integer
9. Answer the following questions based on the algorithm which is given below.
(10%)
procedure A(n : nonnegative integer)
if n = 0 then y := 0
else
begin
x := 0
y := 1
for i := 1 to n – 1
begin
z := x + y
x := y
y := z
end
end
a. What does procedure A do?
b. Please write down the recursive equation.
c. Design an algorithm which is the recursive version of procedure A.
(describe it by pseudo-code)
3.5 (p.278)
10. Prove Lamé’s Theorem: a,bN, ab>0, the number of steps in Euclid’s
algorithm to find gcd(a,b) is  5k, where k = log10 b+1 is the number of
decimal digits in b. (10%)
(Hint: Let fn be Fibonacci series, then for all integers n  3, fn > α n−2, where α =
(1+51/2)/2 ≈ 1.61803)
3.4 (p.261)