This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 2800 – MIDTERM FALL 2008 Name: Netid: Instructions: • There are four questions in all. They are of varying difficulty, so be sure to read them all before starting. • For the induction problems, CLEARLY state your base case, inductive hypothesis and how it is used in your inductive step. • For the workoutstyle problems, please be sure to show all your work to be eligible for partial credit. • You are allowed one twosided sheet of notes. Problem 1 2 3 4 Total (/40) Score Grader 1 1. Short Answers [16 points] (a) [2pts] Compute gcd (13 , 127) using Euclid’s algorithm. Show your work. [Ans] 1 (b) [2pts] Arrange the following functions in increasing order of growth rate: 2 n , √ n n , n √ n [Ans] n √ n < 2 n < √ n n (c) [2pts] Write the logical negation of the following sentence in simple English: ‘If I can see Russia from my house, then I’m a foreign policy expert’. [Ans] I can see Russia from my house and I’m not a foreign policy expert. 2 (d) [2pts] Find T ∞ i =1 [1 1 i , 1] [Ans] { 1 } (e) [2pts] Compute the following quantities: i. lcm (20! , 12!) [Ans] 20! ii. 5 258 mod 17 [Ans] 8 (f) [2pts] We define the function g : Q → Q to be g ( p/q ) = q with p, q ∈ Z . Is this a valid definition of a function? Justify your answer.a valid definition of a function?...
View
Full
Document
This note was uploaded on 12/04/2008 for the course CS 2800 taught by Professor Selman during the Fall '07 term at Cornell University (Engineering School).
 Fall '07
 SELMAN

Click to edit the document details