old-midterm1-solutions

old-midterm1-solutions - CS 173 Fall 2009 Midterm 1...

This preview shows pages 1–2. 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 2009 Midterm 1 Solutions Problem 1: Short answer (12 points) State whether each of the following claims is true or false. Justification/work is not required, but may increase partial credit if your short answer is wrong. (a) − 6 | − 3 Solution: False. The magnitude of -6 is larger, so there’s no way you could have an integer k such that − 6 k = − 3. (b) For every integer x , if x is a negative prime number then x 2 < 0. Solution: True. It’s vacuously true because no value of x will make the hypothesis true. (c) ⌈ x ⌉ < ⌊ x + 1 ⌋ for any real number x ? Solution: False. Suppose x = 3 . 1. Then ⌈ x ⌉ = 4 = ⌊ x + 1 ⌋ . (d) For any set A , A ∈ P ( A ). Solution: True, because A is a subset of itself. (e) For any positive integers p and q , if lcm( p, q ) = pq , then p and q are relatively prime. Solution: True. lcm( p, q ) = pq gcd( p,q ) and the definition of “relatively prime” is gcd( p, q ) = 1. (f) P ( A ∪ B ) = P ( A ) ∪ P ( B ), for any sets A and B . Solution: False. A ∪ B is often larger because it can contain “mixed” subsets, with some elements from A and some elements from B . Problem 2: Calculation (11 points) Calculate the values of the following expressions. Your answer to (e) must be in closed form, i.e. not using a summation. Recall that P ( A ) is the power set of A ....
View Full Document

{[ snackBarMessage ]}

Page1 / 4

old-midterm1-solutions - CS 173 Fall 2009 Midterm 1...

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

View Full Document
Ask a homework question - tutors are online