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

Similar documents
ANS: If you are in Kwangju then you are in South Korea but not in Seoul.

CSC Discrete Math I, Spring Propositional Logic

A statement is a sentence that is definitely either true or false but not both.

Compound Propositions

Introduction to Decision Sciences Lecture 2

2.2: Logical Equivalence: The Laws of Logic

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Math.3336: Discrete Mathematics. Propositional Equivalences

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Homework 4 Solutions

EECS 1028 M: Discrete Mathematics for Engineers

Section 1.1: Logical Form and Logical Equivalence

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Chapter 1, Section 1.1 Propositional Logic

Homework assignment 1: Solutions

2 Truth Tables, Equivalences and the Contrapositive

CISC-102 Winter 2016 Lecture 17

Recitation Week 3. Taylor Spangler. January 23, 2012

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Section 3.1 Statements, Negations, and Quantified Statements

ANALYSIS EXERCISE 1 SOLUTIONS

Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside.

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

Solutions to Sample Problems for Midterm

Chapter 1: The Logic of Compound Statements. January 7, 2008

Introduction to Sets and Logic (MATH 1190)

Prof. Girardi Exam 1 Math 300 MARK BOX

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Definition 2. Conjunction of p and q

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Proving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.

Propositional Equivalence

Section 2.3: Statements Containing Multiple Quantifiers

PHIL12A Section answers, 16 February 2011

1.3 Propositional Equivalences

THE LOGIC OF COMPOUND STATEMENTS

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

Basic Logic and Proof Techniques

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Math 13, Spring 2013, Lecture B: Midterm

Midterm Exam Solution

Lecture 7. Logic. Section1: Statement Logic.

Propositional logic ( ): Review from Mat 1348

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

1.1 Statements and Compound Statements

Boolean Logic. CS 231 Dianna Xu

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Announcement. Homework 1

Chapter 1: Formal Logic

PROBLEM SET 3: PROOF TECHNIQUES

Mat 243 Exam 1 Review

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

1.1 Language and Logic

Preparing for the CS 173 (A) Fall 2018 Midterm 1

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

THE LOGIC OF COMPOUND STATEMENTS

Truth-Functional Logic

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

HOMEWORK 1: SOLUTIONS - MATH 215 INSTRUCTOR: George Voutsadakis

Solutions to Exercises (Sections )

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Mathematical Logic Part One

Sec 3.3 The Conditional & Circuits

CS1800 Discrete Structures Spring 2018 February CS1800 Discrete Structures Midterm Version A

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference


3.2: Compound Statements and Connective Notes

The Logic of Compound Statements cont.

Tautologies, Contradictions, and Contingencies

Computer Science 280 Spring 2002 Homework 2 Solutions by Omar Nayeem

Chapter 1 Elementary Logic

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

CISC-102 Fall 2018 Week 11

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

Topic 1: Propositional logic

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Chapter 3: Logic. Diana Pell. A statement is a declarative sentence that is either true or false, but not both.

Math 10850, fall 2017, University of Notre Dame

It is not the case that ϕ. p = It is not the case that it is snowing = It is not. r = It is not the case that Mary will go to the party =

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Discrete Mathematics. Instructor: Sourav Chakraborty. Lecture 4: Propositional Logic and Predicate Lo

Supplementary exercises in propositional logic

The statement calculus and logic

Announcements CompSci 102 Discrete Math for Computer Science

Propositional Logic. Spring Propositional Logic Spring / 32

Introduction. Applications of discrete mathematics:

Learning Goals of CS245 Logic and Computation

For all For every For each For any There exists at least one There exists There is Some

Transcription:

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. 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

2. [4 points] Use a truth table to show that the following logical equivalence is correct ((p p) q) (p q) 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)) Notice that there is typically more than one reasonable sequence of equivalences 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)) (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

(c) (4 points) (p q) ( p r) (q r) is a tautology (i.e. always true) 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

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

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. 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. 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

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. The two most common Ampheck operators, the Peirce arrow (written or or by different people) and the Sheffer stroke (written or or by different people), are defined by the following truth table: p q p q p q T T F F T F T F F T T F F F T T (a) The set of operators {,, } is functionally complete, which means that every logical statement can be expressed using only these three operators. Is the smaller set of operators {, } also functionally complete? Explain why or why not. By De Morgan s laws, p q (p q), so every logical statement using the operator can be rewritten in terms of the and operators. Since every logical statement can be expressed in terms of the,, and operators, this implies that every logical statement can be expressed in terms of the and operators, and so {, } is functionally complete. (b) Express p using only the Sheffer stroke operation. p is true if and only if p is false. We can see from the truth table that when q is true, p q is true if and only if p is false. Thus, p can be expressed as p T. Alternatively, p p is equivalent to p p p p q T F F F T T (c) Express p q using only the Sheffer stroke operation. Justify your answer (e.g. using a truth table). p q (p T ) (q T ) p q T T T T T F T T F T T T F F F F Alternatively, observe from the table that p q (p q). By De Morgan s laws, (p q) p q, so p q p q. Replacing p with its definition in terms of the operator yields the expression (p T ) (q T ). Since p T p p p, another equivalent formula is (p p) (q q). 6

(d) Explain why the set of operators { } is functionally complete. In parts b and c, we showed that the and operators can be expressed in terms of the operator, so any statement that can be expressed in terms of those two operators can be expressed in terms of the operator. In part a, we showed that the set of operators {, } are sufficient to express any statement, so the set of the operator { } is also sufficient to express any statement, and thus is functionally complete. (e) (4 point bonus) Express the Sheffer stroke operation p q using only the Peirce arrow operation. Explain why the set of operators { } is functionally complete. p q ((p F ) (q F )) F p q T T F F T F T T F T T T F F T T Alternatively, observe from the table that p q (p q). By De Morgan s laws, (p q) p q, so p q p q. Looking again at the table, we see that p F p. Recall that p q (p q). Then we can see that (p q) ( p q), and rewriting the operator results in the expression ((p F ) (q F )) F as equivalent to p q. Notice that p F p p p. So, if you want to remove the literal use of F from the above formula, you can use the identity p F p p. to convert it to [(p p) (q q)] [(p p) (q q)] So, any statement that can be expressed with the can also be expressed with the operator. So, since { } is functionally complete, { } is also functionally complete. 7