{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

midterm1-solutions

# midterm1-solutions - CS 173 Fall 2010 Midterm 1 Solutions...

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

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.

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

{[ snackBarMessage ]}

### Page1 / 4

midterm1-solutions - CS 173 Fall 2010 Midterm 1 Solutions...

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

View Full Document
Ask a homework question - tutors are online