CS 173: Discrete Mathematical Structures, Spring 2008 Homework 1 Solutions

CS 173: Discrete Mathematical Structures, Spring 2008 Homework 1 Solutions

CS 173 Homework 1 Solutions Fall 2008 CS 173: Discrete Mathematical Structures, Spring 2008 Homework 1 Solutions 1. [10 points] Translate the following sentences into propositional logic, making the meaning of your propositional variables clear, and then create a truth table for each sentence. See page 11 of the textbook for some examples of translating English sentences into propositional logic. Solution: Normal English is somewhat vague about the meaning of “or.” As a result, the sentences in both parts of this problem could be translated using either the inclusive or (_) or the exclusive or (⊕) operator. We've shown one option, but the other is also worth full credit. Be aware that in mathematical English (e.g. proofs), “or” should always be read as inclusive or. (a) Either the Chicago White Sox pitching improves and they continue to hit well or the Minnesota Twins will win the division. Let p, q, and r represent “the Chicago White Sox pitching improves”, “the White Sox continue to hit well”, and “the Minnesota Twins will win the division” respectively. Then the above can be written as (p ^ q) ⊕ r. The truth table for this sentence is: p q r (p ^ q) ⊕ r T T T F T T F T T F T T T F F F F T T T F T F F F F T T F F F F (b) Discrete mathematics is interesting and has many useful applications or the students will not be happy. Let p, q, and r represent “Discrete mathematics is interesting”, “Discrete mathematics has many useful applications”, and “the students will be happy” respectively. Then the above can be written as (p ^ q) _ :r. The truth table for this sentence is: p q r (p ^ q) _ :r T T T T T T F T T F T F T F F T F T T F F T F T F F T F F F F T 1 CS 173 Homework 1 Solutions Fall 2008 2. [4 points] Use a truth table to show that the following logical equivalence is correct :((p ^ p) ⊕ q) ≡ (p $ q) Solution: p q p ^ p (p ^ p) ⊕ q :((p ^ p) ⊕ q) (p $ q) T T T F T T T F T T F F F T F T F F F F F F T T 3. [10 points] In the following exercises, use the logical equivalences given on pages 24 and 25 of the textbook (in Tables 6 through 8) to show that: (a) (:p ! (q ! r)) ≡ (q ! (p _ r)) Solution: Notice that there is typically more than one reasonable sequence of equiva- lences for such a problem, so your answer may not exactly match this one. (:p ! (q ! r)) ≡ (:p ! (:q _ r)) ≡ (::p _ (:q _ r)) ≡ (p _ (:q _ r)) (double negation law) ≡ ((:q _ r) _ p) (commutative law) ≡ (:q _ (r _ p)) (associative law) ≡ (:q _ (p _ r)) (commutative law) ≡ (q ! (p _ r)) Solution: (b) :(p ! :q) ^ :(p _ q) is a contradiction (i.e. always false). :(p ! :q) ^ :(p _ q) ≡ (p ^ q) ^ :(p _ q) ≡ (p ^ q) ^ (:p ^ :q) (De Morgan's law) ≡ p ^ (q ^ (:p ^ :q)) (associative law) ≡ p ^ (q ^ (:q ^ :p)) (commutative law) ≡ p ^ ((q ^ :q) ^ :p) (associative law) ≡ p ^ (F ^ :p) (negation law) ≡ p ^ (:p ^ F ) (commutative law) ≡ p ^ F (domination law) ≡ F (domination law) 2 CS 173 Homework 1 Solutions Fall 2008 (c) (4 points) (p _ q) ^ (:p _ r) ! (q _ r) is a tautology (i.e. always true) Solution: Notice that square brackets are used here simply as a variation of parentheses, so that complex sets of parentheses are easier to read. (p _ q) ^ (:p _ r) ! (q _ r) ≡ :[(p _ q) ^ (:p _ r)] _ (q _ r) (from table 7) ≡ [:(p _ q) _ :(:p _ r)] _ (q _ r) (De Morgan's law) ≡ [(:p ^ :q) _ :(:p _ r)] _ (q _ r) (De Morgan's law) ≡ [(:p ^ :q) _ (::p ^ :r)] _ (q _ r) (De Morgan's law) ≡ [(:p ^ :q) _ (p ^ :r)] _ (q _ r) (double negation law) We now need to shuffle the terms around, so as to group together the q and :q terms, and also the p and :p terms. [(:p ^ :q) _ (p ^ :r)] _ (q _ r) ≡ (:p ^ :q) _ [(p ^ :r) _ (q _ r)] (associative law) ≡ (:p ^ :q) _ [(p ^ :r) _ (r _ q)] (commutative law) ≡ (:p ^ :q) _ [((p ^ :r) _ r) _ q)] (associative law) ≡ (:p ^ :q) _ [q _ ((p ^ :r) _ r))] (commutative law) ≡ [(:p ^ :q) _ q] _ [(p ^ :r) _ r] (associative law) Now we can simplify each half of the expression: [(:p ^ :q) _ q] _ [(p ^ :r) _ r] ≡ [q _ (:p ^ :q)] _ [r _ (p ^ :r)] (commutative law) ≡ [(q _ :p) ^ (q _ :q)] _ [(r _ p) ^ (r _ :r)] (distributive law) ≡ [(q _ :p) ^ T ] _ [(r _ p) ^ T ] (negation law) ≡ (q _ :p) _ (r _ p) (identity law) And finally merge them: (q _ :p) _ (r _ p) ≡ q _ [:p _ (r _ p)] (associative law) ≡ q _ [:p _ (p _ r)] (commutative law) ≡ q _ [(:p _ p) _ r] (associative law) ≡ q _ (T _ r) (negation law) ≡ q _ (r _ T ) (commutative law) ≡ q _ T (domination law) ≡ T (domination law) 3 CS 173 Homework 1 Solutions Fall 2008 4. [5 points] Assume that there are only two kinds of people, a person is either authentic or a charlatan. A person is authentic if and only if every statement they make is true. A person is a charlatan if and only if every statement they make is false. Suppose you meet Augustus De Morgan and Charles Babbage in class one day and they say the following: Babbage: Both De Morgan and I are authentic. De Morgan: Babbage is a charlatan What kind of people are De Morgan and Babbage? Justify your answer. Solution 1: De Morgan is authentic, while Babbage is a charlatan (no offense intended to Babbage). If Babbage is authentic, then his statement is true – both he and De Morgan are authentic. However, if De Morgan is authentic, then his statement is true – Babbage is a charlatan, which creates a contradiction. Thus, Babbage must be a charlatan. This means that De Morgan's statement is true, so De Morgan is authentic. Solution 2: First we model the possible statements from the problem definition: • p = Babbage is authentic. • q = Babbage is a charlatan. • r = De Morgan is a authentic. • s = De Morgan is a charlatan. There are only two kinds of people (a person is either authentic, or a charlatan, but not both). Thus we have: • p $ :q • r $ :s This means we can forget about q and s, and work uniquely with p and r (we could alternatively work with p and s, or q and s). We know that an authentic person always makes true statements. We can model “De Morgan: Babbage is a charlatan” as: • r $ :p, that is, r ≡ :p. This is saying that if r is true, De Morgan is authentic, whatever De Morgan says is true. In this case, De Morgan says Babbage is not authentic, a charlatan, or :p. If r is false (De Morgan is a charlatan), then :p needs to be false too, that is, Babbage is authentic. Similarly, we model “Babbage: Both De Morgan and I are authentic” with: • p $ (p ^ r) Using r ≡ :p in p $ (p ^ r): 4 CS 173 Homework 1 Solutions Fall 2008 • p $ (p ^ :p) Using a negation law in the previous expression: • p $ F Since r ≡ :p, we have that r ≡ T . We conclude that De Morgan is authentic (p), and Babbage a charlatan (:r). 5. [5 points] (a) State the negation of the statement “I have overslept or the building is on fire”, using deMorgan's laws to move the negation from the whole thing onto the two component statements. Solution: By De Morgan's laws, :(p _ q) ≡ :p ^ :q. Let p and q represent the statements “I have overslept” and “the building is on fire” respectively. Then the negation of the statement “I have overslept or the building is on fire” is “I have not overslept and the building is not on fire”. (b) Using your result from part (a), write the negation, contrapositive, converse and inverse of the following statement (see page 8 of the textbook for a related example). If I have overslept or the building is on fire, then the class will be canceled. Solution: Let r represent the statement “the class is canceled”, and define p and q as above. Then :((p _ q) ! r) ≡ (p _ q) ^ :r, so the negation of the statement is “I have overslept or the building is on fire, and the class will not be canceled”. The contrapositive of the statement is :r ! (:p ^ :q): “If the class is not canceled, then I have not overslept and the building is not on fire”. The converse of the statement is r ! (p _ q): “If the class is canceled, then I have overslept or the building is on fire”. The inverse of the statement is (:p ^ :q) ! :r: “If I have not overslept and the building is not on fire, then the class will not be canceled”. 5 CS 173 Homework 1 Solutions Fall 2008 6. [16 points] The late 19th century philosopher Charles Peirce (rhymes with `hearse,' not ‘fierce’) wrote about a set of logically dual operators and, in his writings, coined the term `Ampheck' to describe them.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us