Document Sample

Answers to some typical exercises —Any suggestion or modification is welcomed. P51.12 Write each of the following in terms of p, q, r and logical connectives. (a) Today is Monday and the dish did not run away with the spoon. (b) Either the grass is wet or today is Monday. (c) Today is not Monday and the grass is dry. (d) The dish ran away with the spoon, but the grass is wet. Solution: Let p: Today is Monday; q: The grass is wet; r: The dish ran away with the spoon. Then: (a). p ~ r ; (b). p q ; (c). ~ p ~ q ; (d). r q P57 In exercises 6 and 7, let p, q, and r be the following statements: p: I will study discrete structure; q: I will go to a movie; r: I am in a good mood. 7. Write English sentences corresponding to the following statements. (a). ((~ p) q) r ; (b). r ( p q) ; (c). (~ r ) ((~ q) p) ; (d). (q (~ p)) r Solution: (a) If I go to a movie and don’t study discrete structure, then I am in a good mood. (b) If I am in a good mood, then I will study discrete structure or go to a movie. (c) If I am not in a good mood, then I won’t go to a movie or I will study discrete structure. (d) I will go to a movie and won’t study discrete structure if and only if I am in a good mood. P57.14 If p q is false, can you determine the truth value of (~ p) ( p q) ? Explain your answer. Solution: Since p q is false, then p is T and q is F. This implies that ~p is F and ( p q) is F. Hence, (~ p) ( p q) is F. P57.18. Write the negation of each of the following in good English (b) If Coral is not sick, then if she goes to the picnic, she will have a good time. Solution: Let p, q and r be the following statements: p: Carol is sick, q: Carol goes to the picnic r: Carol will have a good time. Then the statement could be represented as: ~ p (q r ) . On the other hand, we notice that ~ p (q r ) p (~ q r ) ( p r ) (~ q) . Then the negation of the statement is ~ (( p r ) (~ q)) ~ ( p r ) q (~ p ~ r ) q . So in English, the negation of the statement is: Carol is not sick, and she goes to the picnic, but she won’t have a good time. P63.29 Prove that if x is a rational number and y is an irrational number, then x + y is an irrational number. Proof: Suppose, for sake of contradiction, that x +y is rational. Then there are integers a and b a c such that x + y . Since x is rational, then x (with some integers c and d ). Then we b d a c ad bc have y = x + y x = . Noting that ad bc and bd are integers, y is b d bd rational. This is a contradiction. Hence, x + y is irrational. P78.26.Three fair six-sided dice are tossed and the numbers showing on the top faces are recoded as a triple. How many different records are possible? Solution: We can give the result in the following two different ways. A) Case 1: The triples have 3 different numbers. There are 6 C3 different records in this case. Case 2: The triples have 2 different numbers. Then there are 2 6 C2 different records in this case. Case 3: The triples have the same number. Then there are 6 C1 different records in this case. Combining the above three cases, the result is 6 C1 + 2 6 C2 + 6 C3 =56. B) The problem is equivalent to choosing r numbers from n different numbers in which the repeatition is allowed. Then we can use the formula n r 1 Cr to get the result: 6 31 C3 =56. P86.19. Prove that any sequence of six numbers must contain a subsequence whose sum is divisible by six. Proof: Consider the remainder (divided by six) of the sums c1 , c1 c2 , c1 c2 c3 , c1 c2 c3 c4 , c1 c2 c3 c4 c5 and c1 c2 c3 c4 c5 c6 . If one of these has remainder 0 when divided by 6, then we have done. If none of them have remainder 0, then there are at most 5 cases (pigeonhole) of the remainder. Thus, at least two of them must have the same remainder. The positive difference of these two is a subsequence whose sum is divisible by 6. P100.8.Let A= {0, 1}. Give a recurrence relation for the number of strings of length n in A* that do not contain 111. Solution: Let c n be the number of strings of length n. Since 0 and 1 are the only strings of length 1, c1 = 2. Also c 2 = 4, c3 = 7. In general, any strings p of length n -1 that does not contain 111 can be catenated with 0 to form a string 0 p, a string of length n that does not contain 111. Similarly, the strings q and r of length n-2 and n-3 can be catenated with 10 and 110 to form a string 10 q and 110 r, respectively. These 3 cases are all the “good” strings of length n. Hence, cn cn 1 cn 2 cn 3 with the initial conditions c1 =2, c 2 = 4, c3 = 7. P100. 17. an 4an1 5an2 , a1 2, a2 6 Solution: The associated equation for this linear homogeneous relation is x 4 x 5 0 . The 2 roots of the equation are -1 and 5. Thus, by the theorem on P98, an u (1) v 5 . Using n n 2 4 this formula and the initial conditions: ﹣u+5=2, u +25v = 6, we find that u is , v is . 3 15 2 4 Then an (1)n 5n 3 15 P100.23. Develop a general explicit formula for a nonhomogeneous recurrence relation of the form an ran 1 s , where r and s are constants. Solution: an ran 1 s r (ran 2 s ) s r an 2 rs s 2 r n 1a1 r n 2 s s n 1 r n 1 1 r a1 s ( r 1 ). r 1 If r =1, then an a1 (n 1) s . P127. 20. A = the set of all ordered pairs of real numbers; (a, b) R (c, d) if and only if a = c. Show that R is transitive. Solution: Since (a, b) R (a, b) for any a, b ∈ A, R is reflexive. If (a, b) R (c, d), then a = c, and therefore, (c, d) R(a, b) . This implies that R is symmetric. Now suppose (a, b) R (c, d) and (c, d) R (e, f). Then a = c and c = e and, hence, a = e and (a, b) R (e, f). It follows that R is transitive P128. 29. Prove or disprove that if a relation on a set A is transitive and irreflexive, then it is asymmetric. Proof: Let R be transitive and irreflexive. We prove that R is asymmetric. For the sake of contradiction, assume that R is not asymmetric, i.e., a R b and b R a for some a and b. Then a R a since R is transitive. But this contradicts the fact that R is irreflexive. Hence R is asymmetric. P132. 19. A relation R on a set is called circular if a R b and b R c imply c R a. Show that R is reflexive and circular if and only if it is an equivalence relation. Proof: Suppose that R is reflexive and circular. If a R b, then b R a (since b R b and R is circular). Hence R is symmetric. If a R b and b R c, then c R a. Noting that R is symmetric, a R c , i.e., R is transitive. Conversely, suppose that R is an equivalence relation. Then R is reflexive. If a R b and b R c, then a R c (transitivity) and c R a ( symmetricity ). This implies that R is circular, which completes the proof. P106. 29. Let A, B, and C be subsets of U. Prove that A (B C)=(A B) (A C). Proof: If (x, y) A (B C), then x A, y B C. Hence (x, y) A B or (x, y) A C. Thus, A (B C) (A B) (A C). Conversely, if (x, y) (A B) (A C), then x A, y B or y C. Hence y B C Therefore, (x, y) A (B C). This implies that (A B) (A C) A (B C). The above discussion shows that A (B C) = (A B) (A C), as desired. P114. 18. Let R be a relation from A to B. Prove that for all subsets A1 and A2 , R (A1 A2) = R (A1) R (A2) if and only if R (a) R (b) = for all distinct a, b in A. Proof: Suppose R (A1 A2) = R (A1) R (A2). Put A1 = a , A2 = b . Then R (a) R (b) = R (A1) R (A2) = R (A1 A2 ) = . Conversely, assume that R (a) R (b) = for all distinct a, b in A. So for any y∈B, if y R (A1) R(A2), i.e., y R (A1) and y R(A2), then there is exactly one element x in both A1 and A2 such that y R x , so y R (A1 A2). This implies that R (A1) R (A2) R (A1 A2). On the other hand, by Part (c) of Theorem 1 we know that R (A1 A2) R (A1) R (A2). It follows that R (A1 A2) = R (A1) R (A2). P115 20. If A has n elements and B has m elements, how many different relations are there from A to B? Solution: A B contains mn elements. A relation R from A to B is a subset of A B and there are 2mn subsets of A B. So there are 2mn different relations from A to B P115 27. Describe how to find the in-degree and the out-degree of each vertex. Solution: The in-degree of a vertex is the number of ones in the corresponding column of this vertex. Similarly, the out-degree of a vertex is the number of ones in the corresponding row of this vertex. P121 25. By Theorem 1, M R MR=M R2 so that M R M R shows 1 1 1 1 0 0 1 0 where there are paths of length 2 in the digraph of R.. Let MR = . 0 1 0 0 0 1 1 1 What does M R M R show? Solution: The ij-entry of M R M R is the number of paths of length 2 from i to j in the digraph since it equals the number of k’s satisfying aik = bkj =1. P148 6. Let A= {2,3,6,12} and let R and S be the following relations on A: x R y if and only if 1 2| (x-y); x S y if and only if 3| (x-y). Compute (a) R ; (b) R S; (c) R S (d) S . Solution: According to the definition of R and S, we have R={(2,2) (2,6) (2,12) (3,3) (6,2) (6,6) (6,12) (12,2) (12,6) (12,12)} S={(2,2) (3,3) (3,6) (3,12) (6,3) (6,6) (6,12) (12,3) (12,6) (12,12)}. On the hand, we know that A A={(2,2) (2,3) (2,6) (2,12) (3,2) (3,3) (3,6) (3,12) (6,2) (6,3) (6,6) (6,12) (12,2) (12,3) (12,6) (12,12)} So R ={(2,3) (3,2) (3,6) (3,12) (6,3) (12,3)}. R S={(2,2) (3,3) (6,6) (6,12) (12,6) (12,12)} R S={(2,2) (2,6) (2,12) (3,3) (3,6) (3,12) (6,2) (6,3) (6,6) (6,12) (12,2) (12,3) (12,6) (12,12)} S 1 ={(2,2) (3,3) (6,3) (12,3) (3,6) (6,6) (12,6) (3,12) (6,12) (12,12)} P150 32. Prove Theorem 3: Let R be a relation on a set A. Then 1 (a) R is symmetric if and only if R = R . (b) R is antisymmetric if and only if R R1 . (c) R is asymmetric if and only if R R1 = . 1 1 Proof (a) Suppose R is symmetric. If a R b, then b R a, i.e., a R b. Therefore, R R . 1 1 On the other hand, if a R b, then b R a. Since R is symmetric, a R b. So R R. 1 Combining R R with R R1 , we have R = R1 . 1 1 Conversely, if R = R , then for any a R b, we have a R b, so b R a. We can conclude that R is symmetric. (b) Suppose R is antisymmetric. That is, if a R b, then b R a, unless a = b. In other 1 words, if a R b and a R b, i.e., a R R1 b, then a = b and therefore, a b. This implies that R R1 . Conversely, suppose R R1 . Let a R b and b R a, i.e., a R b and a R1 b, or equivalently, a R R1 b. On the other hand, we notice that R R1 . So a b, which implies that a = b. Therefore, R is antisymmetric. (c) Suppose R is asymmetric. That is, if a R b, then b R a. For the sake of contradiction, assume that R R1 ≠ and a R R1 b. Then we have a R b and a R1 b, i.e., a R b and b R a. This is a contradiction. Conversely, suppose R R1 = . Then if a R b, we have a R －1 b. That is, if a R b, then b R a. It follows that R is asymmetric, which completes our proof.

DOCUMENT INFO

Shared By:

Categories:

Tags:

Stats:

views: | 14 |

posted: | 3/22/2012 |

language: | |

pages: | 6 |

OTHER DOCS BY jennyyingdi

Docstoc is the premier online destination to start and grow small businesses. It hosts the best quality and widest selection of professional documents (over 20 million) and resources including expert videos, articles and productivity tools to make every small business better.

Search or Browse for any specific document or resource you need for your business. Or explore our curated resources for Starting a Business, Growing a Business or for Professional Development.

Feel free to Contact Us with any questions you might have.