
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
The second exam for the discrete structures course, cmsc203, offered at carnegie mellon university in the fall of 2007. The exam covers topics such as geometric sequences, mathematical induction, recursive algorithms, division algorithm, greatest common divisor (gcd), least common multiple (lcm), and various theorems. Students are required to answer multiple-choice questions, find values of sequences, and prove theorems.
Typology: Exams
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Fall 2007 - CMSC203 - Discrete Structures - Exam 2
1. Circle T if the corresponding statement is True or F if it is False. T F The sequence {0, 1, 4, 9, 16, ...} is an example of an Geometric sequence. T F The Principle of Mathematical Induction can be used to create new formulas. T F Any recursive algorithm has an equivalent iterative version. T F 10 + 20 + 30 + 40 + ... + 10000 = 5005000.
T F 2 + 2 + 4 + 8 + 16 + ... + 2^19 = 2^20. T F Algorithms whose order is O(log n ) are less efficient than those of O( n ). T F The Euclidean Algorithm has exponential order. T F Linear Search algorithms are as efficient as Binary Search algorithms.
2. Let { an } and { bn } be the sequences defined, for n > 0, by:
an = (โ1)( n^ +^ 1)^ , and bn = ( n^2 + 1). Find c 0 , c 1 , c 2 , and c 3 when c (^) n = ( an )( bn ).
3. Trace the steps of the Division Algorithm to calculate (21 MOD 4) and (21 DIV 4). 4. (a) Give a Recursive Definition for the Natural Numbers.
(b) Find the Big-Oh of the algorithm with complexity: ( n + 4)(3 n^2 + 1) + ( n^2 + 2 n + 2)( n^2 ).
5. (a) Given a = 2 53250771141381711194237293318.
and b = 2 8365775110139172191223529133111 , then GCD( a,b ) = ___________________ and LCM( a,b ) = ___________________. (b) Use the Euclidean Algorithm to find GCD(200, 44).
6. Prove one of the two Theorems below using Mathematical Induction.
Theorem 1: For all integers n > 1,.
Theorem 2: If a 0 = 0, a 1 = 50, and a 2 = 100, then an = an โ 1 + an โ 2 + a (^) n โ 3 is divisible by 50.
7. Prove one of the two Theorems below: Theorem 1: Given that either a Natural Number or its successor is even, if n is an odd Natural
Number, then ( n^2 MOD 8) = 1.
Theorem 2: If a, b, q are Integers with q > 1, and ( a MOD q ) = ( b MOD q ), then ( a โ b ) is a multiple of q.
8. Prove one of the two Theorems below by Contradiction or Contraposition.
Theorem 1: If n is a Natural Number and n^2 is even, then n is even.
Theorem 2: The Natural Numbers are an infinite set.
i 2
i = 1
n
n n ( + 1 ) ( 2 n + 1 ) 6