{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C__Documents_and_Settings_raghu_Desktop_midterm_v4

C__Documents_and_Settings_raghu_Desktop_midterm_v4 - CS...

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 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.
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern