
CSE20 Midterm 2, May 12, 2011, Name
1. Residual Number System (10 points): Show the operation of 8 ×17 in a residual
number system with moduli (m1, m2, m3) = (3,7,8).
2. Residual Number System (15 points): Suppose (x%4, x%5, x%7) = (1,2,3),
where symbol % denotes modulus operation. Follow the procedure of Chinese re-
mainder theorem to derive the smallest positive integer xthat satisfies this system.
3. Boolean Algebra (10 points): State the definition of Boolean algebra.
4. Boolean Algebra (10 points): Use Boolean algebra (laws and theorems) to prove
the De Morgan’s theorem: (ab)0=a0+b0.
5. Boolean Algebra (15 points): Use Boolean algebra (laws and theorems) to trans-
form Boolean function, E(a, b, c) = a0bc +ab0+bc0, into product-of-sums form.
6. Boolean Algebra (15 points): Reduce the following to an expression of a minimal
number of literals: E(a, b, c) = a0b0+b0c+ac +bc +a0bc0.
7. Recursive Function (15 points): A frog knows 3 jumping styles (A, B, C). Styles
A, B jump forward by 1 foot, and style C jumps forward by 2 feet. Let aidenote
the number of ways to jump over a total distance of ifeet.
(a) What is a1,a2,a3?
(b) Derive the recursive formula of an.
(c) Find the solution of the recursion.
8. Recursive Function (10 points): Consider the following homogeneous linear
recurrence relation: an= 2ran−1−r2an−2. Show that an=c1rn+c2nrnsatisfies
the recurrence relation, where c1,and c2,are constant coefficients.
1