Name: CIS 375 Intro to Discrete Mathematics Exam 2 (Section M001: Yellow) 10 November 2016 Question Points Possible Points Received 1 20 2 12 3 14 4 10 5 8 6 12 7 12 8 12 Total 100 Instructions: 1. This exam is a closed-book, closed-notes exam. 2. Legibility counts! Make sure I can read (and find!) your answers. If you need more room for an answer than that given, use the back side of the pages. Be sure to leave a note indicating where the answer is. 3. This test should have 10 pages (including this cover sheet). Let me know now if your copy does not have the correct number of pages. 4. The last page of this exam lists some relevant definitions. Also recall these sets: Z: set of all integers R: set of all real numbers Z + = {z Z : z > 0} Z = {z Z : z < 0} N= {z Z : z 0}
1. (20 points) Consider the following relations on the set A = {1, 4, 6, 8}: (a) (2 points) Give R 1 1. R 1 = {(1, 8), (1, 6), (8, 6), (8, 1)} R 2 = {(1, 1), (1, 4), (4, 1), (4, 4)} R 3 = {(1, 1), (4, 8), (8, 8), (6, 6), (8, 6), (4, 4)} R 4 = {(a, b) A A : a + b is even} (b) (2 points) List all of the relations from the set {R 1, R 2, R 3 } that are functions. (If none of them are functions, then simply write none.) (c) (16 points) Fill in the table below to indicate which relations possess which properties: Write yes to indicate that the given relation has the stated property. Write no to indicate that the given relation does not have the stated property. Reflexive R 1 R 2 R 3 R 4 Symmetric Transitive Irreflexive Antisymmetric
2. (12 points) Suppose the following definitions are made: k : Z Z Z { (w, 1), if w < 0 k(w) = (2, w), if w 0 l : N Z + { w + 1, if 0 w 3 l(w) = w 1 if w 4 f : N N N f(x, y) = x + y + 3 q : R R q(m) = m 3 h : Z + N h(n) = 5n (a) (4 points) Calculate the following: i. domain of f ii. codomain of l iii. (l h)(3) (b) (6 points) Fill in the following table, writing yes if the given function has the stated property and no otherwise. k q l f 1-1 onto (c) (2 points) List all of the functions from the set {k, q, l, f} that are bijections. (If none of them are bijections, simply write none.)
3. (14 points) (a) Give a function p : Z N N that is 1-1 and not onto. (b) Give a function q : Z Z Z + that is onto and not 1-1. (c) Give a function k : Z Z Z + that is not onto and not 1-1. (d) Give a function j : Z + N that is invertible. (e) How many functions are there with domain {20, 40, 60} and codomain {5, 6}? (f) How many 1-1 functions are there with domain {20, 40, 60} and codomain {5, 6}? (g) How many onto functions are there with domain {20, 40, 60} and codomain {5, 6}?
4. (10 points) (a) How many binary relations are on the set {10, 20, 30, 40, 50}? (b) How many elements are in the smallest equivalence relation that contains both (1, 2) and (2, 3)? (c) How many elements are in the smallest irreflexive relation on the set {1, 2, 3, 4, 5, 6, 7, 8}? (d) How many elements are in the largest antisymmetric relation on the set {41, 42, 43, 44, 45, 46}? (e) Give a relation that contains (3, 5) and is transitive and symmetric.
5. (8 points) Let U be the following set of numbers: U = {13, 16, 23, 34, 47, 141, 231, 243, 256, 301}. For each w U, let max(w) denote the largest digit that appears in the representation of w: for example, max(141) = 4 and max(205) = 5. Let R 1 and R 2 be the relations defined on set U as follows: R 1 = {(x, y) U U : max(x) = max(y)} R 2 = {(x, y) U U : x y 20} Note: x y denotes the absolute value of x y. So, for example, 3 7 = 7 3 = 4. (a) R 1 is an equivalence relation: list the equivalence classes of R 1. (b) R 2 is not an equivalence relation: explain why not by explicitly showing how one of the three essential properties fails to hold.
6. (12 points) Consider the following claim: If q is pensive and k is centric, then q k is not orbic. Note: I am not asking you to prove the claim, so you do not need to worry about the definitions of pensive, centric, or orbic. Important note: I will interpret any commas as and unless you specify otherwise; if you mean or in any context, explicitly write it out. (a) Suppose you wanted to prove this claim via a direct proof. i. What would you need to assume? ii. What would you need to show? (b) Suppose you wanted to prove this claim via a proof by contraposition. i. What would you need to assume? ii. What would you need to show? (c) Suppose you wanted to prove this claim via a proof by contradiction. i. What would you need to assume? ii. What would you need to show?
7. (12 points) Give a direct or indirect proof of the following claim: Let P and Q be relations on set X. If P Q is irreflexive and Q is reflexive, then P is irreflexive. Note: As always, follow the course format for writing proofs. Be explicit about what you re assuming, what you need to show, and your underlying reasoning. You do not need to rewrite the claim.
8. (12 points) Give a direct or indirect proof of the following claim: Let k : G H and q : H J be functions. If q k : G J is 1-1, then k is 1-1. Note: As always, follow the course format for writing proofs. Be explicit about what you re assuming, what you need to show, and your underlying reasoning. You do not need to rewrite the claim.
A Collection of Some Relevant Definitions Subsets Let A and B be sets. A is a subset of B provided that the following condition holds: for all objects x, if x A then x B. Relations Let R X X be a relation. R is reflexive provided that the following condition holds: for all x X, (x, x) R. R is irreflexive provided that the following condition holds: for all x X, (x, x) R. R is symmetric provided that the following condition holds: for all x, y X, if (x, y) R then (y, x) R. R is antisymmetric provided that the following condition holds: for all x, y X, if (x, y) R and (y, x) R, then x = y. R is transitive provided that the following condition holds: for all x, y, z X, if (x, y) R and (y, z) R, then (x, z) R. R is an equivalence relation provided that R is reflexive, symmetric, and transitive. Functions Let f : X Y be a function. f is an injection (or 1-1) provided that the following condition holds: for all x 1, x 2 X, if f(x 1 ) = f(x 2 ) then x 1 = x 2. f is a surjection (or onto) provided that the following condition holds: for all y Y, there is a w X such that f(w) = y. f is a bijection provided that f is both 1-1 and onto.