Test #3 Review Questions

advertisement
CPSC 207 Test #3 Review Questions
November 25, 2014
14. Recursive Definitions
a) Given a recursive definition, be able to enumerate the first 10 members of
the set.
b) Express the function n! recursively.
c) Express the Fibonacci sequence recursively.
d) Let the set S be defined recursively as 3  S and x+y  S if xS and yS. Let
set A be the set of positive integers divisible by 3. Prove that S = A
e) Define the Golden Ratio. Google the Golden Ratio and give two examples of
where it is used.
f) Define the Golden Rectangle. Google the Golden Rectangle and give two
examples of where it is used.
g) Slide #20 and following of slide deck 14 is not included in Test #3 or the
Final Exam.
h) Define the Towers of Hanoi Problem.
i) Give a pseudo-code solution to the ToH problem.
j) Show that the number of disk moves required to solve the ToH problem with
k disks is 2k – 1.
15. Basic Counting Principles
I may choose one or two problems from the odd numbered problems (1, 3, 5,
… 31) at the end of Rosen, Section 5.1 (pp. 344 – 346).
Be able to convert a number from {binary, octal, decimal, hexadecimal} to
{binary, octal, decimal, hexadecimal}
16. Pigeon Hole Principle
I may choose one or two problems from the odd numbered problems (1, 3, 5,
… 29) at the end of Rosen, Section 5.2 (pp. 353 – 354).
17. Probability
I may choose one or two problems from the odd numbered problems (1, 3, 5,
… 29) at the end of Rosen, Section 6.1 (pp. 398 – 399).
18. Relations
Given a relation, be able to show that it is or is not reflexive, symmetric,
antisymmetric, asymmetric, and transitive.
I may choose one or two problems from the odd numbered problems (1, 3, 5,
7, 17, 19) at the end of Rosen, Section 8.1 (pp. 527-528).
19. Representing Relations
a) Be able to perform matrix multiply on two matrices.
b) I may choose one or two problems from one of the odd numbered problems
(1, 3, 7, 9, 9, 11, 13, 15) at the end of Rosen, Section 8.3 (pp. 542-543). Ignore
problems involving irreflexivity.
Download