
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
This exam paper is very easy to understand and very helpful to built a concept about the foundation of computers and discrete structures.The key points in these exam are:Alternating Sequence, Efficient in Memory, Recursive Algorithm, Exponential Order, Fibonacci Sequence, Polynomial Order, Linear Search Algorithms, Euclidean Algorithm, Costing Algorithms, Principle of Mathematical Induction
Typology: Exams
1 / 1
This page cannot be seen from the preview
Don't miss anything!

SAMPLE Exam 2 - Fall 2006 - Discrete Structures
1. Circle T if the corresponding statement is True or F if it is False. T F The sequence {1, โ1, 1, โ1, 1, โ1,...} is an example of an alternating sequence. T F The Principle of Mathematical Induction can be used to discover new theorems. T F A recursive algorithm is generally more efficient in memory than its equivalent iterative version. T F 3 + 6 + 9 + 12 + ... + 300 = 15150. T F Algorithms that are Exponential order grow faster than ones that are Polynomial order. T F In costing algorithms, the sum of the orders equals the maximum order. T F The Fibonacci sequence only requires one initial condition. T F In general, Linear Search algorithms are less efficient than Binary Search algorithms. 2. Let { an } and { bn } be the sequences defined, for n > 0, by:
an = n โ 2, and bn = 3 n + 1. Find c 0 , c 1 , c 2 , and c 3 when c (^) n = ( an + bn ).
3. Given positive integer inputs, A and B, write out in pseudocode the algorithm to calculate (A MOD B) and (A DIV B). You may assume B < A. 4. (a) Rank from 1 (least complex) to 5 (most complex) the following orders:
(b) Find the Big-Oh of the algorithm with complexity: ( n^6 + 1)(2 n^2 + 3 n ) + ( n^3 + 5 n^2 + 2)( n^3 ).
5. Use the Euclidean Algorithm to find GCD(100, 22). 6. Prove one of the two Theorems below using Mathematical Induction.
Theorem 2: If a 0 = 0 and a 1 = 100, then an = an โ 1 + a (^) n โ 2 is divisible by 100.
7. Prove one of the two Theorems below:
Theorem 1: The product of odd integers is odd.
Theorem 2: If ( a MOD p ) = ( b MOD p ), then p divides ( a โ b ).
8. Prove one of the two Theorems below by Contradiction.
Theorem 1: is irrational.
Theorem 2: There does not exist a largest integer.
a i
i = 0
n
a n + 1