
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
A fall 2009 exam for cmsc 203, a university-level course on mathematical concepts and algorithms. The exam includes multiple-choice questions covering topics such as the gcd, mathematical induction, binary search, fibonacci sequence, and division algorithm.
Typology: Exams
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Exam 2 CMSC 203 Fall 2009
1. Circle T if the corresponding statement is True or F if it is False. T F For any positive integer, n , GCD( n , 1) = 1. T F Every positive integer is either prime or composite. T F If a ≡ b mod p , then ( a / p) = ( b / p ) T F If a and b are positive integers, then a = b ( a DIV b ) + ( a MOD b ).
T F 1 + 3 + 3^2 + 3^3 + 3^4 + ... + 3^33 = 3^34 − 1.
T F Algorithms with O( n^3 ) are less efficient than those with O(3 n ). T F Any statement validated by the Weak Principle of Mathematical Induction cannot be validated by the Strong Principle of Mathematical Induction. T F GCD(368, 60) = GCD(60, 8).
2. Find GCD( 2^35274111130175190231291312 , 2^45170112134174193231290313 )
3. List out the search intervals of the Binary Search algorithm to find 4 in the list: 3 4 6 9 13 18 21 34 55 72 83 85 92 104 111 133
4. List the next 5 terms of the sequence { an } that follows the Fibonacci relation with the initial
conditions, a 0 = 2 and a 1 = 4.
5. Write out the Division Algorithm and trace its steps to calculate (44 MOD 12).
6. What set, S, is defined by the Inductive Definition: 1 ∈ S, and, if n ∈ S, then (5 n ) ∈ S.
7. Show n^10 is the Big-Oh of the algorithm with complexity:
(2 n^3 + 3 n^2 )( n^7 + 6 n^5 ) + [3 n^5 + 2 n^4 ].
8. Prove ONE of the TWO Theorems below using Mathematical Induction.
Theorem 1: For all Natural numbers n ,.
Theorem 2: If a 0 = 10, a 1 = 20, and a 2 = 30, then an = an − 1 + an − 2 + an − 3 is a multiple of 10,
for all n > 2.
9. Prove ONE of the TWO Theorems below: Theorem 1: If a , b , and c are Integers, with a = b + c , then GCD( a, b ) = GCD( b, c ). Theorem 2: If a, b, c, d, and p are Integers with a ≡ b mod p , and c ≡ d mod p , then ( a + c ) ≡ ( b + d ) mod p.
10. Prove ONE of the TWO Theorems below by Contradiction or Contraposition. Theorem 1: The set of Natural numbers is infinite.
Theorem 2: If n is an Integer and n^2 is even, then n is even.
7 i i = 0
n
7 n^ +^1 Ð 1 6 = ----------------------