C__Documents_and_Settings_raghu_Desktop_CS_2800_Midterm_sample

C__Documents_and_Settings_raghu_Desktop_CS_2800_Midterm_sample

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 workout-style problems, please be sure to show all your work to be eligible for partial credit. • You are allowed one two-sided 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 one-to-one? Is it onto? [Ans] The function is one-to-one (since f ( n ) = 2 n + 1), but it is not onto (the even integers do not have a pre-image). (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).

Page1 / 8

C__Documents_and_Settings_raghu_Desktop_CS_2800_Midterm_sample

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online