This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 173, Fall 2010 Midterm 1 Solutions Problem 1: Multiple choice (14 points) Check the appropriate box for each statement. (One box per statement.) If you change your answer, make it very clear when you’ve meant to uncheck a box. If f : Z → R is a function such that f ( x ) = 2 x then the set of all even integers is the domain of f the codomain of f the image of f √ − 3 ≡ 7 (mod 10) True √ False Because 7 − ( − 3) is a multi ple of 10. Two positive integers p and q are relatively prime if and only if their greatest common divisor is prime. True False √ Relatively prime means the gcd is 1. { 3 , 4 } ∩ { a, b } = {∅} True False √ This intersection is the empty set, not the set containing the empty set. ⌊ x ⌋ < ⌈ x ⌉ for any rational number x True False √ What if x is an integer? For any positive integers a and b , gcd( a, b ) = gcd( b mod a, a ) True √ False The basic fact we used in the Euclidean algorithm for gcd. For any integer x , if x 2 < 0, then 2 x + 5 is even. True √ False Vacuously true. Problem 2: Set theory calculation (8 points) Suppose that A = { b, c } , B = { 5 , 8 } ....
View
Full Document
 Spring '10
 FLECK
 Euclidean algorithm

Click to edit the document details