{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C__Documents_and_Settings_raghu_Desktop_midterm_v4

# C__Documents_and_Settings_raghu_Desktop_midterm_v4 - CS...

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

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 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

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

View Full Document
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 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.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern