Mathematics for Computer Science Exercises from Chapter 3

Size: px
Start display at page:

Download "Mathematics for Computer Science Exercises from Chapter 3"

Transcription

1 Mathematics for Computer Science Exercises from Chapter 3 Silvio Capobianco Last update: 19 September 2018 Problems from Section 3.1 Problem 3.2. Your class has a textbook and a final exam. Let P, Q, and R be the following propositions: P ::= You get an A on the final exam. Q ::= You do every exercise in the book. R ::= You get an A in the class. Translate following assertions into propositional formulas using P, Q, R, and the propositional connectives and, not(), implies. (a) You get an A in the class, but you do not do every exercise in the book. (b) You get an A on the final exam, you do every exercise in the book, and you get an A in the class. (c) To get an A in the class, it is necessary for you to get an A on the final. (d) You get an A on the final, but you don t do every exercise in this book; nevertheless, you get an A in this class. 1

2 Solution. (a) In this case, R is verified, Q is not, and P is irrelevant: the assertion translates as R and not(q). (b) Here P, Q, and R are all verified, so this assertion translates as P and Q and R. Recall that and is associative, so (P and Q) and R is equivalent to P and (Q and R). (c) Here we have a clear implication, and a causal one too! What the assertion says, is that if you get an A in the class, it means that you had gotten an A in the final: the translation in mathematical language is then R implies P, or equivalently, but more menacingly, P or not(r). (d) In this case, P is true, Q is false, and R is true: the assertion translates as P and not(q) and R. At the end of the exercise, observe how, in mathematical language, but and nevertheless mean the same as and. The differences in tone of the three words are lost in translation. Problem 3.5. Sloppy Sam is trying to prove a certain proposition P. He defines two related propositions Q and R, and then proceeds to prove three implications: He then reasons as follows: P implies Q, Q implies R, R implies P. If Q is true, then since I proved Q implies R, I can conclude that R is true. Now, since I proved R implies P, I can conclude that P is true. Similarly, if R is true, then P is true and so Q is true. Likewise, if P is true, then so are Q and R. So any way you look at it, all three of P, Q and R are true. (a) Exhibit truth tables for and for (P implies Q) and (Q implies R) and (R implies P ) (1) P and Q and R. (2) Use these tables to find a truth assignment for P, Q, R so that (1) is T and (2) is F. 2

3 (b) You show these truth tables to Sloppy Sam and he says OK, I m wrong that P, Q and R all have to be true, but I still don t see the mistake in my reasoning. Can you help me understand my mistake? How would you explain to Sammy where the flaw lies in his reasoning? Solution. (a) We first construct the truth table for P and Q and R, as it is almost immediate: For the formula P Q R P and Q and R T T T T T T F F T F T F T F F F F T T F F T F F F F T F F F F F S = (P implies Q) and (Q implies R) and (R implies P ) we proceed in two steps: first, we construct the truth values for each of the implications; then, we compute those for their conjunction. P Q R P implies Q Q implies R R implies P S T T T T T T T T T F T F T F T F T F T T F T F F F T T F F T T T T F F F T F T F T F F F T T T F F F F F T T T T We then see that, if P, Q and R are all F, then (1) is T and (2) is F. (b) Sam is tacitly assuming that some of P, Q and R are true. But why should it be so? His application of the proof-by-cases method is sloppy: the case of P, Q, and R all false was not covered by the others, and should have been considered separately. All Sam has proved is that they are equivalent: 3

4 either they all all true, or all false. To check which is the case, he must find a proof or disproof of any of the three, but at least one of them, which does not depend on the others, but only on other things which he knows, not just assumes, to be true. Problems for Section 3.3 Problem Indicate whether each of the following propositional formulas is valid (V), satisfiable but not valid (S), or not satisfiable (N). For the satisfiable ones, indicate a satisfying truth assignment. M implies Q M implies (P or Q) M implies (M and (P implies M)) (P or Q) implies Q (P or Q) implies (P and Q) (P or Q) implies (M and (P implies M)) (P xor Q) implies Q (P xor Q) implies (P or Q) (P xor Q) implies (M and (P implies M)) Solution. Let s check one by one: S. M implies Q is T as soon as M is F, but is F if M is T and Q is F. S. M implies (P or Q) is T as soon as M is F, but is F if M, P and Q are all T. V. M implies (M and (P implies M)) is valid. If M is F, then M implies (M and (P implies M)) is T; if M is T, then so is P implies M, and so is M and (P implies M). S. (P or Q) implies Q is T if Q is T, but F if P is T and Q is F. S. (P or Q) implies (P or Q) is T if P and Q are both F, but F if they are both T. 4

5 S. (P or Q) implies (M and (P implies M)) is T if P and Q are both F, but F if they are both T and M is F. S. (P xor Q) implies Q is T if P and Q are both T, but F if P is T and Q is F. V. (P or Q) implies (P or Q) is valid. If P and Q are both T or both F, then the implication from F is T; if one is T and the other is F, then one of P and Q is T, and the implication to T is T. S. (P xor Q) implies (M and (P implies M)) is T if P and Q are both F, but F if P is T and Q and M are both F. Problem This problem examines whether the following specifications are satisfiable: 1. If the file system is not locked, then (a) new messages will be queued. (b) new messages will be sent to the messages buffer. (c) the system is functioning normally, and conversely, if the system is functioning normally, then the file system is not locked. 2. If new messages are not queued, then they will be sent to the messages buffer. 3. New messages will not be sent to the message buffer. (a) Begin by translating the five specifications into propositional formulas using four propositional variables: L ::= file system locked, Q ::= new messages are queued, B ::= new messages are sent to the message buffer, N ::= system functioning normally. 5

6 (b) Demonstrate that this set of specifications is satisfiable by describing a single truth assignment for the variables L, Q, B, N and verifying that under this assignment, all the specifications are true. (c) Argue that the assignment determined in part () is the only one that does the job. Solution. (a) Let us rewrite the three specifications as three Boolean formulas α, β and γ: 1. α ::= (not(l) implies (Q and B and N)) and (N implies not(l)). 2. β ::= not(q) implies B. 3. γ ::= not(b). (b) We must find a truth assignment to L, Q, B and N that makes each of α, β and γ take value T. We immediately observe that γ = T if and only if B = F. In this case, for β to be T it must be not(q) = F, hence Q = T. Now, to have α = T, we must have both and not(l) implies (Q and B and N) = T N implies not(l) = T. But the conjunction in the right-hand side of the implication in the first formula is F, because so is B: we must then have not(l) = F, that is, L = T. Then the second formula can only be T if N = F. We then have that the specification is verified if, and only if: 1. the system is locked, 2. new messages are queued, 3. new messages are not sent to the message buffer, and 4. the system does not function normally. (c) Think of our proof of satisfiability as a game where we win if we reach an assignment of truth values which makes all the specifications true, and lose if we make a truth value assignment which makes some specification 6

7 false. Then our first move was forced; our second move was forced, given our first move; and our third move was forced, given the previous two. We had no other way to win the game, so the assignment we obtained was the only winning position, and the only way to satisfy all the specifications. Note that the text of the exercise as reported in the book is imprecise. With that formulation, α becomes: not(l) implies (Q and B and N and (N implies not(l))) But this formula is not equivalent to (not(l) implies (Q and B and N)) and (N implies not(l)), because the former is satisfied with L = Q = T and B = F regardless of the value of N. Problems for Section 3.4 Problem A half dozen different operators may appear in propositional formulas, but just and, or, and not are enough to do the job. That is because each of the operators is equivalent to a simple formula using only these three operators. For example, A implies B is equivalent to not(a) or B. So all occurences of implies in a formula can be replaced using just not and or. (a) Write formulas using only and, or, not() that are equivalent to each of A iff B and xor B. Conclude that every propositional formula is equivalent to an and - or -not formula. (b) Explain why you don t even need and. (c) Explain how to get by with the single operator nand where A nand B is equivalent by definition to not(a and B). Solution. (a) A iff B is equivalent to: while A xor B is equivalent to: (A and B) or (not(a) and not(b)), (A or B) and (not(a) or not(b)). 7

8 Observe how we arrived from the formula for iff to the one for xor by swapping the roles of and and or : this is not a case, as A xor B is equivalent to not(a iff B). (b) That we don t even need and follows from de Morgan s law: not(a and B) not(a) or not(b), which, together with the double negation rule, gives: A and B not(not(a) or not(b)). (c) Because of the previous points, it is sufficient to show that not() and or can be reconstructed by only using nand. One part is easy: not(a) A nand A. For the second one, we use de Morgan s law together with double negation: A or B not(not(a) and not(b)) not(a) nand not(b) (A nand A) nand (B nand B). Problem 3.19(a). Let P be the proposition depending on the propositional variables A, B, C, D whose truth table is: A B C D P T T T T T T T T F F T T F T T T T F F F T F T T T T F T F T T F F T T T F F F T A B C D P F T T T T F T T F F F T F T T F T F F F F F T T F F F T F F F F F T T F F F F T Write out a disjunctive normal form for P. 8

9 Solution. We isolate the rows of the truth table where P is true: A B C D P T T T T T T T F T T T F T T T T F T F T T F F T T T F F F T F T T T T F T F T T F F F T T F F F F T Then, we convert each T/F sequence into a conjunction of variables and their negations, according to the rule seen in class: A B C D conjunction T T T T A B C D T T F T A B C D T F T T A B C D T F T F A B C D T F F T A B C D T F F F A B C D F T T T A B C D F T F T A B C D F F F T A B C D F F F F A B C D Finally, we construct the disjunctive normal form as a disjunction of all those 9

10 conjunctions: P (A B C D) Problems for Section 3.6 Problem For each of the following propositions: 1. x. y. 2x y = 0 2. x. y. x 2y = 0 3. x. (x < 10 implies ( y. (y < x implies y < 9))) 4. x. y. (y > x z. y + z = 100) determine which propositions are true when the variables range over: (a) the nonnegative integers, (b) the integers, (c) the real numbers. Solution. (a) If the variables are nonnegative integers: 1. is true, because however given x, we can choose y = 2x. 10

11 2. is false, because for x = 1 the difference 1 2y is odd for every integer y, and cannot be zero. 3. is true, because if m and n are any two integers, then m < n if and only if m n is false, because if we choose x = 101, y > x, and z any nonnegative integer, then y + z > 100. (b) If the variables are integers: 1. is true, because however given x, we can choose y = 2x. 2. is false, because for x = 1 the difference 1 2y is odd for every integer y, and cannot be zero. 3. is true, because if m and n are any two integers, then m < n if and only if m n is true, because however we choose x and y > x, we can always set z = 100 y, which is integer if y is. (c) If the variables are real numbers: 1. is true, because however given x, we can choose y = 2x. 2. is true, because however given x, we can choose y = x/2. 3. is false, because for x = 9.75 we can take y = 9.5, which is smaller than x but larger than is true, because however we choose x and y > x, we can always set z = 100 y. Countermodels Definition. A countermodel for a predicate formula P is an environment for its variables, together with an interpretation of P within that environment, which makes P false. 11

12 For example, the formula: x. y. P (x, y) has a countermodel where the environment is the set of the natural numbers, and P (x, y) ::= x > y. Then the formula becomes: x N. y N. x > y, which is false, because for x = 0 there is no y N such that 0 > y. Problem Find a counter-model showing the following is not valid. x. P (x) implies x. P (x) (Just define your counter-model. You do not need to verify that it is correct.) Solution. Recall that quantifiers bind stronger than propositional connectives: therefore, the formula means ( x. P (x)) implies ( x. P (x)). Consider a situation where: the variables range over the nonnegative integers, and P (x) ::= x = 17. Then indeed there exists a nonnegative integer which is 17, but there is also a nonnegative integer which is not 17. Problem Find a counter-model showing the following is not valid. ( x. P (x) and x. Q(x)) implies x. (P (x) and Q(x)) (Just define your counter-model. You do not need to verify that it is correct.) Solution. We can recycle the solution of Problem 3.25: the variables range over the nonnegative integers, 12

13 P (x) ::= x = 17, and Q(x) ::= x = 16. Then the antecedent of the implication is true, because we can substitute x = 17 in the left-hand side of the and and x = 16 in the right-hand side. But the consequent is false, because no nonnegative integer is equal to both 17 and 16. Problem 3.28 (tweaked). (a) Verify that the propositional formula is valid. (P implies Q) or (Q implies P ) (b) The valid formula of part (a) leads to sound proof method: to prove that an implication is true, just prove that its converse is false. 1 For example, from middle school arithmetics we know that the assertion If an integer is not prime, then it is negative is false (4 is not prime, and positive). This allows us to reach at the correct conclusion that its converse, If an integer is negative, then it is not prime is true, as indeed it is (prime numbers are all larger than 1). But wait a minute! The implication If an integer is prime, then it is negative is completely false. So we could conclude that its converse If an integer is negative, then it is prime 1 This problem was stimulated by the discussion of the fallacy in J. Beam, A Powerful Method of Non-Proof, The College Mathematics Journal 48(1),

14 should be true, but in fact the converse is also completely false. So something has gone wrong here. Explain what. Solution. (a) This is easily done via truth table: P Q (P implies Q) or (Q implies P ) T T T T T T F F T T F T T T F F F T T T Alternatively: if P implies Q is true, then the formula is true; if P implies Q is false, then P is true and Q is false, which makes Q implies P true, and the formula true as well. (b) The formula which we proved valid is a propositional formula: it is true whenever P and Q have a definite truth value. This allows us to conclude, for example, that x. [(P (x) implies Q(x)) or (Q(x) implies P (x))] (3) is valid: as soon as the value of x is chosen, so are the truth values of P (x) and Q(x), and whatever those are, the proposition in square brackets is true. However, If an integer is prime, then it is negative is not a propositional formula: it is a predicate formula, which is correctly translated into predicate logic as x Z. (isprime(x) implies x < 0). (Z, which comes from the German word Zahlen, meaning numbers, is the standard notation for the set of integer numbers.) Now, when we start from the falsity of to prove If an integer is prime, then it is negative If an integer is negative, then it is prime 14

15 we are not applying (3), but a different formula: x. (P (x) implies Q(x)) or x. (Q(x) implies P (x)) (4) where we are giving to P (x) the meaning x is prime and to Q(x) the meaning x is negative. But the formula (4) is not valid in predicate logic, and our interpretation with being negative and being prime in the context of integer numbers is precisely a counter-model to it! We can also consider the counter-model of Problem 3.26: 1. for x = 17 we have P (17) true and Q(17) false, so x. (P (x) implies Q(x)) is false in this model; 2. for x = 16 we have Q(16) true and P (17) false, so x. (Q(x) implies P (x)) is also false in this model. 15

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Typeset September 23, 2005 1 Statements or propositions Defn: A statement is an assertion

More information

1.1 Language and Logic

1.1 Language and Logic c Oksana Shatalov, Fall 2017 1 1.1 Language and Logic Mathematical Statements DEFINITION 1. A proposition is any declarative sentence (i.e. it has both a subject and a verb) that is either true or false,

More information

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

Chapter 1: The Logic of Compound Statements. January 7, 2008 Chapter 1: The Logic of Compound Statements January 7, 2008 Outline 1 1.1 Logical Form and Logical Equivalence 2 1.2 Conditional Statements 3 1.3 Valid and Invalid Arguments Central notion of deductive

More information

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science Fall 2018 Assignment 1. Solutions 1. For each of the following statements use a truth table to determine whether

More information

Logic, Sets, and Proofs

Logic, Sets, and Proofs Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Operators. A logical statement is a mathematical statement that can be assigned a value either true or false.

More information

Topic 1: Propositional logic

Topic 1: Propositional logic Topic 1: Propositional logic Guy McCusker 1 1 University of Bath Logic! This lecture is about the simplest kind of mathematical logic: propositional calculus. We discuss propositions, which are statements

More information

1.1 Language and Logic

1.1 Language and Logic c Oksana Shatalov, Spring 2018 1 1.1 Language and Logic Mathematical Statements DEFINITION 1. A proposition is any declarative sentence (i.e. it has both a subject and a verb) that is either true or false,

More information

Chapter 4: Classical Propositional Semantics

Chapter 4: Classical Propositional Semantics Chapter 4: Classical Propositional Semantics Language : L {,,, }. Classical Semantics assumptions: TWO VALUES: there are only two logical values: truth (T) and false (F), and EXTENSIONALITY: the logical

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the definitions and reasoning we use in our proofs? Where We're Going Propositional Logic (oday) Basic logical connectives. ruth tables. Logical

More information

EECS 1028 M: Discrete Mathematics for Engineers

EECS 1028 M: Discrete Mathematics for Engineers EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 12 Using the laws

More information

8. Reductio ad absurdum

8. Reductio ad absurdum 8. Reductio ad absurdum 8.1 A historical example In his book, The Two New Sciences, 10 Galileo Galilea (1564-1642) gives several arguments meant to demonstrate that there can be no such thing as actual

More information

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional Class XI Mathematics Ch. 14 Mathematical Reasoning 1. Statement: A sentence which is either TRUE or FALSE but not both is known as a statement. eg. i) 2 + 2 = 4 ( it is a statement which is true) ii) 2

More information

Solutions to Sample Problems for Midterm

Solutions to Sample Problems for Midterm Solutions to Sample Problems for Midterm Problem 1. The dual of a proposition is defined for which contains only,,. It is For a compound proposition that only uses,, as operators, we obtained the dual

More information

Discrete Mathematics Recitation Course 張玟翔

Discrete Mathematics Recitation Course 張玟翔 Discrete Mathematics Recitation Course 1 2013.03.07 張玟翔 Acknowledge 鄭安哲 TA 2012 About Myself English Name : Zak Chinese Name : 張玟翔 Mail:o0000032@yahoo.com.tw Lab: ED612 1-1 Propositional Logic 1-1 Ex.2

More information

Propositional Logic Not Enough

Propositional Logic Not Enough Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks

More information

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

A statement is a sentence that is definitely either true or false but not both. 5 Logic In this part of the course we consider logic. Logic is used in many places in computer science including digital circuit design, relational databases, automata theory and computability, and artificial

More information

Compound Propositions

Compound Propositions Discrete Structures Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not 2. And 3. Or 4. Exclusive or 5. Implication 6. Biconditional Truth

More information

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3. CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS SECTION 3.1 Predicates and Quantified Statements I Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. Predicates

More information

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics

More information

Math 10850, fall 2017, University of Notre Dame

Math 10850, fall 2017, University of Notre Dame Math 10850, fall 2017, University of Notre Dame Notes on first exam September 22, 2017 The key facts The first midterm will be on Thursday, September 28, 6.15pm-7.45pm in Hayes-Healy 127. What you need

More information

CITS2211 Discrete Structures Proofs

CITS2211 Discrete Structures Proofs CITS2211 Discrete Structures Proofs Unit coordinator: Rachel Cardell-Oliver August 13, 2017 Highlights 1 Arguments vs Proofs. 2 Proof strategies 3 Famous proofs Reading Chapter 1: What is a proof? Mathematics

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition

More information

1.1 Statements and Compound Statements

1.1 Statements and Compound Statements Chapter 1 Propositional Logic 1.1 Statements and Compound Statements A statement or proposition is an assertion which is either true or false, though you may not know which. That is, a statement is something

More information

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 1

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 1 CS 70 Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 1 1 A Brief Introduction Welcome to Discrete Math and Probability Theory! You might be wondering what you ve gotten yourself

More information

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

2. The Logic of Compound Statements Summary. Aaron Tan August 2017 2. The Logic of Compound Statements Summary Aaron Tan 21 25 August 2017 1 2. The Logic of Compound Statements 2.1 Logical Form and Logical Equivalence Statements; Compound Statements; Statement Form (Propositional

More information

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives Logic Logic is study of abstract reasoning, specifically, concerned with whether reasoning is correct. Logic focuses on relationship among statements as opposed to the content of any particular statement.

More information

Logic. Propositional Logic: Syntax

Logic. Propositional Logic: Syntax Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

More information

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Why Learning Logic? Logic. Propositional Logic. Compound Propositions Logic Objectives Propositions and compound propositions Negation, conjunction, disjunction, and exclusive or Implication and biconditional Logic equivalence and satisfiability Application of propositional

More information

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

More information

MAT2345 Discrete Math

MAT2345 Discrete Math Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview

More information

Propositional Logic. Spring Propositional Logic Spring / 32

Propositional Logic. Spring Propositional Logic Spring / 32 Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32 Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements

More information

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

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall CSE 20 HW1 graded review form? HW2 released DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Translate sentences from English to propositional logic using appropriate

More information

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

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary Propositional Logic The Language of Propositions Applications Logical Equivalences Predicate Logic The Language of

More information

Supplementary exercises in propositional logic

Supplementary exercises in propositional logic Supplementary exercises in propositional logic The purpose of these exercises is to train your ability to manipulate and analyze logical formulas. Familiarize yourself with chapter 7.3-7.5 in the course

More information

Solutions to Problem Set 1

Solutions to Problem Set 1 Massachusetts Institute of Technology 6.042J/18.062J, Fall 05: Mathematics for Computer Science September 21 Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld revised September 21, 2005, 1076 minutes Problem

More information

8. Reductio ad absurdum

8. Reductio ad absurdum 8. Reductio ad absurdum 8.1 A historical example In his book, The Two New Sciences, Galileo Galilea (1564-1642) gives several arguments meant to demonstrate that there can be no such thing as actual infinities

More information

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

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary! Propositional Logic! The Language of Propositions! Applications! Logical Equivalences! Predicate Logic! The Language

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the defnitions and reasoning we use in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical

More information

Philosophy 220. Truth-Functional Equivalence and Consistency

Philosophy 220. Truth-Functional Equivalence and Consistency Philosophy 220 Truth-Functional Equivalence and Consistency Review Logical equivalency: The members of a pair of sentences [of natural language] are logically equivalent if and only if it is not [logically]

More information

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes Packet #2: Set Theory & Predicate Calculus Applied Discrete Mathematics Table of Contents Full Adder Information Page 1 Predicate Calculus

More information

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

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares

More information

EECS 1028 M: Discrete Mathematics for Engineers

EECS 1028 M: Discrete Mathematics for Engineers EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 26 Why Study Logic?

More information

University of California, San Diego Department of Computer Science and Engineering CSE 20. Solutions to Midterm Exam Winter 2018

University of California, San Diego Department of Computer Science and Engineering CSE 20. Solutions to Midterm Exam Winter 2018 University of California, San Diego Department of Computer Science and Engineering CSE 20 Solutions to Midterm Exam Winter 2018 Problem 1 (30 points) a. The boolean function f(p, q) = (q p) ( q p) is specified

More information

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

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning. 3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on

More information

Section 1.1: Logical Form and Logical Equivalence

Section 1.1: Logical Form and Logical Equivalence Section 1.1: Logical Form and Logical Equivalence An argument is a sequence of statements aimed at demonstrating the truth of an assertion. The assertion at the end of an argument is called the conclusion,

More information

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional Logical Operators Conjunction Disjunction Negation Exclusive Or Implication Biconditional 1 Statement meaning p q p implies q if p, then q if p, q when p, q whenever p, q q if p q when p q whenever p p

More information

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as: 3.4 THE CONDITIONAL & BICONDITIONAL Definition. Any statement that can be put in the form If p, then q, where p and q are basic statements, is called a conditional statement and is written symbolically

More information

3 The Semantics of the Propositional Calculus

3 The Semantics of the Propositional Calculus 3 The Semantics of the Propositional Calculus 1. Interpretations Formulas of the propositional calculus express statement forms. In chapter two, we gave informal descriptions of the meanings of the logical

More information

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~ MAT 101 Solutions Exam 2 (Logic, Part I) Multiple-Choice Questions 1. D Because this sentence contains exactly ten words, it is stating that it is false. But if it is taken to be false, then it has to

More information

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory Proof Theorems Part 4 The Big Bang Theory Theorems A theorem is a statement we intend to prove using existing known facts (called axioms or lemmas) Used extensively in all mathematical proofs which should

More information

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.

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. Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination III (Spring 2007) Problem 1: Suppose A, B, C and D are finite sets

More information

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications: Tools for reasoning: Logic Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications: 1 Why study propositional logic? A formal mathematical language for precise

More information

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction Introduction I Proofs Computer Science & Engineering 235 Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu A proof is a proof. What kind of a proof? It s a proof. A proof is a proof. And when

More information

Propositional Logic. Fall () Propositional Logic Fall / 30

Propositional Logic. Fall () Propositional Logic Fall / 30 Propositional Logic Fall 2013 () Propositional Logic Fall 2013 1 / 30 1 Introduction Learning Outcomes for this Presentation 2 Definitions Statements Logical connectives Interpretations, contexts,... Logically

More information

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

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical

More information

Section 3.1: Direct Proof and Counterexample 1

Section 3.1: Direct Proof and Counterexample 1 Section 3.1: Direct Proof and Counterexample 1 In this chapter, we introduce the notion of proof in mathematics. A mathematical proof is valid logical argument in mathematics which shows that a given conclusion

More information

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

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

More information

Chapter 1, Section 1.1 Propositional Logic

Chapter 1, Section 1.1 Propositional Logic Discrete Structures Chapter 1, Section 1.1 Propositional Logic These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6 th ed., by Kenneth H. Rosen, published

More information

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

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook) Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or

More information

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

For all For every For each For any There exists at least one There exists There is Some Section 1.3 Predicates and Quantifiers Assume universe of discourse is all the people who are participating in this course. Also let us assume that we know each person in the course. Consider the following

More information

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007 Proofs Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Fall 2007 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.5, 1.6, and 1.7 of Rosen cse235@cse.unl.edu

More information

Recall that the expression x > 3 is not a proposition. Why?

Recall that the expression x > 3 is not a proposition. Why? Predicates and Quantifiers Predicates and Quantifiers 1 Recall that the expression x > 3 is not a proposition. Why? Notation: We will use the propositional function notation to denote the expression "

More information

Chapter 1 Elementary Logic

Chapter 1 Elementary Logic 2017-2018 Chapter 1 Elementary Logic The study of logic is the study of the principles and methods used in distinguishing valid arguments from those that are not valid. The aim of this chapter is to help

More information

Topics in Logic and Proofs

Topics in Logic and Proofs Chapter 2 Topics in Logic and Proofs Some mathematical statements carry a logical value of being true or false, while some do not. For example, the statement 4 + 5 = 9 is true, whereas the statement 2

More information

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday. Logic and Proof Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement is called the conclusion. An argument is valid

More information

MA103 STATEMENTS, PROOF, LOGIC

MA103 STATEMENTS, PROOF, LOGIC MA103 STATEMENTS, PROOF, LOGIC Abstract Mathematics is about making precise mathematical statements and establishing, by proof or disproof, whether these statements are true or false. We start by looking

More information

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false. Section 1.2 Propositional Equivalences A tautology is a proposition which is always true. Classic Example: P P A contradiction is a proposition which is always false. Classic Example: P P A contingency

More information

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1) CS100: DISCREE SRUCURES Lecture 5: Logic (Ch1) Lecture Overview 2 Statement Logical Connectives Conjunction Disjunction Propositions Conditional Bio-conditional Converse Inverse Contrapositive Laws of

More information

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.

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. Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

Logic. Readings: Coppock and Champollion textbook draft, Ch

Logic. Readings: Coppock and Champollion textbook draft, Ch Logic Readings: Coppock and Champollion textbook draft, Ch. 3.1 3 1. Propositional logic Propositional logic (a.k.a propositional calculus) is concerned with complex propositions built from simple propositions

More information

Propositional Logic 1

Propositional Logic 1 Propositional Logic 1 Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth Tables 2 Propositions A proposition is

More information

Chapter 2: The Logic of Quantified Statements. January 22, 2010

Chapter 2: The Logic of Quantified Statements. January 22, 2010 Chapter 2: The Logic of Quantified Statements January 22, 2010 Outline 1 2.1- Introduction to Predicates and Quantified Statements I 2 2.2 - Introduction to Predicates and Quantified Statements II 3 2.3

More information

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional. Review Propositional Logic Propositions atomic and compound Operators: negation, and, or, xor, implies, biconditional Truth tables A closer look at implies Translating from/ to English Converse, inverse,

More information

Mathematical Reasoning. The Foundation of Algorithmics

Mathematical Reasoning. The Foundation of Algorithmics Mathematical Reasoning The Foundation of Algorithmics The Nature of Truth In mathematics, we deal with statements that are True or False This is known as The Law of the Excluded Middle Despite the fact

More information

Propositional Logic and Semantics

Propositional Logic and Semantics Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no

More information

Announcements CompSci 102 Discrete Math for Computer Science

Announcements CompSci 102 Discrete Math for Computer Science Announcements CompSci 102 Discrete Math for Computer Science Read for next time Chap. 1.4-1.6 Recitation 1 is tomorrow Homework will be posted by Friday January 19, 2012 Today more logic Prof. Rodger Most

More information

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman. Math 299 Homework Assignment, Chapter 2 Section 2.1 2.A (not in the text) Which of the following are statements? Explain. 1. Let x be a positive integer. Then x is rational. 2. Mathematics is fun. 3. The

More information

Logic. Propositional Logic: Syntax. Wffs

Logic. Propositional Logic: Syntax. Wffs Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

More information

1 Predicates and Quantifiers

1 Predicates and Quantifiers 1 Predicates and Quantifiers We have seen how to represent properties of objects. For example, B(x) may represent that x is a student at Bryn Mawr College. Here B stands for is a student at Bryn Mawr College

More information

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier Section 1.4 Section Summary Predicate logic Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Propositional Logic

More information

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology 1 Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta datta@cs.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/1019

More information

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes These notes form a brief summary of what has been covered during the lectures. All the definitions must be memorized and understood. Statements

More information

Logic and Boolean algebra

Logic and Boolean algebra Computer Mathematics Week 7 Logic and Boolean algebra College of Information Science and Engineering Ritsumeikan University last week coding theory channel coding information theory concept Hamming distance

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1 EECS 70 Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1 Getting Started In order to be fluent in mathematical statements, you need to understand the basic framework of the language

More information

Predicate logic. Predicates and Boolean Expressions. V =100 I expresses a relationship between quantities identified

Predicate logic. Predicates and Boolean Expressions. V =100 I expresses a relationship between quantities identified Predicate logic (Reading Gossett Section 2.6) Predicates and Boolean Expressions Recall that a statement or proposition is an assertion thatmaybelabelledtrueorfalse And that statements may depend on one

More information

2 Conditional and Biconditional Propositions

2 Conditional and Biconditional Propositions 18 FUNDAMENTALS OF MATHEMATICAL LOGIC 2 Conditional and Biconditional Propositions Let p and q be propositions. The implication p! q is the proposition that is false only when p is true and q is false;

More information

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures Chapter 2 Section 2.1: Proofs Proof Techniques CS 130 Discrete Structures Some Terminologies Axioms: Statements that are always true. Example: Given two distinct points, there is exactly one line that

More information

Logic and Sets. Chapter 1

Logic and Sets. Chapter 1 Chapter 1 Logic and Sets 1.1. Logical connectives 1.1.1. Unambiguous statements. Logic is concerned first of all with the logical structure of statements, and with the construction of complex statements

More information

Lecture 4: Proposition, Connectives and Truth Tables

Lecture 4: Proposition, Connectives and Truth Tables Discrete Mathematics (II) Spring 2017 Lecture 4: Proposition, Connectives and Truth Tables Lecturer: Yi Li 1 Overview In last lecture, we give a brief introduction to mathematical logic and then redefine

More information

MAT 243 Test 1 SOLUTIONS, FORM A

MAT 243 Test 1 SOLUTIONS, FORM A t MAT 243 Test 1 SOLUTIONS, FORM A 1. [10 points] Rewrite the statement below in positive form (i.e., so that all negation symbols immediately precede a predicate). ( x IR)( y IR)((T (x, y) Q(x, y)) R(x,

More information

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University COMP 182 Algorithmic Thinking Proofs Luay Nakhleh Computer Science Rice University 1 Reading Material Chapter 1, Section 3, 6, 7, 8 Propositional Equivalences The compound propositions p and q are called

More information

Proofs. Chapter 2 P P Q Q

Proofs. Chapter 2 P P Q Q Chapter Proofs In this chapter we develop three methods for proving a statement. To start let s suppose the statement is of the form P Q or if P, then Q. Direct: This method typically starts with P. Then,

More information

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic Discrete Mathematical Structures Chapter 1 he oundation: Logic 1 Lecture Overview 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Quantifiers l l l l l Statement Logical Connectives Conjunction

More information

Propositional Logic: Syntax

Propositional Logic: Syntax Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic

More information

A Little Deductive Logic

A Little Deductive Logic A Little Deductive Logic In propositional or sentential deductive logic, we begin by specifying that we will use capital letters (like A, B, C, D, and so on) to stand in for sentences, and we assume that

More information

The Foundations: Logic and Proofs. Part I

The Foundations: Logic and Proofs. Part I The Foundations: Logic and Proofs Part I Chapter Summary Propositional Logic n The Language of Propositions n Applications n Logical Equivalences Predicate Logic n The Language of Quantifiers n Logical

More information

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876

More information

Today s Lecture 2/9/10. Symbolizations continued Chapter 7.2: Truth conditions for our logical operators

Today s Lecture 2/9/10. Symbolizations continued Chapter 7.2: Truth conditions for our logical operators Today s Lecture 2/9/10 Symbolizations continued Chapter 7.2: Truth conditions for our logical operators Announcements Exam #1 next Tuesday (Feb 16th)! HW: Study for exam The text book is on Library Reserve

More information

CSC Discrete Math I, Spring Propositional Logic

CSC Discrete Math I, Spring Propositional Logic CSC 125 - Discrete Math I, Spring 2017 Propositional Logic Propositions A proposition is a declarative sentence that is either true or false Propositional Variables A propositional variable (p, q, r, s,...)

More information