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 280 – MIDTERM FALL 2007 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 [14 points] (a) If f ( x ) is O ( g ( x )) and g ( x ) is O ( f ( x )), then f ( x ) is Θ( x ). True or false? [Ans] True. (b) [2pts] We define the function f : Z + 7→ Z + as f ( n ) = b ( n + 0 . 5) c + d ( n + 0 . 5) e . Is f onetoone? Is it onto? [Ans] The function is onetoone (since f ( n ) = 2 n + 1), but it is not onto (the even integers do not have a preimage). (c) [2pts] The GCD of two numbers is 3. Their LCM is 180. One of the numbers is 45. What is the other? [Ans] 12. (d) [2pts] What is 7 452 mod 11? [Ans] 5. 2 (e) [2pts] In the questions below, assume that A = { a, b, c } and B = { b, { c }} ....
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