EECS 210 Review Sheet for Test 2 Spring 2008 Given below are some questions to help get you started in your preparation for test 2. You are responsible for all material covered in class even if there is no question below on that topic. 1. Use Euclid’s algorithm to find gcd(700, 203) 700 = 3•203 + 91 203 = 2•91 + 21 91 = 4•21 + 7 21 = 3•7 + 0 Thus, the gcd is 7. 2. Let A = {1, 2, 3, w, z} and B = {1, {2}, {3}, {w, z}}. Find a. B - A = { {2}, {3}, {w,z} } b. n((B) = 16 c. List the subsets of A that are also subsets of B. Ø and {1} 3. Let A be the set of English words that contain the letter x and let B be the set of English words that contain the letter q. Express the following set as a combination of A and B. The set of English words that contain neither x nor q. A' B' 4. If A, B and C are nonempty sets, determine if each of the following is always, sometimes or never true. a. If A B and B C = then A C = Always b. A - (B C) and B - (A C) are disjoint Sometimes c. If A B = B, then A B Sometimes 5. Shade a Venn diagram so the shaded area is the following set: (A - B) (A - C) 6. Assume that both A and B are subsets of M. Consider the statement: If A B, then (M - B) (M - A). Prove the statement. Be sure to give reasons for each step. Let x M - B x M and x B xA x M- A (M - B) (M - A) Definition of difference Given that A B and definition of subset Definition of difference Definition of subset 7. If An = { x | x N and x divides n with zero remainder}, find the elements of a. A40 = {1, 2, 4, 5, 8, 10, 20, 40} b. A0 = {1, 2, 3, …} all of Z+ 8. For each of the following, determine if it is A: a function that is one-to-one but not onto B. a function that is onto but not one-to-one C: a bijection D: a function that is neither one-to-one nor onto E: not a function a. f: N N defined by f(x) = x! D (Remember 0! = 1! = 1) b. g: Z+ Z+ defined by g(x) = x/2 E (Not defined for x = 1) c. h: Z Z+ defined by h(x) = x2 + 1 D 9. Consider the function f: N N defined by f(x) = x2 a. Prove or disprove that f is one-to-one. Suppose f(x) = f(y) thus, x2 = y2 so x = y since the domain is N, we do not need to say x = y Therefore, f is one-to-one b. Prove or disprove that f is onto. Suppose that f is onto and consider 2, an element of the codomain if f(x) = 2, then x2 = 2 and thus x =2. Since 2 is not in N, 2 has no preimage so f is not onto. 10. Consider the function g: Z Z Z defined by g(x, y) = x + y a. Prove or disprove that g is one-to-one. Since g((2, 3)) = g((1, 4)) = 5 g is not one-to-one b. Prove or disprove that g is onto. Let x be any integer in Z Consider the ordered pair (x, 0) Since g((x, 0)) = x, g is onto. 11. Let f and g be the function from Z to Z defined below: f(x) = 2x2 + 3x g(x) = 4x - 17 a. find gf gf(x) = g(2x2 + 3x) = 4(2x2 + 3x) – 17 = 8x2 + 12x – 17 b. find fg fg(x) = f(4x – 17) = 2(4x – 17)2 + 3(4x – 17) = 32x2 – 260 x + 527 11. Let A = {a, b, c} and let B = {a, c, d}. Define a relation R between (A) and (B) by (C, D) R if C D. List all ordered pairs in R. Subsets of A are Subsets of B are 1. {a} 2. {a} {b} 3. {c} {c} 4. {d} {a, b} 5. {a, c} {a, c} 6. {a, d} {b, c} 7. {c, d} {a, b, c} 8. {a, c, d} For ease of discussion the sets in (B) have been numbered. The following are the subset relationships defined on the power sets: is a subset of all sets in (B) (8 ordered pairs) {a} is a subset of 2, 5, 6, and 8 (4 ordered pairs {b} is not the subset of any set in (B) {c} is the subset of 3, 5, 7, 8 (4 ordered pairs) {a, b} is not the subset of any set in (B) {a, c} is the subset of 5 and 8 (2 ordered pairs) {b, c} is not the subset of any set in (B) {a, b, c} is not the subset of any set in (B)