Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CmSc 175 Discrete mathematics Homework 08 due 03/31 1. Let N be the set of natural numbers. Define a relation R on N x N : R = { ((a, b), (c, d)) | ad = bc} Prove that R is an equivalence relation on N x N a) Reflexifity: we have to show that (a,b) N x N, ((a,b),(a,b)) R Let (a,b) N x N ab = ba (Basic algebra) by the def. of R, ((a,b),(a,b)) R Therefore R is reflexive b) Symmetry We have to show that (a,b), (c,d) N x N if ((a,b),(c,d)) R then ((c,d),(a,b)) R Note: In order to show that ((c,d),(a,b)) R we need to show that cb = da Let ((a,b),(c,d)) R By the def of R, ad = bc da = cb (basic algebra) cb = da (basic algebra) Therefore, by the def of R, ((c,d),(a,b)) R Therefore R is symmetric c) Transitivity We have to show that (a,b), (c,d) , (e,f) N x N if ((a,b),(c,d)) R and ((c,d), (e,f)) R then ((a,b),(e,f)) R Note: In order to show that ((a,b),(e,f)) R we need to show that af = be Let ((a,b),(c,d)) R and ((c,d), (e,f)) R By the def. of R we have: ad = bc cf = de Multiply the two sides: adcf = bcde Divide both sides by dc: 1 af = be Therefore, by the def. of R , ((a,b),(e,f)) R Therefore R is transitive Therefore R is a relation of equivalence 2. Let R1 and R2 be any two equivalence relations on the same set A. Examine the properties of R1 R2 and determine if it is a relation of equivalence or not. (prove /disprove each property) R1 R2 is not a relation of equivalence because it is not necessarily transitive. Here is an example of two relations of equivalence R1 and R2 on the set A = {a,b,c} R1 = {(a,a),(b,b),(c,c), (a,b), (b,a)} R2 = {(a,a),(b,b),(c,c), (b,c), (c,b)} R1 R2 = {(a,a),(b,b),(c,c), (a,b), (b,a), (b,c), (c,b)}, not transitive because the pair (a,c) is not in the union. 3. For each sentence below do the following: a. b. c. d. Choose appropriate predicates Write the quantified predicate expression Negate the expression Translate the negated expression in English 1. No polynomial function is continuous x, polynomial(x) ~continuous(x) x, polynomial(x) continuous(x) Some polynomial functions are continuous 2. Some polynomial functions are not continuous x, polynomial(x) ~continuous(x) x, polynomial(x) continuous(x) All polynomial functions are continuous 4. Prove the statement: For all integers n, if (n+1)(n-1) is odd then n is even 2 Hint: prove the equivalent contrapositive statement using direct proof. This is called proof by contraposition. The contrapositive statement is: If n is odd, then (n+1)(n-1) is even. Let n be odd, n = 2k + 1. Then n+1 = 2k + 2 = 2(k+1), n – 1 = 2k (n+1)(n-1) = 2(k+1).2k , even number The statement “If n is odd, then (n+1)(n-1) is even.” Is equivalent to the statement “if (n+1)(n-1) is odd then n is even” Therefore, For all integers n, if (n+1)(n-1) is odd then n is even 5. Let S(n) = 2 + 6 + 18 + …. + 2*3(n-1) Prove the statement P(n): S(n) = 3n – 1, n ≥1 a. Inductive base Show that P(1): S(1) = 31 – 1 = 2 is true By the definition of S(n), S(1) = 2, therefore P(1) is true b. Inductive step Show that P(k) P(k+1) is true. P(k) : S(k) = 3k – 1, P(k+1) : S(k+1) = 3k+1 – 1 Assume that P(k) is true, i.e. S(k) = 3k – 1 S(k+1) = S(k) + 2*3(k+1-1) = 3k – 1 + 2* 3 k = 3* 3 k – 1 = 3k+1 – 1 Therefore P(k+1) is true, Therefore P(k) P(k+1) is true Therefore by the principle of math induction, S(n) = 3n – 1, n ≥1 6. Given a deck of 52 cards, what is the probability to have a 5-card hand with exactly 2 spades? Explain your answer. Let E be the number of hands with exactly 2 spades, and S be the total number of 5-card hands. E = 13C2 * 39C3 = (13!*39!)/ (11!*2!*36!*3!) = 12*13*37*38*39 / 12 = 13*37*38*39 S = 52C5 = 52! / 47!*5! 3 Thus the probability is (13*37*38*39 * 47!*5! ) / 52! = (13*37*38*39 * 5! ) / (48*49*50*51*52) = (37*19*13 ) / (4*49*10*17) = 0.27 4