Solution Manual For Discrete Mathematics With Applications, 5th Edition

Preview Extract
Instructorโ€™s Manual: Chapter 2 1 Chapter 2: The Logic of Compound Statements The ability to reason using the principles of logic is essential for solving problems in abstract mathematics and computer science and for understanding the reasoning used in mathematical proof and disproof. Because a signi๏ฌcant number of students who come to college have had limited opportunity to develop this ability, a primary aim of Chapters 2 and 3 is to help students develop an inner voice that speaks with logical precision. Consequently, the various rules used in logical reasoning are developed both symbolically and in the context of their somewhat limited but very important use in everyday language. Exercise sets for Sections 2.1โ€“2.3 and 3.1โ€“3.4 contain sentences for students to negate, write the contrapositive for, and so forth. Virtually all students bene๏ฌt from doing these exercises. Another aim of Chapters 2 and 3 is to teach students the rudiments of symbolic logic as a foundation for a variety of upper-division courses. Symbolic logic is used in, among others, the study of digital logic circuits, relational databases, arti๏ฌcial intelligence, and program veri๏ฌcation. Suggestions 1. In Section 2.1 a surprising number of students apply De Morganโ€™s law to write the negation of, for example, โ€œ1 3.โ€ You may ๏ฌnd that it takes some e๏ฌ€ort to teach them to avoid making this mistake. 2. In Sections 2.1 and 2.4, students have more di๏ฌƒculty than you might expect simplifying statement forms and circuits. Only through trial and error can you learn the extent to which this is the case at your institution. If it is, you might either assign only the easier exercises or build in extra time to teach students how to do the more complicated ones. Discussion of simpli๏ฌcation techniques occurs again in Chapter 6 in the context of set theory. At this later point in the course most students are able to deal with it successfully. 3. In ordinary English, the phrase โ€œonly ifโ€ is often used as a synonym for โ€œif and only if.โ€ But it is possible to ๏ฌnd informal sentences for which the intuitive interpretation is the same as the logical de๏ฌnition. It is helpful to give examples of such statements when you introduce the logical de๏ฌnition. For instance, it is not hard to get students to agree that โ€œThe team will win the championship only if it wins the semi๏ฌnal gameโ€ means the same as โ€œIf the team does not win the semi๏ฌnal game then it will not win the championship.โ€ Once students see this, you can suggest that they remember this example when they encounter more abstract โ€œonly ifโ€statements. Through guided discussion, students also come to agree that the statement โ€œWinning the semi๏ฌnal game is a necessary condition for winning the championshipโ€ translates to โ€œIf the team does not win the semi๏ฌnal game then it will not win the championship.โ€ They can be encouraged to use this (or a similar statement) as a reference to help develop intuition for general statements of the form โ€œA is a necessary condition for B.โ€ With students who have weaker backgrounds, you may ๏ฌnd yourself tying up excessive amounts of class time discussing โ€œonly ifโ€ and โ€œnecessary and su๏ฌƒcient conditions.โ€ You might just assign the easier exercises, or you might assign exercises on these topics to be done for extra credit (putting corresponding extra credit problems on exams) and use the results to help distinguish A from B students. It is probably best not to omit these topics altogether, though, because the language of โ€œonly ifโ€ and โ€œnecessary and su๏ฌƒcient conditionsโ€ is a standard part of the technical vocabulary of textbooks used in upper-division courses, as well as occurring regularly in non-mathematical writing. 4. In Section 2.3, many students mistakenly conclude that an argument is valid if, when they compute the truth table, they ๏ฌnd a single row in which both the premises and the conclusion are true. The source of studentsโ€™ di๏ฌƒculty appears to be their tendency to ignore quanti๏ฌcation and to misinterpret if-then statements as โ€œandโ€ statements. Since the de๏ฌnition of validity includes both a universal quanti๏ฌer and if-then, it is helpful to go back over the de๏ฌnition and the procedures for testing for validity and invalidity after discussing the general topic of universal conditional statements 2 Solutions for Exercises: The Logic of Compound Statements in Section 3.1. As a practical measure to help students assess validity and invalidity correctly, the ๏ฌrst example in Section 2.3 is of an invalid argument whose truth table has eight rows, several of which have true premises and a true conclusion. To further focus studentsโ€™ attention on the situations where all the premises are true, the truth values for the conclusions of arguments are omitted when at least one premise is false. 5. In Section 2.3, you might suggest that students just familiarize themselves with, but not memorize, the various forms of valid arguments covered in Section 2.3. It is wise, however, to have them learn the terms modus ponens and modus tollens (because these are used in some upper-division computer science courses) and converse and inverse errors (because these errors are so common). Section 2.1 1. Common form: Therefore, If p then q. p q (a + 2b)(a2 โˆ’ b) can be written in pre๏ฌx notation. All algebraic expressions can be written in pre๏ฌx notation. 2. Common form: Therefore, If p then q. โˆผq โˆผp All prime numbers are odd. 2 is odd 3. Common form: Therefore, pโˆจq โˆผp q My mind is shot. Logic is confusing. 4. Common form: Therefore, If p then q. If q then r. If p then r. Has 4 vertices and 6 edges. Is complete; Any two of its vertices can be joined by a path 5. a. It is a statement because it is a true sentence. 1,024 is a perfect square because 1,024 = 322 , and the next smaller perfect square is 312 = 961, which has fewer than four digits. b. The truth or falsity of this sentence depends on the reference for the pronoun โ€œshe.โ€ Considered on its own, the sentence cannot be said to be either true or false, and so it is not a statement. c. This sentence is false; hence it is a statement. d. This is not a statement because its truth or falsity depends on the value of x. 6. a. s โˆง i b. โˆผs โˆง โˆผi 7. m โˆง โˆผ c 8. a. (h โˆง w) โˆง โˆผs b. โˆผ w โˆง (h โˆง s) d. (โˆผw โˆง โˆผs) โˆง h c. โˆผ wโˆง โˆผ h โˆง โˆผ s e. wโˆง โˆผ (h โˆง s) (w โˆง (โˆผ h โˆจ โˆผ s) is also acceptable) 9. a. p โˆจ q b. r โˆง p c. r โˆง ( p โˆจ q) 10. a. p โˆง q โˆง r b. p โˆง โˆผ q c. p โˆง (โˆผq โˆจ โˆผr) d. (โˆผ p โˆง q) โˆง โˆผ r e. โˆผ p โˆจ (q โˆง r) Instructorโ€™s Manual: Section 2.1 3 11. Inclusive or. For instance, a team could win the playo๏ฌ€ by winning games 1, 3, and 4 and losing game 2. Such an outcome would satisfy both conditions. 12. p T T F F q T F T F โˆผp F F T T โˆผp โˆง q F F T F p q pโˆงq pโˆจq โˆผ (p โˆง q) โˆผ (p โˆง q) โˆจ (p โˆจ q) T T F F T F T F T F F F T T T F F T T T T T T T 13. 14. p q r qโˆงr p โˆง (q โˆง r) T T T T F F F F T T F F T T F F T F T F T F T F T F F F T F F F T F F F F F F F p q r โˆผq โˆผqโˆจr p โˆง (โˆผ q โˆจ r) T T T T F F F F T T F F T T F F T F T F T F T F F F T T F F T T T F T T T F T T T F T T F F F F p q pโˆงq p โˆจ (p โˆง q) p T T F F T F T F T F F F T T F F T T F F } 15. 16. | {z same truth values The truth table shows that p โˆจ (p โˆง q) and p always have the same truth values. Thus they are logically equivalent. (This proves one of the absorption laws.) 4 Solutions for Exercises: The Logic of Compound Statements 17. p T T F F q T F T F pโˆงq T F F F โˆผp F F T T โˆผq F T F T โˆผ (p โˆง q) F T T T | โˆผ pโˆง โˆผ q F F F T {z โ† โ† } di๏ฌ€erent truth values in rows 2 and 3 The truth table shows that โˆผ (p โˆง q) and โˆผ p โˆง โˆผ q do not always have the same truth values. Therefore they are not logically equivalent. 18. p t pโˆจt T F T T | T T {z } same truth values The truth table shows that p โˆจ t and t always have the same truth values. Thus they are logically equivalent. (This proves one of the universal bound laws.) 19. p t p โˆงt p T F T T T F T F | {z } same truth values The truth table shows that p โˆง t and p always have the same truth values. Thus they are logically equivalent. This proves the identity law for โˆง. 20. p T F p โˆงc F F c F F | p โˆจc T F {z โ† } di๏ฌ€erent truth values in row 1 The truth table shows that p โˆง c and p โˆจ c do not always have the same truth values. Thus they are not logically equivalent. 21. p q T T T T F F F F T T F F T T F F p q T F T F T F T F r pโˆงq q โˆงr (p โˆง q) โˆง r p โˆง (q โˆง r ) T T F F F F F F T F F F T F F F T F F F F F F F T F F F F F F F | {z } same truth values The truth table shows that (p โˆง q) โˆง r and p โˆง (q โˆง r) always have the same truth values. Thus they are logically equivalent. (This proves the associative law for โˆง.) Instructorโ€™s Manual: Section 2.1 22. p q r qโˆจr pโˆงq pโˆงr p โˆง (q โˆจ r) (p โˆง q) โˆจ (p โˆง r) T T T T F F F F T T F F T T F F T F T F T F T F T T T F T T T F T T F F F F F F T F T F F F F F T T T F F F F F T T T F F F F F | {z 5 } same truth values The truth table shows that p โˆง (q โˆจ r) and (p โˆง q) โˆจ (p โˆง r) always have the same truth values. Therefore they are logically equivalent. This proves the distributive law for โˆง over โˆจ. 23. p T T T T F F F F q T T F F T T F F r T F T F T F T F pโˆงq T T F F F F F F q โˆจr T T T F T T T F (p โˆง q) โˆจ r T T T F T F T F | p โˆง (q โˆจ r ) T T T F F F F F {z โ† โ† } di๏ฌ€erent truth values in rows 5 and 7 The truth table shows that (p โˆง q) โˆจ r and p โˆง (q โˆจ r) have di๏ฌ€erent truth values in rows 5 and 7. Thus they are not logically equivalent. (This proves that parentheses are needed with โˆง and โˆจ.) 24. p T T T T F F F F q T T F F T T F F r T F T F T F T F pโˆจq T T T T T T F F pโˆงr T F T F F F F F (p โˆจ q) โˆจ (p โˆง r) T T T T T T F F | (p โˆจ q) โˆง r T F T F T F F F {z โ† โ† โ† } di๏ฌ€erent truth values in rows 2, 3, and 6 The truth table shows that (p โˆจ q) โˆจ (p โˆง r) and (p โˆจ q) โˆง r have di๏ฌ€erent truth values in rows 2, 3, and 6. Hence they are not logically equivalent. 25. Hal is not a math major or Halโ€™s sister is not a computer science major. 26. Sam is not an orange belt or Kate is not a red belt. 27. The connector is not loose and the machine is not unplugged. 28. The train is not late and my watch is not fast. 6 Solutions for Exercises: The Logic of Compound Statements 29. This computer program does not have a logical error in the ๏ฌrst ten lines and it is not being run with an incomplete data set. 30. The dollar is not at an all-time high or the stock market is not at a record low. 31. a. 01, 02, 11, 12 b. 21, 22 c. 11, 10, 21, 20 32. โˆ’2 โ‰ฅ x or x โ‰ฅ 7 33. โˆ’10 โ‰ฅ x or x โ‰ฅ 2 34. 2 โ‰ค x โ‰ค 5 35. x > โˆ’1 and x โ‰ค 1 36. 1 โ‰ค x or x < โˆ’3 37. 0 โ‰ค x or x 500) and num instock โ‰ฅ 200. 39. The statementโ€™s logical form is (p โˆง q) โˆจ ((r โˆง s) โˆง t), so its negation has the form โˆผ ((p โˆง q) โˆจ ((r โˆง s) โˆง t)) โ‰ก โ‰ก โ‰ก โˆผ (p โˆง q) โˆง โˆผ ((r โˆง s) โˆง t)) (โˆผ p โˆจ โˆผ q) โˆง (โˆผ (r โˆง s)โˆจ โˆผ t)) (โˆผ p โˆจ โˆผ q) โˆง ((โˆผ r โˆจ โˆผ s) โˆจ โˆผ t)). Thus a negation is (num orders โ‰ฅ 50 or num instock โ‰ค 300) and ((50 > num orders or num orders โ‰ฅ 75) or num instock โ‰ค 500). 40. p q โˆผp โˆผq pโˆงq pโˆงโˆผq โˆผ p โˆจ (pโˆง โˆผ q) (p โˆง q) โˆจ (โˆผ p โˆจ (p โˆง โˆผ q)) T T F F T F T F F F T T F T F T T F F F F T F F F T T T T T T T Since all the truth values of (p โˆง q) โˆจ (โˆผp โˆจ (p โˆง โˆผq)) are T, (p โˆง q) โˆจ (โˆผp โˆจ (p โˆง โˆผq)) is a tautology. 41. p q โˆผp โˆผq pโˆงโˆผq โˆผpโˆจq (p โˆง โˆผ q)(p โˆจ q) T T F F T F T F F F T T F T F T F T F F T F T T F F F F Since all the truth values of (p โˆง โˆผq) โˆง (โˆผp โˆจ q) are F, (p โˆง โˆผq) โˆง (โˆผp โˆจ q) is a contradiction. Instructorโ€™s Manual: Section 2.1 42. 7 p q r โˆผp โˆผq โˆผpโˆงq qโˆงr ((โˆผ p โˆง q) โˆง (q โˆง r)) ((โˆผ p โˆง q) โˆง (q โˆง r))โˆง โˆผ q T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T F F T T F F T T F F F F T T F F T F F F T F F F F F F F T F F F F F F F F F F F {z all F โ€ฒ s | } Since all the truth values of ((โˆผ p โˆง q) โˆง (q โˆง r))โˆง โˆผ q are F , ((โˆผ p โˆง q) โˆง (q โˆง r))โˆง โˆผ q is a contradiction. 43. p q โˆผp โˆผq โˆผpโˆจq pโˆง โˆผ q (โˆผ p โˆจ q) โˆจ (p โˆง โˆผ q) T T F F T F T F F F T T F T F T T F T T F T F F T T T T {z all T โ€ฒ s | } 44. a. No real numbers satisfy this inequality b. No real numbers satisfy this inequality. 45. Let b be โ€œBob is a double math and computer science major,โ€ m be โ€œAnn is a math major,โ€ and a be โ€œAnn is a double math and computer science major.โ€ Then the two statements can be symbolized as follows: a. (b โˆง m)โˆง โˆผ a and b. โˆผ (b โˆง a) โˆง (m โˆง b). Note: The entries in the truth table assume that a person who is a double math and computer science major is also a math major and a computer science major. b T T T T F F F F m T T F F T T F F a T F T F T F T F โˆผa F T F T F T F T bโˆงm T F T F F F F F mโˆงb T T F F F F F F bโˆงa T F T F F F F F โˆผ (b โˆง a) F T F T T T T T (b โˆง m)โˆง โˆผ a โˆผ (b โˆง a) โˆง (m โˆง b) F F T T F F F F F F F F F F F F | {z } same truth values The truth table shows that (b โˆง m)โˆง โˆผ a and โˆผ (b โˆง a) โˆง (m โˆง b) always have the same truth values. Hence they are logically equivalent. 46. a. Solution 1: Construct a truth table for p โŠ• p using the truth values for exclusive or. p T F pโŠ•p F F because an exclusive or statement is false when both components are true and when both components are false, and the two components in p โŠ• p are both p. Since all its truth values are false, p โŠ• p โ‰ก c, a contradiction. 8 Solutions for Exercises: The Logic of Compound Statements Solution 2: Replace q by p in the logical equivalence p โŠ• q โ‰ก (p โˆจ q) โˆง โˆผ(p โˆง q), and simplify the result. p โŠ• p โ‰ก (p โˆจ p) โˆง โˆผ(p โˆง p) by de๏ฌnition of โŠ• โ‰ก p โˆง โˆผp by the identity laws โ‰กc by the negation law for โˆง b. Yes. p q r pโŠ•q qโŠ•r (p โŠ• q) โŠ• r p โŠ• (q โŠ• r) T T T T F F F F T T F F T T F F T F T F T F T F F F T T T T F F F T T F F T T F T F F T F T T F T F F T F T T F | {z same truth values } The truth table shows that (p โŠ• q) โŠ• r and p โŠ• (q โŠ• r) always have the same truth values. So they are logically equivalent. c. Yes. p q r pโŠ•q pโˆงr qโˆงr (p โŠ• q) โˆง r (p โˆง r) โŠ• (q โˆง r) T T T T F F F F T T F F T T F F T F T F T F T F F F T T T T F F T F T F F F F F T F F F T F F F F F T F T F F F F F T F T F F F | {z same truth values } The truth table shows that (p โŠ• q) โˆง r and (p โˆง r) โŠ• (q โˆง r) always have the same truth values. So they are logically equivalent. 47. There is a famous story about a philosopher who once gave a talk in which he observed that whereas in English and many other languages a double negative is equivalent to a positive, there is no language in which a double positive is equivalent to a negative. To this, another philosopher, Sidney Morgenbesser, responded sarcastically, โ€œYeah, yeah.โ€ [Strictly speaking, sarcasm functions like negation. When spoken sarcastically, the words โ€œYeah, yeahโ€ are not a true double positive; they just mean โ€œno.โ€] 48. a. the distributive law c. the negation law for โˆจ 49. a. the commutative law for โˆจ c. the negation law for โˆง b. the commutative law for โˆจ d. the identity law for โˆง 50. (p โˆง โˆผq) โˆจ p โ‰ก p โˆจ (p โˆง โˆผq) โ‰กp 51. Solution 1 : p โˆง (โˆผ q โˆจ p) โ‰ก โ‰ก b. the distributive law d. the identity law for โˆจ by the commutative law for โˆจ by the absorption law (with โˆผq in place of q) p โˆง (p โˆจ โˆผ q) p commutative law for โˆจ absorption law Instructorโ€™s Manual: Section 2.2 52. Solution 2 : p โˆง (โˆผ q โˆจ p) โ‰ก โ‰ก โ‰ก (p โˆง โˆผ q) โˆจ (p โˆง p) (p โˆง โˆผ q) โˆจ p p โˆผ (p โˆจ โˆผ q) โˆจ (โˆผ p โˆง โˆผ q) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก (โˆผ p โˆง โˆผ (โˆผ q)) โˆจ (โˆผ p โˆง โˆผ q) (โˆผ p โˆง q) โˆจ (โˆผ p โˆง โˆผ q) โˆผ p โˆง (qโˆจ โˆผ q) โˆผ pโˆง t โˆผp 53. โˆผ((โˆผp โˆง q) โˆจ (โˆผp โˆง โˆผq)) โˆจ (p โˆง q) 54. (p โˆง (โˆผ (โˆผ p โˆจ q))) โˆจ (p โˆง q) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก distributive law identity law for โˆง by exercise 50. De Morganโ€™s law double negative law distributive law negation law for โˆจ identity law for โˆง โˆผ[โˆผp โˆง (q โˆจ โˆผq)] โˆจ (p โˆง q) โˆผ(โˆผp โˆง t) โˆจ (p โˆง q) โˆผ(โˆผp) โˆจ (p โˆง q) p โˆจ (p โˆง q) p (p โˆง (โˆผ (โˆผ p)โˆง โˆผ q)) โˆจ (p โˆง q) (p โˆง (pโˆง โˆผ q)) โˆจ (p โˆง q) ((p โˆง p)โˆง โˆผ q)) โˆจ (p โˆง q) (p โˆง โˆผ q)) โˆจ (p โˆง q) p โˆง (โˆผ q โˆจ q) p โˆง (qโˆจ โˆผ q) pโˆง t p by the distributive law by the negation law for โˆจ by the identity law for โˆง by the double negative law by the absorption law De Morganโ€™s law double negative law associative law for โˆง idempotent law for โˆง distributive law commutative law for โˆจ negation law for โˆจ identity law for โˆง Section 2.2 1. If this loop does not contain a stop or a go to, then it will repeat exactly N times. 2. If I catch the 8:05 bus, then I am on time for work. 3. If you do not freeze, then Iโ€™ll shoot. 4. If you donโ€™t ๏ฌx my ceiling, then I wonโ€™t pay my rent. 5. p T T F F q T F T F โˆผp F F T T โˆผq F T F T p q โˆผp โˆผpโˆงq pโˆจq (p โˆจ q) โˆจ (โˆผ p โˆง q) (p โˆจ q) โˆจ (โˆผ p โˆง q) โ†’ q T T F F T F T F F F T T F F T F T T T F T T T F T F T T p T T T T F F F F q T T F F T T F F 6. 7. r T F T F T F T F โˆผq F F T T F F T T โˆผpโˆจq T F T T p โˆงโˆผq F F T T F F F F โˆผ p โˆจ q โ†’โˆผ q F T F T p โˆงโˆผq โ†’r T T T F T T T T 9 10 Solutions for Exercises: The Logic of Compound Statements 8. p q r โˆผp โˆผpโˆจq โˆผpโˆจq โ†’r T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T T T F F T T T T T F T T T F T F p T T T T F F F F q T T F F T T F F r T F T F T F T F โˆผr F T F T F T F T p โˆงโˆผr F T F T F F F F p q r pโ†’r qโ†’r (p โ†’ r) โ†” (q โ†’ r) T T T T F F F F T T F F T T F F T F T F T F T F T F T F T T T T T F T T T F T T T T T F T F T T 9. 10. 11. q โˆงr T T T F T T T F p โˆงโˆผr โ†”q โˆจr F T F F F F F T p q r qโ†’r p โ†’ (q โ†’ r) pโˆงq pโˆงq โ†’r (p โ†’ (q โ†’ r)) โ†” (p โˆง q โ†’ r) T T T T F F F F T T F F T T F F T F T F T F T F T F T T T F T T T F T T T T T T T T F F F F F F T F T T T T T T T T T T T T T T 12. If x > 2 then x2 > 4, and if x 4. 13. a. p q โˆผp pโ†’q โˆผp โˆงq T T F F T F T F F T F T T F T T T F T T | {z } same truth values Instructorโ€™s Manual: Section 2.2 11 The truth table shows that p โ†’ q and โˆผp โˆจ q always have the same truth values. Hence they are logically equivalent. b. p q โˆผq pโ†’q โˆผ (p โ†’ q) pโˆงโˆผq T T F F T F T F F T F T T F T T F T F F F T F F | {z } same truth values The truth table shows that โˆผ (p โ†’ q) and p โˆง โˆผ q always have the same truth values. Hence they are logically equivalent. 14. a. p T T T T F F F F q T T F F T T F F r T F T F T F T F โˆผq F F T T F F T T โˆผr F T F T F T F T qโˆจr T T T F T T T F pโˆง โˆผ q F F T T F F F F pโˆง โˆผ r F T F T F F F F pโ†’qโˆจr T T T F T T T T | pโˆงโˆผqโ†’r pโˆงโˆผrโ†’q T T T T T T F F T T T T T T T T {z } same truth values The truth table shows that the three statement forms p โ†’ q โˆจ r, p โˆง โˆผ q โ†’ r, and p โˆง โˆผ r โ†’ q always have the same truth values. Thus they are all logically equivalent. b. If n is prime and n is not odd, then n is 2. And: If n is prime and n is not 2, then n is odd. 15. p T T T T F F F F q T T F F T T F F r T F T F T F T F qโ†’r T F T T T F T T pโ†’q T T F F T T T T p โ†’ (q โ†’ r) (p โ†’ q) โ†’ r T T F F T T T T T T T F T F T F | {z } โ† โ† โ† di๏ฌ€erent truth values The truth table shows that p โ†’ (q โ†’ r) and (p โ†’ q) โ†’ r do not always have the same truth values. (They di๏ฌ€er for the combinations of truth values for p, q, and r shown in rows 6, 7, and 8.) Therefore they are not logically equivalent. 16. Let p represent โ€œYou paid full priceโ€ and q represent โ€œYou didnโ€™t buy it at Crown Books.โ€ Thus, โ€œIf you paid full price, you didnโ€™t buy it at Crown Booksโ€ has the form p โ†’ q. And โ€œYou didnโ€™t buy it at Crown Books or you paid full priceโ€ has the form q โˆจ p. 12 Solutions for Exercises: The Logic of Compound Statements p q T T T F F T F F pโ†’q T F T T | q โˆจp T T T F {z โ† โ† } di๏ฌ€erent truth values These two statements are not logically equivalent because their forms have di๏ฌ€erent truth values in rows 2 and 4. (An alternative representation for the forms of the two statements is p โ†’ โˆผq and โˆผq โˆจ p. In this case, the truth values di๏ฌ€er in rows 1 and 3.) 17. Let p represent โ€œ2 is a factor of n,โ€ q represent โ€œ3 is a factor of n,โ€ and r represent โ€œ6 is a factor of n.โ€ The statement โ€œIf 2 is a factor of n and 3 is a factor of n, then 6 is a factor of nโ€ has the form p โˆง q โ†’ r. And the statement โ€œ2 is not a factor of n or 3 is a not a factor of n or 6 is a factor of nโ€ has the form โˆผ p โˆจ โˆผ q โˆจ r. p q r โˆผp โˆผq pโˆงq pโˆงq โ†’r โˆผ pโˆจ โˆผ q โˆจ r T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T T T F F T T F F T T F F F F F F T F T T T T T T T F T T T T T T | {z } same truth values The truth table shows that p โˆง q โ†’ r and โˆผ p โˆจ โˆผ q โˆจ r always have the same truth values. Therefore they are logically equivalent. 18. Part 1 : Let p represent โ€œIt walks like a duck,โ€ q represent โ€œIt talks like a duck,โ€ and r represent โ€œIt is a duck.โ€ The statement โ€œIf it walks like a duck and it talks like a duck, then it is a duckโ€ has the form p โˆง q โ†’ r. And the statement โ€œEither it does not walk like a duck or it does not talk like a duck or it is a duckโ€ has the form โˆผ p โˆจ โˆผ q โˆจ r. p q r โˆผp โˆผq p โˆงq โˆผ pโˆจ โˆผ q p โˆงq โ†’r (โˆผ p โˆจ โˆผ q) โˆจ r T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T F F T T F F T T T T F F F F F F F F T T T T T T T F T T T T T T T F T T T T T T | {z } same truth values The truth table shows that p โˆง q โ†’ r and (โˆผ p โˆจ โˆผ q) โˆจ r always have the same truth values. Thus the following statements are logically equivalent:โ€œIf it walks like a duck and it talks like a duck, then it is a duckโ€ and โ€œEither it does not walk like a duck or it does not talk like a duck or it is a duck.โ€ Instructorโ€™s Manual: Section 2.2 13 Part 2 : The statement โ€œIf it does not walk like a duck and it does not talk like a duck then it is not a duckโ€ has the form โˆผ p โˆง โˆผ q โ†’โˆผ r. p q r โˆผp โˆผq โˆผr p โˆงq โˆผ pโˆง โˆผ q p โˆงq โ†’r (โˆผ p โˆง โˆผ q) โ†’โˆผ r T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T F F T T F F T T F T F T F T F T T T F F F F F F F F F F F F T T T F T T T T T T T T T T T T F T | {z di๏ฌ€erent truth values โ† โ† } The truth table shows that p โˆง q โ†’ r and (โˆผ p โˆง โˆผ q) โ†’โˆผ r do not always have the same truth values. (They di๏ฌ€er for the combinations of truth values of p, q, and r shown in rows 2 and 7.) Thus they are not logically equivalent, and so the statement โ€œIf it walks like a duck and it talks like a duck, then it is a duckโ€ is not logically equivalent to the statement โ€œIf it does not walk like a duck and it does not talk like a duck then it is not a duck.โ€ In addition, because of the logical equivalence shown in Part 1, we can also conclude that the following two statements are not logically equivalent: โ€œEither it does not walk like a duck or it does not talk like a duck or it is a duckโ€ and โ€œIf it does not walk like a duck and it does not talk like a duck then it is not a duck.โ€ 19. False. The negation of an if-then statement is not an if-then statement. It is an and statement. 20. a. Negation: P is a square and P is not a rectangle. b. Negation: Today is New Yearโ€™s Eve and tomorrow is not January. c. Negation: The decimal expansion of r is terminating and r is not rational. d. Negation: n is prime and both n is not odd and n is not 2. Or: n is prime and n is neither odd nor 2. e. Negation: x is nonnegative and x is not positive and x is not 0. Or: x is nonnegative but x is not positive and x is not 0. Or: x is nonnegative and x is neither positive nor 0. f. Negation: Tom is Annโ€™s father and either Jim is not her uncle or Sue is not her aunt. g. Negation: n is divisible by 6 and either n is not divisible by 2 or n is not divisible by 3. 21. By assumption, p โ†’ q is false. By de๏ฌnition of a conditional statement, the only way this can happen is for the hypothesis, p, to be true and the conclusion, q, to be false. a. The only way โˆผ p โ†’ q can be false is for โˆผ p to be true and q to be false. But since p is true, โˆผ p is false. Hence โˆผ p โ†’ q is not false and so it is true. b. Since p is true, then p โˆจ q is true because if one component of an and statement is true, then the statement as a whole is true. c The only way q โ†’ p can be false is for q to be true and p to be false. Thus, since q is false, q โ†’ p is not false and so it is true. 22. a. Contrapositive: If P is not a rectangle, then P is not a square. b. Contrapositive: If tomorrow is not January, then today is not New Yearโ€™s Eve. c. Contrapositive: If r is not rational, then the decimal expansion of r is not terminating. d. Contrapositive: If n is not odd and n is not 2, then n is not prime. 14 Solutions for Exercises: The Logic of Compound Statements e. Contrapositive: If x is not positive and x is not 0, then x is not nonnegative. Or: If x is neither positive nor 0, then x is negative. f. Contrapositive: If either Jim is not Annโ€™s uncle or Sue is not her aunt, then Tom is not her father. g. Contrapositive: If n is not divisible by 2 or n is not divisible by 3, then n is not divisible by 6. 23. a. Converse: If P is a rectangle, then P is a square. Inverse: If P is not a square, then P is not a rectangle. b. Converse: If tomorrow is January, then today is New Yearโ€™s Eve. Inverse: If today is not New Yearโ€™s Eve, then tomorrow is not January. c. Converse: If r is rational then the decimal expansion of r is terminating. Inverse: If the decimal expansion of r is not terminating, then r is not rational. d. Converse: If n is odd or n is 2, then n is prime. Inverse: If n is not prime, then n is not odd and n is not 2. e. Converse: If x is positive or x is 0, then x is nonnegative. Inverse: If x is not nonnegative, then both x is not positive and x is not 0. Or: If x is negative, then x is neither positive nor 0. f. Converse: If Jim is Annโ€™s uncle and Sue is her aunt, then Tom is her father. Inverse: If Tom is not Annโ€™s father, then Jim is not her uncle or Sue is not her aunt g. Converse: If n is divisible by 2 and n is divisible by 3, then n is divisible by 6 Inverse: If n is not divisible by 6, then n is not divisible by 2 or n is not divisible by 3. 24. p T T F F q T F T F pโ†’q T F T T | qโ†’p T T F T {z โ† โ† } di๏ฌ€erent truth values The truth table shows that p โ†’ q and q โ†’ p have di๏ฌ€erent truth values in the second and third rows. Hence they are not logically equivalent. 25. p T T F F q T F T F โˆผp F F T T โˆผq F T F T pโ†’q T F T T | โˆผ p โ†’โˆผ q T T F T {z } โ† โ† di๏ฌ€erent truth values The truth table shows that p โ†’ q and โˆผ p โ†’โˆผ q have di๏ฌ€erent truth values in rows 2 and 3, so they are not logically equivalent. Thus a conditional statement is not logically equivalent to its inverse. Instructorโ€™s Manual: Section 2.2 26. p q โˆผp โˆผq โˆผ q โ†’โˆผ p pโ†’q T T F F T F T F F F T T F T F T T F T T T F T T | {z 15 } same truth values The truth table shows that โˆผq โ†’ โˆผp and p โ†’ q always have the same truth values and thus are logically equivalent. It follows that a conditional statement and its contrapositive are logically equivalent to each other. 27. p q โˆผp โˆผq qโ†’p โˆผ p โ†’โˆผ q T T F F T F T F F F T T F T F T T T F T T T F T | {z } same truth values The truth table shows that q โ†’ p and โˆผ p โ†’โˆผ q always have the same truth values and thus are logically equivalent. It follows that the converse and inverse of a conditional statement are logically equivalent to each other. 28. The if-then form of โ€œI say what I meanโ€ is โ€œIf I mean something, then I say it.โ€ The if-then form of โ€œI mean what I sayโ€ is โ€œIf I say something, then I mean it.โ€ Thus โ€œI mean what I sayโ€ is the converse of โ€œI say what I mean,โ€ and so the two statements are not logically equivalent. 29. The corresponding tautology is (p โ†’ (q โˆจ r)) โ†” ((p โˆง โˆผq) โ†’ r) p q r โˆผq q โˆจr pโˆงโˆผq p โ†’ (q โˆจ r ) pโˆงโˆผq โ†’r T T T T F F F F T T F F T T F F T F T F T F T F F F T T F F T T T T T F T T T F F F T T F F F F T T T F T T T T T T T F T T T T (p โ†’ (q โˆจ r )) โ†” ((p โˆง โˆผ q) โ†’ r ) T T T T T T T T The truth table shows that (p โ†’ (q โˆจ r)) โ†” ((p โˆง โˆผq) โ†’ r) is a tautology because all of its truth values are T. 30. The corresponding tautology is p โˆง (q โˆจ r) โ†” (p โˆง q) โˆจ (p โˆง r) 16 Solutions for Exercises: The Logic of Compound Statements p q r qโˆจr p โˆงq p โˆงr p โˆง (q โˆจ r) (p โˆง q) โˆจ (p โˆง r) T T T T F F F F T T F F T T F F T F T F T F T F T T T F T T T F T T F F F F F F T F T F F F F F T T T F F F F F T T T F F F F F p โˆง (q โˆจ r) โ†” (p โˆง q) โˆจ (p โˆง r) T T T T T T T T | {z } all T โ€™s The truth table shows that p โˆง (q โˆจ r) โ†” (p โˆง q) โˆจ (p โˆง r) is always true. Hence it is a tautology. 31. The corresponding tautology is (p โ†’ (q โ†’ r)) โ†” ((p โˆง q) โ†’ r). p q r qโ†’r p โˆงq p โ†’ (q โ†’ r) (p โˆง q) โ†’ r) p โ†’ (q โ†’ r) โ†” (p โˆง q) โ†’ r T T T T F F F F T T F F T T F F T F T F T F T F T F T T T F T T T T F F F F F F T F T T T T T T T F T T T T T T T T T T T T T T {z all T โ€™s | } The truth table shows that (p โ†’ (q โ†’ r)) โ†” ((p โˆง q) โ†’ r) is always true. Hence it is a tautology. 32. If this quadratic equation has two distinct real roots, then its discriminant is greater than zero, and if the discriminant of this quadratic equation is greater than zero, then the equation has two real roots. 33. If this integer is even, then it equals twice some integer, and if this integer equals twice some integer, then it is even. 34. If the Cubs do not win tomorrowโ€™s game, then they will not win the pennant. If the Cubs win the pennant, then they will have won tomorrowโ€™s game. 35. If Sam is not an expert sailor, then he will not be allowed on Signeโ€™s racing boat. If Sam is allowed on Signeโ€™s racing boat, then he is an expert sailor. 36. The Personnel Director did not lie. By using the phrase โ€œonly if,โ€ the Personnel Director set forth conditions that were necessary but not su๏ฌƒcient for being hired: if you did not satisfy those conditions then you would not be hired. The Personnel Directorโ€™s statement said nothing about what would happen if you did satisfy those conditions. 37. If a new hearing is not granted, payment will be made on the ๏ฌfth. 38. If it doesnโ€™t rain, then Ann will go. 39. If a security code is not entered, then the door will not open. 40. If I catch the 8:05 bus, then I am on time for work. 41. If this triangle has two 45โ—ฆ angles, then it is a right triangle. Instructorโ€™s Manual: Section 2.2 17 42. If this number is not divisible by 3, then it is not divisible by 9. If this number is divisible by 9, then it is divisible by 3. 43. If Jim does not do his homework regularly, then Jim will not pass the course. If Jim passes the course, then he will have done his homework regularly. 44. If Jonโ€™s team wins the rest of its games, then it will win the championship. 45. If this computer program produces error messages during translation, then it is not correct. If this computer program is correct, then it does not produce error messages during translation. 46. a. This statement is the converse of the given statement, and so it is not necessarily true. For instance, if the actual boiling point of compound X were 200โ—ฆ C, then the given statement would be true but this statement would be false. b. This statement must be true. It is the contrapositive of the given statement. c. must be true d. not necessarily true e. must be true f. not necessarily true Note: To solve this problem, it may be helpful to imagine a compound whose boiling point is greater than 150โ—ฆ C. For concreteness, suppose it is 200โ—ฆ C. Then the given statement would be true for this compound, but statements a, d, and f would be false. 47. a. p โˆง โˆผq โ†’ r โ‰ก โˆผ(p โˆง โˆผq) โˆจ r b. p โˆง โˆผq โ†’ r โ‰ก โˆผ(p โˆง โˆผq) โˆจ r โ‰ก โ‰ก โˆผ[โˆผ(โˆผ(p โˆง โˆผq)) โˆง โˆผr] โˆผ[(p โˆง โˆผq) โˆง โˆผr] by the identity for โ†’ shown in the directions [an acceptable answer] by De Morganโ€™s law [another acceptable answer] by the double negative law [another acceptable answer] Any of the expressions in part (b) would also be acceptable answers for part (a). 48. a. pโˆจ โˆผ q โ†’ r โˆจ q โ‰ก โˆผ (p โˆจ โˆผ q) โˆจ (r โˆจ q) โ‰ก (โˆผ p โˆง โˆผ (โˆผ q)) โˆจ (r โˆจ q) โ‰ก (โˆผ p โˆง q) โˆจ (r โˆจ q) by the identity for โ†’ shown in the directions [an acceptable answer] by De Morganโ€™s law [another acceptable answer] by the double negative law [another acceptable answer] โ‰ก (โˆผ p โˆง q) โˆจ (r โˆจ q) by part (a) โ‰ก โˆผ (โˆผ (โˆผ p โˆง q)โˆง โˆผ (r โˆจ q)) by De Morganโ€™s law โ‰ก โˆผ (โˆผ (โˆผ p โˆง q) โˆง (โˆผ r โˆง โˆผ q)) by De Morganโ€™s law Any of the expressions in part (b) would also be acceptable answers for part (a). b. 49. a. pโˆจ โˆผ q โ†’ r โˆจ q (p โ†’ r) โ†” (q โ†’ r) โ‰ก โ‰ก (โˆผp โˆจ r) โ†” (โˆผq โˆจ r) [โˆผ(โˆผp โˆจ r) โˆจ (โˆผq โˆจ r)] โˆง [โˆผ(โˆผq โˆจ r) โˆจ (โˆผp โˆจ r)] by the identity for โ†” shown in the โ‰ก [(p โˆง โˆผr) โˆจ (โˆผq โˆจ r)] โˆง [(q โˆง โˆผr) โˆจ (โˆผp โˆจ r)] directions [an acceptable answer] by De Morganโ€™s law [another acceptable answer] b. (โˆผp โˆจ r) โ†” (โˆผq โˆจ r) โ‰ก โˆผ[โˆผ(p โˆง โˆผr) โˆง โˆผ(โˆผq โˆจ r)] โˆง โˆผ[โˆผ(q โˆง โˆผr) โˆง โˆผ(โˆผp โˆจ r)] โ‰ก โˆผ[โˆผ(p โˆง โˆผr) โˆง (q โˆง โˆผr)] โˆง โˆผ[โˆผ(q โˆง โˆผr) โˆง (p โˆง โˆผr)] by De Morganโ€™s law by De Morganโ€™s law Any of the expressions in part (b) would also be acceptable answers for part (a). 18 Solutions for Exercises: The Logic of Compound Statements 50. a. (p โ†’ (q โ†’ r)) โ†” ((p โˆง q) โ†’ r) โ‰ก โ‰ก โ‰ก [โˆผ p โˆจ (q โ†’ r)] โ†” [โˆผ (p โˆง q) โˆจ r] [โˆผ p โˆจ (โˆผ q โˆจ r)] โ†” [โˆผ (p โˆง q) โˆจ r] โˆผ [โˆผ p โˆจ (โˆผ q โˆจ r)] โˆจ [โˆผ (p โˆง q) โˆจ r] โˆงโˆผ [โˆผ (p โˆง q) โˆจ r] โˆจ [โˆผ p โˆจ (โˆผ q โˆจ r)] b. By part (a), De Morganโ€™s law, and the double negative law, (p โ†’ (q โ†’ r)) โ†” ((p โˆง q) โ†’ r) โ‰ก โˆผ [โˆผ p โˆจ (โˆผ q โˆจ r)] โˆจ [โˆผ (p โˆง q) โˆจ r] โˆงโˆผ [โˆผ (p โˆง q) โˆจ r] โˆจ [โˆผ p โˆจ (โˆผ q โˆจ r)] โ‰ก โˆผ [โˆผ p โˆจ (โˆผ q โˆจ r)]โˆง โˆผ [โˆผ (p โˆง q) โˆจ r] โˆง โˆผ โˆผ [(p โˆง q)โˆง โˆผ r]โˆง โˆผ [โˆผ p โˆจ (โˆผ q โˆจ r)] โ‰ก โˆผ โˆผ [p โˆง โˆผ (โˆผ q โˆจ r)] โˆง [(p โˆง q)โˆง โˆผ r] โˆง โˆผ โˆผ [(p โˆง q)โˆง โˆผ r] โˆง [p โˆง โˆผ (โˆผ q โˆจ r)] โ‰ก โˆผ โˆผ [p โˆง (q โˆง โˆผ r)] โˆง [(p โˆง q)โˆง โˆผ r] โˆง โˆผ โˆผ [(p โˆง q)โˆง โˆผ r] โˆง [p โˆง (qโˆง โˆผ r)]. Any of the expressions in the right-hand column would also be acceptable answers for part (a). 51. Yes. As in exercises 47-50, the following logical equivalences can be used to rewrite any statement form in a logically equivalent way using only โˆผ and โˆง: p โ†’ q โ‰กโˆผ p โˆจ q p โˆจ q โ‰กโˆผ (โˆผ p โˆง โˆผ q) p โ†” q โ‰ก (โˆผ p โˆจ q) โˆง (โˆผ q โˆจ p) โˆผ (โˆผ p) โ‰ก p The logical equivalence p โˆง q โ‰ก โˆผ (โˆผ p โˆจ โˆผ q) can then be used to rewrite any statement form in a logically equivalent way using only โˆผ and โˆจ. Section 2.3 1. โˆš 2 is not rational. 2. 1 โˆ’ 0.99999… is less than every positive real number. 3. Logic is not easy. 4. This graph cannot be colored with two colors. 5. They did not telephone. 6. premises p T T F F q T F T T }| { z pโ†’q pโ†’q T T F T T F T T conclusion pโˆจq T critical row F critical row Rows 2 and 4 of the truth table are the critical rows in which all the premises are true, but row 4 shows that it is possible for an argument of this form to have true premises and a false conclusion. Thus this argument form is invalid. Instructorโ€™s Manual: Section 2.3 7. premises 19 conclusion z }| { p q r โˆผq p p โ†’q โˆผq โˆจr r T T T F T T T T critical row T T F F T T F T F T T T F T T F F T T F T F T T F F T T F T F F F T F F F T T F T T F F F T F T T This row describes the only situation in which all the premises are true. Because the conclusion is also true here, the argument form is valid. 8. premises conclusion z }| { p q r โˆผ q p โˆจ q p โ†’โˆผ q p โ†’ r r T T T F T F T T T F F T F F T F T T T T T T critical row T F F T T T F F T T F T T T T critical row F T F F T T T F critical row F F T T F T T F F F T F T T This row shows that it is possible for an argument of this form to have true premises and a false conclusion. Thus this argument form is invalid. 9. p T T T T F F F F q T T F F T T F F r T F T F T F T F โˆผq F F T T F F T T โˆผr F T F T F T F T pโˆงq T T F F F F F F z p โˆง q โ†’โˆผ r F T T T T T T T premises }| pโˆจ โˆผ q T T T T F F T T conclusion { โˆผqโ†’p T T T T T T F F โˆผr T F T critical row critical row critical row Rows 2, 3, and 4 of the truth table are the critical rows in which all the premises are true, but row 3 shows that it is possible for an argument of this form to have true premises and a false conclusion. Hence the argument form is invalid. 10. premise p T T T T F F F F q T T F F T T F F r T F T F T F T F โˆผp F F F F T T T T โˆผq F F T T F F T T โˆผr F T F T F T F T โˆผ pโˆง โˆผ q F F F F F F T T p โˆจq T T T T T T F F r T F T F T F T F p โˆจq โ†’r T F T F T F T T conclusion โˆผ r โ†’ โˆผ pโˆง โˆผ q T critical row F T F T F T T critical row critical row critical row critical row 20 Solutions for Exercises: The Logic of Compound Statements This form of argument has just one premise. Rows 1, 3, 5, 7, and 8 of the truth table represent all the situations in which the premise is true, and in each of these rows the conclusion is also true. Therefore, the argument form is valid. 11. p q r โˆผp โˆผq โˆผr qโˆจr T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T F F T T F F T T F T F T F T F T T T T F T T T F premises z }| { p โ†’ qโˆจr โˆผ qโˆจ โˆผ r T T T F T T T T F T T T F T T T conclusion โˆผ pโˆจ โˆผ r T F critical row critical row T T T critical row critical row critical row Rows 2, 3, 6, 7, and 8 of the truth table represent the situations in which all the premises are true, but row 3 shows that it is possible for an argument of this form to have true premises and a false conclusion. Hence the argument form is invalid. 12. a. premises p T T F F q T F T T z }| pโ†’q T F T T { q T F T F conclusion p T critical row F critical row Rows 1 and 3 of the truth table represent the situations in which all the premises are true, but row 3 shows that it is possible for an argument of this form to have true premises and a false conclusion. Hence the argument form is invalid. b. premises p T T F F z }| { pโ†’q โˆผp T F F T T F T T q T F T T conclusion โˆผq T critical row F critical row Rows 2 and 4 of the truth table represent the situations in which all the premises are true, but row 4 shows that it is possible for an argument of this form to have true premises and a false conclusion. Hence the argument form is invalid. 13. p q T T F F T F T F premises conclusion }| { z pโ†’q โˆผq โˆผp T F T T F T F T T critical row Row 4 of the truth table represents the only situation in which all the premises are true, and in this row the conclusion is also true. Therefore, the argument form (modus tollens) is valid. Instructorโ€™s Manual: Section 2.3 14. premise conclusion pโˆจq T critical row T critical row p q p T T F F T F T F T F T F 21 The truth table shows that in the two situations (represented by rows 1 and 3) in which the premise is true, the conclusion is also true. Therefore, Generalization, version (a), is valid. 15. premise conclusion pโˆจq T critical row T critical row p q q T T F F T F T F T F T F The truth table shows that in the two situations (represented by rows 1 and 3) in which the premise is true, the conclusion is also true. Therefore, Generalization, version (b), is valid. 16. premise conclusion p p q p โˆงq T T F F T F T F T F F F T critical row The truth table shows that in the only situation (represented by row 1) in which both premises are true, the conclusion is also true. Therefore, Specialization, version (sa), is valid. 17. premise conclusion q p q p โˆงq T T F F T F T F T F F F T critical row The truth table shows that in the only situation (represented by row 1) in which both premises are true, the conclusion is also true. Therefore, Specialization, version (b), is valid. 22 Solutions for Exercises: The Logic of Compound Statements 18. premises p T T F F q T F T T conclusion z }| { p โˆจq โˆผq T F T T T F F T p T critical row Row 2 represents the only situation in which both premises are true. Because the conclusion is also true here the argument form is valid. 19. premises conclusion q p q z }| { pโˆจq โˆผp T T F F T F T F T T T F F F T T T critical row The truth table shows that in the only situation (represented by row 3) in which both premises are true, the conclusion is also true. Therefore, Elimination, version (b), is valid. 20. premises p q r T T T T F F F F T T F F T T F F T F T F T F T F z }| { pโ†’q qโ†’r T T F F T T T T T F T T T F T T conclusion pโ†’r T critical row T critical row T T critical row critical row The truth table shows that in the four situations (represented by rows 1, 5, 7, and 8) in which both premises are true, the conclusion is also true. Therefore, Transitivity is valid. 21. premises p q r z pโˆจq T T T T F F F F T T F F T T F F T F T F T F T F T T T T T T F F conclusion }| pโ†’r { qโ†’r T F T F T T T T T F T T T F T T r T critical row T critical row T critical row The truth table shows that in the three situations (represented by rows 1, 3, 5) in which all three premises are true, the conclusion is also true. Therefore, proof by division into cases is valid. Instructorโ€™s Manual: Section 2.3 23 22. Let p represent โ€œTom is on team Aโ€ and q represent โ€œHua is on team B.โ€ Then the argument has the form โˆผp โ†’ q โˆผq โ†’ p โˆด โˆผp โˆจ โˆผq premises p q โˆผp โˆผq T T F F T F T F F F T T F T F T conclusion z }| { โˆผpโ†’q โˆผq โ†’p T T T F T T T F โˆผpโˆจโˆผq F T T critical row critical row critical row Rows 1, 2, and 3 of the truth table are the critical rows in which all the premises are true, but row 1 shows that it is possible for an argument of this form to have true premises and a false conclusion. Thus this argument form is invalid. 23. form: … p โˆจq pโ†’r qโˆจ โˆผ r premises p q r โˆผr T T T T F F F F T T F F T T F F T F T F T F T F F T F T F T F T z }| { p โˆจq pโ†’r T T T T T T F F T F T F T T T T conclusion qโˆจ โˆผ r T critical row F critical row T T critical row critical row Rows 1, 3, 5, and 6 represent the situations in which both premises are true, but in row 3 the conclusion is false. Hence, it is possible for an argument of this form to have true premises and a false conclusion, and so the given argument is invalid. 24. form: p โ†’ q q … p invalid: converse error 25. form: p โˆจ q โˆผp … q valid: elimination 26. form: p โ†’ q qโ†’r … pโ†’r valid: transitivity 27. form: p โ†’ q โˆผp … โˆผq invalid: inverse error 24 Solutions for Exercises: The Logic of Compound Statements pโ†’q q p invalid, converse error pโ†’q โˆผp โˆผq invalid, inverse error invalid, converse error … pโ†’q q p 31. form: … p โˆงq q valid, generalization 32. form: pโ†’r qโ†’r pโˆจq โ†’r 28. form: … 29. form: … 30. form: … valid, proof by division into cases 33. A valid argument with a false conclusion must have at least one false premise. In the following example, the second premise is false. (The ๏ฌrst premise is true because its hypothesis is false.) If the square of every real number is positive, then no real number is negative. The square of every real number is positive. Therefore, no real number is negative. 34. An invalid argument with a true conclusion can have premises that are either true or false. In the following example the ๏ฌrst premise is true for either one of following two reasons: its hypothesis is false and its conclusion is true. If the square of every real number is positive, then some real numbers are positive. Some real numbers are positive. Therefore, the square of every real number is positive. 35. A correct answer should indicate that for a valid argument, any argument of the same form that has true premises has a true conclusion, whereas for an invalid argument, it is possible to ๏ฌnd an argument of the same form that has true premises and a false conclusion. The validity of an argument does not depend on whether the conclusion is true or not. The validity of an argument only depends on the formal relationship between its premises and its conclusion. 36. The program contains an undeclared variable. One explanation: 1. There is not a missing semicolon and there is not a misspelled variable name. (by (c) and (d) and definition of โˆง) 2. It is not the case that there is a missing semicolon or a misspelled variable name. (by (1) and De Morganโ€™s laws) 3. There is not a syntax error in the ๏ฌrst ๏ฌve lines. (by (b) and (2) and modus tollens) 4. There is an undeclared variable. (by (a) and (3) and elimination) 37. The treasure is buried under the ๏ฌ‚agpole. One explanation: 1. The treasure is not in the kitchen. (by (c) and (a) and modus ponens) 2. The tree in the front yard is not an elm. (by (b) and (1) and modus tollens) 3. The treasure is buried under the ๏ฌ‚agpole. (by (d) and (2) and elimination) Instructorโ€™s Manual: Section 2.3 38. a. A is a knave and B is a knight. One explanation: 1. Suppose A is a knight. 2. โˆด What A says is true. (by definition of knight) 3. โˆด B is a knight also. (Thatโ€™s what A said.) 4. โˆด What B says is true. (by definition of knight) 5. โˆด A is a knave. (Thatโ€™s what B said.) 6. โˆด We have a contradiction: A is a knight and a knave. (by (1) and (5)) 7. โˆด The supposition that A is a knight is false. (by the contradiction rule) 8. โˆด A is a knave. (negation of supposition) 9. โˆด What B says is true. (B said A was a knave, which we now know to be true.) 10. โˆด B is a knight. (by definition of knight) b. C is a knave and D is a knight One explanation: 1. Suppose C is a knight. 2. … C is a knave (because what C said was true). 3. … C is both a knight and a knave (by (1) and (2)), which is a contradiction. 4. … C is not a knight (because by the contradiction rule the supposition is false). 5. … What C says is false (because since C is not a knight he is a knave and knaves always speak falsely). 6. … At least one of C or D is a knight (by De Morganโ€™s law). 7. … D is a knight (by (4) and (6) and elimination). 8. … C is a knave and D is a knight (by (4) and (7)). To check that the problem situation is not inherently contradictory, note that if C is a knave and D is a knight, then each could have spoken as reported. c. One is a knight and the other is a knave. One explanation: There is one knave. E and F cannot both be knights because then both would also be knaves (since each would have spoken the truth), which is a contradiction. Nor can E and F both be knaves because then both would be telling the truth which is impossible for knaves. Hence, the only possible answer is that one is a knight and the other is a knave. But in this case both E and F could have spoken as reported, without contradiction. d. U , Z, X, and V are knaves and W and Y are knights. One explanation: 1. The statement made by U must be false because if it were true then U would not be a knight (since none would be a knight), but since he spoke the truth he would be a knight and this would be a contradiction. 2. … there is at least one knight, and U is a knave (since his statement that there are no knights is false). 3. Suppose Z spoke the truth. Then so did W (since if there is exactly one knight then it is also true that there are at most three knights). But this implies that there are at least two knights, which contradicts Z โ€ฒ s statement. Hence Z cannot have spoken the truth. 4. … there are at least two knights, and Z is a knave (since his statement that there is exactly one knight is false). Also X โ€ฒ s statement is false because since both U and Z are knaves it is impossible for there to be exactly ๏ฌve knights. Hence X also is a knave. 5. … there are at least three knaves (U , Z, and X), and so there are at most three knights. 6. … W โ€ฒ s statement is true, and so W is a knight. 25 26 Solutions for Exercises: The Logic of Compound Statements 7. Suppose V spoke the truth. Then V , W , and Y are all knights (otherwise there would not be at least three knights because U , Z, and X are known to be knaves). It follows that Y spoke the truth. But Y said that exactly two were knights. This contradicts the result that V , W , and Y are all knights. 8. … V cannot have spoken the truth, and so V is a knave. 9. … U , Z, X, and V are all knaves, and so there are at most two knights. 10. Suppose that Y is a knave. Then the only knight is W , which means that Z spoke the truth. But we have already seen that this is impossible. Hence Y is a knight. 11. By 6, 9, and 10, the only possible solution is that U , Z, X, and V are knaves and W and Y are knights. Examination of the statements shows that this solution is consistent: in this case, the statements of U , Z, X, and V are false and those of W and Y are true. 39. The chau๏ฌ€eur killed Lord Hazelton. One explanation: 1. Suppose the cook was in the kitchen at the time of the murder. 2. โˆด The butler killed Lord Hazelton with strychnine. (by (c) and (1) and modus ponens) 3. โˆด We have a contradiction: Lord Hazelton was killed by strychnine and a blow on the head. (by (2) and (a)) 4. โˆด The supposition that the cook was in the kitchen is false. (by the contradiction rule) 5. โˆด The cook was not in the kitchen at the time of the murder. (negation of supposition) 6. โˆด Sara was not in the dining room when the murder was committed. (by (e) and (5) and modus ponens) 7. โˆด Lady Hazelton was in the dining room when the murder was committed. (by (b) and (6) and elimination) 8. โˆด The chau๏ฌ€eur killed Lord Hazelton. (by (d) and (7) and modus ponens) 40. One solution: Suppose Socko is telling the truth. Then Fats is also telling the truth because if Lefty killed Sharky then Muscles didnโ€™t kill Sharky. Consequently, two of the men were telling the truth, which contradicts the fact that all were lying except one. Therefore, Socko is not telling the truth: Lefty did not kill Sharky. Hence Muscles is telling the truth and all the others are lying. It follows that Fats is lying, and so Muscles killed Sharky. Another solution: The statements of Socko and Muscles contradict each other, which implies that one is lying and the other is telling the truth. If Socko is telling the truth, then Fats is also telling the truth, which contradicts the fact that only one person told the truth. So Muscles is the only one who told the truth. Hence Muscles is telling the truth and all the others are lying. It follows that Fats is lying, and so Muscles killed Sharky. 41. (1) p โ†’ t by premise (d) โˆผp by premise (c) โˆด โˆผp by modus tollens (2) โˆผp โˆด โˆผp โˆจ q by (1) by generalization (3) โˆผp โˆจ q โ†’ r โˆผp โˆจ q โˆด r (4) โˆผp r โˆด โˆผp โˆง r by premise (a) by (2) by modus ponens by (1) by (3) by conjunction (5) โˆผp โˆง r โ†’ โˆผs by premise (e) โˆผp โˆง r by (4) โˆด โˆผs by modus ponens Instructorโ€™s Manual: Section 2.3 (6) s โˆจ โˆผq โˆผs โˆด โˆผq 42. (1) … (2) … qโ†’r โˆผr โˆผq by premise (b) by premise (d) by modus tollens p โˆจq โˆผq p by premise (a) by (1) by elimination … โˆผq โ†’uโˆงs โˆผq uโˆงs (4) … uโˆงs s by (3) by specialization (5) p s p โˆงs by (2) by (4) by conjunction (3) … (6) … 43. by premise (b) by (5) by elimination p โˆงsโ†’t p โˆงs t (1) โˆผw uโˆจw โˆด u by premise (e) by (1) by modus ponens by premise (c) by (5) by modus ponens by premise (d) by premise (e) by elimination (2) u โ†’ โˆผp by premise (c) u by (1) โˆด โˆผp by modus ponens (3) โˆผp โ†’ r โˆง โˆผs by premise (a) โˆผp by (2) โˆด r โˆง โˆผs by modus ponens (4) r โˆง โˆผs by (3) โˆด โˆผs by specialization 44. (5) โˆผt โ†’ s โˆผs โˆด โˆผt by premise (b) by (4) by modus tollens โˆผqโˆจs โˆผs โˆผq by premise (d) by premise (e) by elimination pโ†’q โˆผq โˆผp by premise (a) by (1) by modus tollens rโˆจs โˆผs r by premise (b) by premise (e) by elimination (1) … (2) … (3) … (4) … โˆผp r โˆผp โˆงr by (2) by (3) by conjunction 27 28 Solutions for Exercises: The Logic of Compound Statements (5) … (6) … (7) … (8) … โˆผp โˆงr โ†’u โˆผp โˆงr u โˆผ s โ†’โˆผ t โˆผs โˆผt by premise (f) by (4) by modus ponens by premise (c) by premise (e) by modus ponens wโˆจt โˆผt w by premise (g) by (6) by elimination u w uโˆงw by (5) by (7) by conjunction Section 2.4 1. R = 1 2. R = 1 3. S = 1 4. S = 1 5. The input/output table is as follows: Input Output P 1 1 0 0 R 1 1 0 1 Q 1 0 1 0 6. The input/output table is as follows: Input Output P Q R 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 S 1 0 1 1 1 0 1 0 7. The input/output table is as follows: Input P 1 1 0 0 Q 1 0 1 0 Output R 0 1 0 0 Instructorโ€™s Manual: Section 2.4 8. The input/output table is as follows: Input P 1 1 1 1 0 0 0 0 Q 1 1 0 0 1 1 0 0 Output R 1 0 1 0 1 0 1 0 S 1 1 1 1 1 1 1 1 9. P โˆจ โˆผQ 10. (P โˆจ Q)โˆง โˆผ Q 11. (P โˆง โˆผQ) โˆจ R 12. (P โˆจ Q)โˆจ โˆผ (Q โˆง R) 13. P NOT OR Q 14. P R NOT OR Q 15. P OR NOT AND NOT Q 16. P AND Q R OR NOT 29 30 Solutions for Exercises: The Logic of Compound Statements 17. P AND Q S OR NOT NOT AND R 18. a. (P โˆง Q โˆง โˆผR) โˆจ (โˆผP โˆง Q โˆง R) b. P Q AND R NOT OR NOT AND 19. a. (P โˆง Qโˆง โˆผ R) โˆจ (P โˆง โˆผ Qโˆง โˆผ R) โˆจ (โˆผ P โˆง Q โˆง โˆผ R) b. One circuit (among many) having the given input/output table is the following: P Q R AND NOT NOT AND NOT NOT AND NOT 20. a. (P โˆง Q โˆง R) โˆจ (P โˆง โˆผQ โˆง R) โˆจ (โˆผP โˆง โˆผQ โˆง โˆผR) OR S Instructorโ€™s Manual: Section 2.4 b. P Q AND R OR NOT AND NOT AND NOT NOT 21. a. (P โˆง Q โˆง โˆผ R) โˆจ (โˆผ P โˆง Q โˆง R) โˆจ (โˆผ P โˆง Q โˆง โˆผ R) b. One circuit (among many) having the given input/output table is the following: P Q R AND NOT NOT AND OR S NOT AND NOT 22. The input/output table is Input Output P Q R 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 S 0 1 0 0 0 0 1 0 One circuit (among many) having this input/output table is shown below. 31 32 Solutions for Exercises: The Logic of Compound Statements P Q AND R NOT OR NOT AND NOT 23. The input/output table is as follows: Input P 1 1 1 1 0 0 0 0 Q 1 1 0 0 1 1 0 0 Output R 1 0 1 0 1 0 1 0 S 1 0 0 0 0 0 0 1 One circuit (among many) having this input/output table is the following: P Q R AND OR NOT NOT S AND NOT 24. Let P and Q represent the positions of the switches in the classroom, with 0 being โ€œdownโ€ and 1 being โ€œup.โ€ Let R represent the condition of the light, with 0 being โ€œo๏ฌ€โ€ and 1 being โ€œon.โ€ Initially, P = Q = 0 and R = 0. If either P or Q (but not both) is changed to 1, the light turns on. So when P = 1 and Q = 0, then R = 1, and when P = 0 and Q = 1, then R = 1. Thus when one switch is up and the other is down the light is on, and hence moving the switch that is down to the up position turns the light o๏ฌ€. So when P = 1 and Q = 1, then R = 0. It follows that the input/output table has the following appearance: Input Output P 1 1 0 0 R 0 1 1 0 Q 1 0 1 0 Instructorโ€™s Manual: Section 2.4 33 One circuit (among many) having this input/output table is the following: P AND Q NOT R OR NOT AND 25. Let P , Q, and R indicate the positions of the switches, with 1 indicating that the switch is in the on position. Let an output of 1 indicate that the security system is enabled. The complete input/output table is as follows: Input P 1 1 1 1 0 0 0 0 Q 1 1 0 0 1 1 0 0 Output R 1 0 1 0 1 0 1 0 S 1 1 1 0 1 0 0 0 One circuit (among many) having this input/output table is the following: P Q R AND AND NOT OR NOT S AND NOT AND Note: One alternative answer interchanges the 1โ€™s and 0โ€™s. 26. The Boolean expression for (a) is (P โˆง Q) โˆจ Q, and for (b) it is (P โˆจ Q) โˆง Q. We must show that if these expressions are regarded as statement forms, then they are logically equivalent. 34 Solutions for Exercises: The Logic of Compound Statements Now (P โˆง Q) โˆจ Q โ‰ก โ‰ก โ‰ก โ‰ก Q โˆจ (P โˆง Q) (Q โˆจ P ) โˆง (Q โˆจ Q) (Q โˆจ P ) โˆง Q (P โˆจ Q) โˆง Q by the commutative law for โˆจ by the distributive law by the idempotent law by the commutative law for โˆง Alternatively, by the absorption laws, both statement forms are logically equivalent to Q. 27. The Boolean expression for circuit (a) is โˆผ P โˆง(โˆผ (โˆผ P โˆงQ)) and for circuit (b) it is โˆผ (P โˆจQ). We must show that if these expressions are regarded as statement forms, then they are logically equivalent. Now โˆผ P โˆง (โˆผ (โˆผ P โˆง Q)) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โˆผ P โˆง (โˆผ (โˆผ P )โˆจ โˆผ Q) โˆผ P โˆง (P โˆจ โˆผ Q) (โˆผ P โˆง P ) โˆจ (โˆผ P โˆง โˆผ Q) (P โˆง โˆผ P ) โˆจ (โˆผ P โˆง โˆผ Q) c โˆจ(โˆผ P โˆง โˆผ Q) (โˆผ P โˆง โˆผ Q)โˆจc โˆผPโˆงโˆผQ โˆผ (P โˆจ Q) by De Morganโ€™s law by the double negative law by the distributive law by the commutative law for โˆง by the negation law for โˆง by the commutative law for โˆจ by the identity law for โˆจ by De Morganโ€™s law. 28. The Boolean expression for circuit (a) is (P โˆง Q) โˆจ (P โˆง โˆผ Q) โˆจ (โˆผ P โˆง โˆผ Q) and for circuit (b) it is P โˆจ โˆผ Q. We must show that if these expressions are regarded as statement forms, then they are logically equivalent. Now (P โˆง Q) โˆจ (P โˆง โˆผ Q) โˆจ (โˆผ P โˆง โˆผ Q) โ‰ก ((P โˆง Q) โˆจ (P โˆง โˆผ Q)) โˆจ (โˆผ P โˆง โˆผ Q) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก (P โˆง (Qโˆจ โˆผ Q)) โˆจ (โˆผ P โˆง โˆผ Q) (P โˆง t) โˆจ (โˆผ P โˆง โˆผ Q) P โˆจ (โˆผ P โˆง โˆผ Q) (P โˆจ โˆผ P ) โˆง (P โˆจ โˆผ Q) t โˆง (P โˆจ โˆผ Q) (P โˆจ โˆผ Q) โˆง t Pโˆจ โˆผ Q by inserting parentheses (which is legal by the associative law for โˆจ) by the distributive law by the negation law for โˆจ by the identity law for โˆง by the distributive law by the negation law for โˆจ by the commutative law for โˆง by the identity law for โˆง. 29. The Boolean expression for circuit (a) is (P โˆง Q) โˆจ (โˆผ P โˆง Q) โˆจ (P โˆง โˆผ Q) and for circuit (b) it is P โˆจ Q. We must show that if these expressions are regarded as statement forms, then they are logically equivalent. Now (P โˆง Q) โˆจ (โˆผ P โˆง Q) โˆจ (P โˆง โˆผ Q) โ‰ก ((P โˆง Q) โˆจ (โˆผ P โˆง Q)) โˆจ (P โˆง โˆผ Q) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก ((Q โˆง P ) โˆจ (Qโˆง โˆผ P )) โˆจ (P โˆง โˆผ Q) (Q โˆง (P โˆจ โˆผ P )) โˆจ (P โˆง โˆผ Q) (Qโˆง t) โˆจ(P โˆง โˆผ Q) Q โˆจ (P โˆง โˆผ Q) (Q โˆจ P ) โˆง (Q โˆจ โˆผ Q) (Q โˆจ P )โˆง t QโˆจP P โˆจQ by inserting parentheses (which is legal by the associative law for โˆจ) by the commutative law for โˆง by the distributive law by the negation law for โˆจ by the identity law for โˆง by the distributive law by the negation law for โˆจ by the identity law for โˆง by the commutative law for โˆจ. Instructorโ€™s Manual: Section 2.4 30. (P โˆง Q) โˆจ (โˆผP โˆง Q) โˆจ (โˆผP โˆง โˆผQ) โ‰ก (P โˆง Q) โˆจ ((โˆผP โˆง Q) โˆจ (โˆผP โˆง โˆผQ) โ‰ก (P โˆง Q) โˆจ (โˆผP โˆง (Q โˆจ โˆผQ)) โ‰ก (P โˆง Q) โˆจ (โˆผP โˆง t) โ‰ก (P โˆง Q) โˆจ โˆผP โ‰ก โˆผP โˆจ (P โˆง Q) โ‰ก (โˆผP โˆจ P ) โˆง (โˆผP โˆจ Q) โ‰ก (P โˆจ โˆผP ) โˆง (โˆผP โˆจ Q) โ‰ก t โˆง (โˆผP โˆจ Q) โ‰ก (โˆผP โˆจ Q) โˆง t โ‰ก โˆผP โˆจ Q by inserting parentheses (which is legal by the associative law) by the distributive law by the negation law for โˆจ by the identity law for โˆง by the commutative law for โˆจ by the distributive law by the commutative law for โˆจ by the negation law for โˆจ by the commutative law for โˆง by the identity law for โˆง 31. (โˆผ P โˆง โˆผ Q) โˆจ (โˆผ P โˆง Q) โˆจ (P โˆง โˆผ Q) โ‰ก ((โˆผ P โˆง โˆผ Q) โˆจ (โˆผ P โˆง Q)) โˆจ (P โˆง โˆผ Q) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก (โˆผ P โˆง (โˆผ Q โˆจ Q)) โˆจ (P โˆง โˆผ Q) (โˆผ P โˆง (Qโˆจ โˆผ Q)) โˆจ (P โˆง โˆผ Q) (โˆผ P โˆง t) โˆจ(P โˆง โˆผ Q) โˆผ P โˆจ (P โˆง โˆผ Q) (โˆผ P โˆจ P ) โˆง (โˆผ P โˆจ โˆผ Q) (P โˆจ โˆผ P ) โˆง (โˆผ P โˆจ โˆผ Q) t โˆง(โˆผ P โˆจ โˆผ Q) (โˆผ P โˆจ โˆผ Q)โˆง t โˆผPโˆจโˆผQ โˆผ (P โˆง Q) by inserting parentheses (which is legal by the associative law) by the distributive law by the commutative law for โˆจ by the negation law for โˆจ by the identity law for โˆง by the distributive law by the commutative law for โˆจ by the negation law for โˆจ by the commutative law for โˆง by the identity law for โˆง by De Morganโ€™s law. 32. (P โˆง Q โˆง R) โˆจ ((P โˆง โˆผ Q โˆง R) โˆจ (P โˆง โˆผ Qโˆง โˆผ R) โ‰ก ((P โˆง (Q โˆง R)) โˆจ (P โˆง (โˆผ Q โˆง R))) โˆจ (P โˆง (โˆผ Qโˆง โˆผ R)) โˆจ (P โˆง โˆผ Q) by inserting parentheses (which is legal by the associative law) โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก โ‰ก (P โˆง [(Q โˆง R) โˆจ (โˆผ Q โˆง R)] โˆจ (P โˆง [โˆผ Qโˆง โˆผ R]) P โˆง ([(Q โˆง R) โˆจ (โˆผ Q โˆง R)] โˆจ [โˆผ Qโˆง โˆผ R]) P โˆง ([(R โˆง Q) โˆจ (Rโˆง โˆผ Q)] โˆจ [โˆผ Qโˆง โˆผ R]) P โˆง ([(R โˆง (Qโˆจ โˆผ Q)] โˆจ [โˆผ Qโˆง โˆผ R]) P โˆง ([(Rโˆง t] โˆจ[โˆผ Qโˆง โˆผ R]) P โˆง (R โˆจ [โˆผ Qโˆง โˆผ R]) P โˆง ((R โˆจ โˆผ Q) โˆง (Rโˆจ โˆผ R)) P โˆง ((R โˆจ โˆผ Q) โˆง t]) P โˆง (R โˆจ โˆผ Q) by the distributive law by the distributive law by the commutative law for โˆง by the distributive law by the negation law for โˆจ by the identity law for โˆง by the distributive law by the negation law for โˆจ by the identity law for โˆง. 33. a. (P | Q) | (P | Q) โ‰ก โ‰ก โ‰ก โ‰ก โˆผ [(P | Q) โˆง (P | Q)] โˆผ (P | Q) โˆผ [โˆผ (P โˆง Q)] P โˆงQ by de๏ฌnition of | by the idempotent law for โˆง by de๏ฌnition of | by the double negative law. b. P โˆง (โˆผ Q โˆจ R) โ‰ก (P | (โˆผ Q โˆจ R)) | (P | (โˆผ Q โˆจ R)) by part (a) โ‰ก (P | [(โˆผ Q |โˆผ Q) | (R | R)]) | (P | [(โˆผ Q |โˆผ Q) | (R | R)]) by Example 2.4.7(b) โ‰ก (P | [((Q | Q) | (Q | Q)) | (R | R)]) | (P | [((Q | Q) | (Q | Q)) | (R | R)]) by Example 2.4.7(a) 35 36 Solutions for Exercises: The Logic of Compound Statements 34. a. (P โ†“ Q) โ†“ (P โ†“ Q) b. P โˆจQ c. P โˆงQ d. P โ†’Q e. P โ†”Q โ‰ก โˆผ(P โ†“ Q) by part (a) โ‰ก โˆผ[โˆผ(P โˆจ Q)] by de๏ฌnition of โ†“ โ‰กP โˆจQ by the double negative law โ‰ก โ‰ก โ‰ก โˆผ (โˆผ (P โˆจ Q)) by the double negative law โˆผ (P โ†“ Q) by de๏ฌnition of โ†“ (P โ†“ Q) โ†“ (P โ†“ Q) by part (a). โ‰ก โ‰ก โ‰ก โˆผ (โˆผ P โˆจ โˆผ Q) by De Morganโ€™s law and the double negative law โˆผ P โ†“โˆผ Q by de๏ฌnition of โ†“ (P โ†“ P ) โ†“ (Q โ†“ Q) by part (a). โ‰ก โ‰ก โ‰ก โˆผP โˆจQ by Exercise 13(a) of Section 2.2 (โˆผ P โ†“ Q) โ†“ (โˆผ P โ†“ Q) by part (b) ((P โ†“ P ) โ†“ Q) โ†“ ((P โ†“ P ) โ†“ Q) by part (a). โ‰ก (P โ†’ Q) โˆง (Q โ†’ P ) โ‰ก ([(P โ†“ P ) โ†“ Q] โ†“ [(P โ†“ P ) โ†“ Q)]) โˆง ([(Q โ†“ Q) โ†“ P ] โ†“ [(Q โ†“ Q) โ†“ P )]) โ‰ก (([(P โ†“ P ) โ†“ Q] โ†“ [(P โ†“ P ) โ†“ Q)]) โ†“ ([(P โ†“ P ) โ†“ Q] โ†“ [(P โ†“ P ) โ†“ Q)])) โ†“ (([(Q โ†“ Q) โ†“ P ] โ†“ [(Q โ†“ Q) โ†“ P )]) โ†“ ([(Q โ†“ Q) โ†“ P ] โ†“ [(Q โ†“ Q) โ†“ P )])) by the truth table on page 46 of the text by part (d) by part (c) Section 2.5 1. 1910 = 16 + 2 + 1 = 100112 2. 55 = 32 + 16 + 4 + 2 + 1 = 1101112 3. 287 = 256 + 16 + 8 + 4 + 2 + 1 = 1000111112 4. 45810 = 256 + 128 + 64 + 8 + 2 = 1110010102 5. 1609 = 1024 + 512 + +64 + 8 + 1 = 110010010012 6. 1424 = 1024 + 256 + 128 + 16 = 101100100002 7. 11102 = 8 + 4 + 2 = 1410 8. 101112 = 16 + 4 + 2 + 1 = 2310 9. 1101102 = 32 + 16 + 4 + 2 = 5410 10. 11001012 = 64 + 32 + 4 + 1 = 10110 11. 10001112 = 64 + 4 + 2 + 1 = 7110 12. 10110112 = 64 + 16 + 8 + 2 + 1 = 9110 13. 1 1 1 1 0 1 12 + 1 0 12 1 0 0 0 02 Instructorโ€™s Manual: Section 2.5 14. 0 1 1 1 0 0 12 + 1 0 1 12 1 0 1 0 02 15. 1 1 1 1 1 0 1 1 0 12 + 1 1 1 0 12 1 0 0 1 0 1 02 16. 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 12 + 1 0 0 1 0 1 1 0 1 02 1 0 0 0 0 0 1 0 1 0 12 17. 1 1 10 10 1 1 0 โˆ’ 1 1 1 1 0 0 1 02 12 12 10 18. 10 0 0 10 0 1 โˆ’ 1 1 1 0 1 1 1 02 0 12 0 12 19. 0 10 1 0 1 1 โˆ’ 1 0 0 1 1 0 0 1 1 20. 12 12 02 1 10 1 10 1 0 10 0 10 0 10 10 1 โˆ’ 0 1 1 1 0 0 1 1 1 1 0 1 0 02 12 12 1 21. a. S = 0, T = 1 b. S = 0, T = 1 c. S = 0, T = 0 22. Note that + 111111112 12 1000000002 and 1000000002 = (28 )10 . Because 12 = 110 , we have that โˆ’ 111111112 + 12 12 111111112 = โˆ’ = 23. |โˆ’23|10 = 2310 = (16 + 4 + 2 + 1)10 = 000101112 11101001. So the answer is 11101001. (28 )10 110 (28 โˆ’ 1)10 flip the bits โˆ’โ†’ add 1 11101000 โˆ’โ†’ 37 38 Solutions for Exercises: The Logic of Compound Statements 24. |โˆ’67|10 = 6710 = (64 + 2 + 1)10 = 010000112 flip the bits โˆ’โ†’ add 1 10111100 โˆ’โ†’ 10111101. So the 8-bit twoโ€™s complement is 10111101. 25. |โˆ’4|10 = 410 = 000001002 flip the bits โˆ’โ†’ add 1 11111011 โˆ’โ†’ 11111100. So the answer is 11111100. 26. |โˆ’115|10 = 11510 = (64 + 32 + 16 + 2 + 1)10 = 011100112 flip the bits โˆ’โ†’ add 1 10001100 โˆ’โ†’ 10001101 So the 8-bit twoโ€™s complement is 10001101. 27. Because the leading bit is 1, this is the 8-bit twoโ€™s complement of a negative integer. 11010011 flip the bits โˆ’โ†’ add 1 00101100 โˆ’โ†’ 001011012 = (32 + 8 + 4 + 1)10 = |โˆ’45|10 . So the answer is โˆ’45. 28. Because the leading bit is 1, this is the 8-bit twoโ€™s complement of a negative integer. 10011001 add 1 01100110 โˆ’โ†’ 011001112 = (64 + 32 + 4 + 2 + 1)10 = |โˆ’103|10 . So the answer is โˆ’103. flip the bits โˆ’โ†’ 29. Because the leading bit is 1, this is the 8-bit twoโ€™s complement of a negative integer. 11110010 flip the bits โˆ’โ†’ add 1 00001101 โˆ’โ†’ 000011102 = (8 + 4 + 2)10 = |โˆ’14|10 . So the answer is โˆ’14. 30. Because the leading bit is 1, this is the 8-bit twoโ€™s complement of a negative integer. 10111010 add 1 01000101 โˆ’โ†’ 010001102 = (64 + 4 + 2)10 = |โˆ’70|10 . So the answer is โˆ’70. flip the bits 31. 5710 = (32 + 16 + 8 + 1)10 = 1110012 โ†’ 00111001 |โˆ’118|10 = (64 + 32 + 16 + 4 + 2)10 = 011101102 flip the bits โˆ’โ†’ add 1 10001001 โˆ’โ†’ 10001010. So the 8-bit twoโ€™s complements of 57 and โˆ’118 are 00111001 and 10001010. Adding the 8-bit twoโ€™s complements in binary notation gives + 00111001 10001010 11000011 Since the leading bit of this number is a 1, the answer is negative. Converting back to decimal flip the bits add 1 form gives 11000011 โˆ’โ†’ 00111100 โˆ’โ†’ 001111012 = (32 + 16 + 8 + 4 + 1)10 = |61|10 . So the answer is โˆ’61. 32. 6210 = (32 + 16 + 8 + 4 + 2)10 = 1111102 โ†’ 00111110 |โˆ’18|10 = (16 + 2)10 = 00010010 flip the bits โˆ’โ†’ add 1 11101101 โˆ’โ†’ 11101110 Thus the 8-bit twoโ€™s complements of 62 and โˆ’18 are 00111110 and 10110111. Adding the 8-bit twoโ€™s complements in binary notation gives + 00111110 11101110 00101100 Truncating the 1 in the 28 th position gives 00101100. Since the leading bit of this number is a 0, the answer is positive. Converting back to decimal form gives 00101100 โ†’ 1011002 = (32 + 8 + 4)10 = 4410 . So the answer is 44. โˆ’โ†’ Instructorโ€™s Manual: Section 2.5 33. |โˆ’6|10 = (4 + 2)10 = 1102 flip the bits โˆ’โ†’ |โˆ’73|10 = (64 + 8 + 1)10 = 01001001 39 add 1 00000110 โ†’ 11111001 โˆ’โ†’ 11111010 flip the bits add 1 โˆ’โ†’ 10110110 โˆ’โ†’ 10110111 Thus the 8-bit twoโ€™s complements of โˆ’6 and โˆ’73 are 11111010 and 10110111. Adding the 8-bit twoโ€™s complements in binary notation gives + 11111010 10110111 10110001 Truncating the 1 in the 28 th position gives 10110001. Since the leading bit of this number is a 1, the answer is negative. Converting back to decimal form gives 10110001 flip the bits โˆ’โ†’ add 1 01001110 โˆ’โ†’ 010011112 = (64 + 8 + 4 + 2 + 1) = 7910 = |โˆ’79|10 So the answer is โˆ’79. 34. 8910 = (64 + 16 + 8 + 1)10 = 010110012 |โˆ’55|10 = (32 + 16 + 4 + 2 + 1)10 = 001101112 flip the bits โˆ’โ†’ add 1 11001000 โˆ’โ†’ 11001001 So the 8-bit twoโ€™s complements of 89 and โˆ’55 are 01001111 and 11010101. Adding the 8-bit twoโ€™s complements in binary notation gives 01011001 11001001 100100010 + Truncating the 1 in the 28 th position gives 00100010. Since the leading bit of this number is a 0, the answer is positive. Converting back to decimal form gives 001000102 = (32 + 2)10 = 3410 . So the answer is 34. 35. |โˆ’15|10 = (8 + 4 + 2 + 1)10 = 000011112 flip the bits |โˆ’46|10 = (32 + 8 + 4 + 2)10 = 001011102 โˆ’โ†’ flip the bits โˆ’โ†’ add 1 11110000 โˆ’โ†’ 11110001 add 1 11010001 โˆ’โ†’ 11010010 So the 8-bit twoโ€™s complements of โˆ’15 and โˆ’46 are 11110001 and 10100010. Adding the 8-bit twoโ€™s complements in binary notation gives + 11110001 11010010 111000011 Truncating the 1 in the 28 th position gives 11000011. Since the leading bit of this number is a 1, the answer is negative. Converting back to decimal form gives 11000011 flip the bits โˆ’โ†’ So the answer is โˆ’61. add 1 00111100 โˆ’โ†’ 001111012 = โˆ’(32 + 16 + 8 + 4 + 1)10 = |โˆ’61|10 . 40 Solutions for Exercises: The Logic of Compound Statements 36. 12310 = (64 + 32 + 16 + 8 + 2 + 1)10 = 011110112 |โˆ’94|10 = (64 + 16 + 8 + 4 + 2)10 = 010111102 flip the bits add 1 โˆ’โ†’ 10100001 โˆ’โ†’ 10100010 So the 8-bit twoโ€™s complements of 123 and โˆ’94 are 01111011 and 10100010. Adding the 8-bit twoโ€™s complements in binary notation gives + 01111011 10100010 100011101 Truncating the 1 in the 28 th position gives 00011101. Since the leading bit of this number is a 0, the answer is positive. Converting back to decimal form gives 000111012 = (16 + 8 + 4 + 1)10 = 2910 . So the answer is 29. 37. a. The 8-bit twoโ€™s complement of โˆ’128 is computed as follows: |โˆ’128|10 = 12810 = (27 )10 = 100000002 flip the bits โˆ’โ†’ add 1 01111111 โˆ’โ†’ 10000000. So the 8-bit twoโ€™s complement of โˆ’128 is 10000000. If the twoโ€™s complement procedure is flip the bits add 1 applied to this result, the following is obtained 10000000 โˆ’โ†’ 01111111 โˆ’โ†’ 10000000. So the 8-bit twoโ€™s complement of the 8-bit twoโ€™s complement of โˆ’128 is 10000000, which is the 8-bit twoโ€™s complement of โˆ’128. b. Suppose a, b, and a + b are integers in the range from 1 through 128. Then 1 โ‰ค a โ‰ค 128 = 27 1 โ‰ค b โ‰ค 128 = 27 1 โ‰ค a + b โ‰ค 128 = 27 . Multiplying all parts of all three inequalities by โˆ’1 gives โˆ’1 โ‰ฅ โˆ’a โ‰ฅ โˆ’27 โˆ’ 1 โ‰ฅ โˆ’b โ‰ฅ โˆ’27 โˆ’ 1 โ‰ฅ โˆ’(a + b) โ‰ฅ โˆ’27 . Thus 28 โˆ’ (a + b) โ‰ฅ 28 โˆ’ 27 โ‰ฅ 27 (2 โˆ’ 1) = 27 , and (28 โˆ’ a) + (28 โˆ’ b) = 28 + (28 โˆ’ (a + b)) โ‰ฅ 28 + 27 . Therefore, the 8-bit twoโ€™s complement of (28 โˆ’ a) + (28 โˆ’ b) has 1โ€™s in both the 28 th and the 27 th positions. The 1 in the 28 th position is truncated, and the 1 in the 27 th position shows that the sum is negative. 38. A2BC16 = 10ยท163 + 2ยท162 + 11ยท16 + 12 = 41,66010 39. E0D16 = 14ยท162 + 0 + 13 = 359710 40. 39EB16 = 3ยท163 + 9ยท162 + 14ยท16 + 11 = 14, 82710 41. 0001 1100 0000 1010 1011 11102 42. B53DF 816 = 1011 0101 0011 1101 1111 10002 43. 4ADF 8316 = 0100 1010 1101 1111 1000 00112 44. 2E16 45. 1011 0111 1100 01012 = B7C516 Instructorโ€™s Manual: Section 2.5 41 46. 1011 0111 1100 01012 = B7C516 47. a. 6ยท84 + 1ยท83 + 5ยท82 + 0ยท8 + 2ยท1 = 25,41010 b. 207638 = 2ยท84 + 0ยท83 + 7ยท82 + 6ยท8 + 3 = 8, 69110 c. To convert an integer from octal to binary notation: (i) Write each octal digit of the integer in ๏ฌxed 3-bit binary notation (and include leading zeros as needed). Note that octal digit 3-bit binary equivalent 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111 (ii) Juxtapose the results. As an example, consider converting 615028 to binary notation: 68 = 1102 18 = 0012 58 = 1012 08 = 0002 28 = 0102 . So in binary notation the integer should be 110 001 101 000 0102 . This result can be checked by writing the integer in decimal notation and comparing it to the answer obtained in part (a): 110 001 101 000 0102 = (1 ยท 214 + 1 ยท 213 + 1 ยท 29 + 1 ยท 28 + 1 ยท 26 + 1 ยท 2)10 = 2541010 . This is the same as the answer obtained in part (a). So the two methods give the same result. To convert an integer from binary to octal notation: (i) Group the digits of the binary number into sets of three, starting from the right and adding leading zeros as needed: (ii) Convert the binary numbers in each set of three into octal digits; (iii) Juxtapose those octal digits. As an example consider converting 11010111012 to octal notation. Grouping the binary digits in sets of three and adding two leading zeros gives 001 101 011 101. To convert each group into an octal digit, note that 0012 = 18 1012 = 58 0112 = 38 1012 = 58 . So the octal version of the integer should be 15358 . To check this result, observe that 1 101 011 1012 = (1 ยท 29 + 1 ยท 28 + 1 ยท 26 + 1 ยท 24 + 1 ยท 23 + 1 ยท 22 + 1)10 = 86110 and 15358 = (1 ยท 83 + 5 ยท 82 + 3 ยท 8 + 5)10 = 86110 also. So the two methods give the same result.

Document Preview (41 of 732 Pages)

User generated content is uploaded by users for the purposes of learning and should be used following SchloarOn's honor code & terms of service.
You are viewing preview pages of the document. Purchase to get full access instantly.

Shop by Category See All


Shopping Cart (0)

Your bag is empty

Don't miss out on great deals! Start shopping or Sign in to view products added.

Shop What's New Sign in