ECOM Discrete Mathematics

Size: px
Start display at page:

Download "ECOM Discrete Mathematics"

Transcription

1 ECOM Discrete Mathematics Chapter # 1 : The Foundations: Logic and Proofs Fall, 2013/2014 ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 1 / 85

2 Outline 1 Propositional Logic 2 Propositional Equivalences 3 Predicates and Quantifiers 4 Nested Quantifiers 5 Rules of Inference 6 Introduction to Proofs 7 Proof Methods and Strategy ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 2 / 85

3 Propositional Logic Motivations For every positive integer n, the sum of the positive integers not exceeding n is n(n + 1)/2. Mathematical Statement + Proof = Theorem Proofs are important throughout mathematics, but how important proofs are in computer science?. Verify that computer programs produce the correct output for all possible input values. Show that algorithms always produce the correct result. Establish the security of a system. What we are going to learn in this chapter? Introduce tools to construct a correct mathematical arguments. Develop different proof methods that will enable us to prove many different types of results. Introduce several strategies for constructing proofs. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 3 / 85

4 A proposition Propositional Logic Introduction a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. All the following declarative sentences are propositions. G comes after F in the English alphabetic. Toronto is the capital of Canada = = 3. Propositions 1 and 3 are true, whereas 2 and 4 are false. Consider the following sentences: What time is it?, Read this carefully. I hope I can get above 90 in discrete mathematics. x + 1 = 2. Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentence 3 is not proposition because it is neither true nor false. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 4 / 85

5 Propositional Logic Introduction Is it a proposition? Hello, How are you?. We can eat rocks. Ahmad taller than Ali. He is a good student. Please wakeup. 15 * Z >= 30. NO YES YES NO NO NO ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 5 / 85

6 Propositional Logic Introduction We use letters to denote propositional variables (or statement variables). The conventional letters used for propositional variables are p, q, r, s,.... The truth value of a proposition is true, denoted by T, if it is a true proposition, and the truth value of a proposition is false, denoted by F, if it is a false proposition. DEFINITION Let p be a proposition. The negation of p, denoted by p (also denoted by p), is the statement It is not the case that p. The proposition p is read not p. The truth value of the negation of p, p, is the opposite of the truth value of p. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 6 / 85

7 Propositional Logic Introduction Ex. Find the negation of the proposition Michaels PC runs Linux and express this in simple English. Solution: The negation is It is not the case that Michaels PC runs Linux. This negation can be more simply expressed as Michaels PC does not run Linux. Ex. Find the negation of the proposition Jessica s smartphone has at least 32GB of memory and express this in simple English. Solution: The negation is It is not the case that Jessica s smartphone has at least 32GB of memory. This negation can also be expressed as Jessica s smartphone does not have at least 32GB of memory or even more simply as Jessica s smartphone has less than 32GB of memory. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 7 / 85

8 Propositional Logic Introduction The truth table for the negation of a proposition p. Connectives The logical operators that are used to form new propositions from two or more existing propositions. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 8 / 85

9 Propositional Logic Compound Propositions Conjunction Let p and q be propositions. The conjunction of p and q, denoted by p q, is the proposition of p and q. The conjunction p q is true when both p and q are true and is false otherwise. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 9 / 85

10 Propositional Logic Compound Propositions Example: Find the conjunction of the propositions p and q where p is the proposition Rebeccas PC has more than 16 GB free hard disk space and q is the proposition The processor in Rebeccas PC runs faster than 1 GHz. The conjunction of these propositions, p q, is the proposition Rebecca s PC has more than 16 GB free hard disk space, and the processor in Rebecca s PC runs faster than 1 GHz. This conjunction can be expressed more simply as Rebecca s PC has more than 16 GB free hard disk space, and its processor runs faster than 1 GHz. For this conjunction to be true, both conditions given must be true. It is false, when one or both of these conditions are false. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 10 / 85

11 Propositional Logic Compound Propositions Disjunction Let p and q be propositions. The disjunction of p and q, denoted by p q, is the proposition of p or q. The disjunction p q is false when both p and q are false and is true otherwise. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 11 / 85

12 Propositional Logic Compound Propositions Exclusive or Let p and q be propositions. The exclusive or of p and q, denoted by p q, is the proposition that is true when exactly one of p and q is true and is false otherwise. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 12 / 85

13 Propositional Logic Compound Propositions Example: If the proportions p and q are: Students who have taken calculus can take this course and Students who have taken computer science can take this course, what is the difference between the connection using inclusive and exclusive or? Inclusive or: Students who have taken calculus or computer science can take this class. Here we mean that students who have taken both calculus and computer science can take the class, as well as the students who have taken only one of the two subjects. Exclusive or: Students who have taken calculus or computer science, but not both, can enroll in this class. Here, we mean that students who have taken both calculus and a computer science course cannot take the class. Only those who have taken exactly one of the two courses can take the class. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 13 / 85

14 Propositional Logic Conditional Statements Conditional Statement Let p and q be propositions. The conditional statement p q is the proposition if p, then q. The conditional statement p q is false when p is true and q is false, and true otherwise. In the conditional statement p q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). If I am elected, then I will lower taxes. If you get 100% on the final, then you will get an excellent. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 14 / 85

15 Propositional Logic Conditional Statements A variety of terminology is used to express p q. You will encounter most if not all of the following ways to express this conditional statement: ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 15 / 85

16 Propositional Logic Conditional Statements Example: If the proportions p and q are: Ali studies discrete mathematics and Ali will get a good grade. Express the statement p q as a statement in English using if p, then q, q when p and q unless p. If Ali studies discrete mathematics, then he will get a good grade.. Ali will get a good grade when he studies discrete mathematics. Ali will get a good grade unless he does not study discrete mathematics ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 16 / 85

17 Propositional Logic Conditional Statements There are three related conditional statements that occur so often that they have special names: The converse of p q is the preposition q p. The contrapositive of p q is the preposition q p. The inverse of p q is the preposition p q. Only the contrapositive always has the same truth value as p q. The converse and the inverse of a conditional statement are also equivalent [check that], but neither is equivalent to the original conditional statement. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 17 / 85

18 Propositional Logic Conditional Statements Example: What are the contrapositive, the converse, and the inverse of the conditional statement The home team wins whenever it is raining?. Because q whenever p is one of the ways to express the conditional statement p q, the original statement can be rewritten as If it is raining, then the home team wins. Consequently, The contrapositive is: If the home team does not win, then it is not raining. The converse is: If the home team wins, then it is raining. The inverse is: If it is not raining, then the home team does not win. Only the contrapositive is equivalent to the original statement. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 18 / 85

19 Propositional Logic Biconditional Statements Biconditional Statement Let p and q be propositions. The biconditional statement p q is the proposition p if and only if q. The biconditional statement p q is true when p and q have the same truth values, and is false otherwise. Biconditional statements are also called bi-implications. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 19 / 85

20 Propositional Logic Biconditional Statements The statement p q is true when both the conditional statements p q and q p are true and is false otherwise. There are some other common ways to express p q: p is necessary and sufficient for q, if p then q, and conversely and p iff q. As we will take later, you will find that p q has exactly the same truth table as (p q) (q p). Example: Let p be the statement You can take the flight and let q be the statement You buy a ticket. Then p q is the statement You can take the flight if and only if you buy a ticket. This statement is true if p and q are either both true or both false, that is, if you buy a ticket and can take the flight or if you do not buy a ticket and you cannot take the flight. It is false when p and q have opposite truth values. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 20 / 85

21 Propositional Logic Precedence of Logical Operators The operators have the following order of precedence: ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 21 / 85

22 Propositional Logic Truth Tables of Compound Propositions Construct the truth table of the compound proposition: (p q) (p q) Exercise: repeat for p (p q) Ans:[F F T T] ( p q) (p q) Ans:[F F T T] ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 22 / 85

23 Propositional Equivalences Introduction The compound propositions are classified according to their possible truth values to: Tautology: A compound proposition that is always true, no matter what the truth values of the propositional variables that occur in it. Example: p ( p) Contradiction: A compound proposition that is always false Example: p ( p) Contingency: A compound proposition that is neither a tautology nor a contradiction. Exercise: What about (p q) ( p) ( q)?. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 23 / 85

24 Propositional Equivalences Logical Equivalences Compound propositions that have the same truth values in all possible cases are called logically equivalent. Another Definition The compound propositions p and q are called logically equivalent if p q is a tautology. The notation p q denotes that p and q are logically equivalent. General Remarks: The symbol is not a logical connective, and p q is not a compound proposition but rather is the statement that p q is a tautology. The symbol is sometimes used instead of to denote logical equivalence. The compound propositions p and q are equivalent if and only if the columns giving their truth values agree. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 24 / 85

25 Propositional Equivalences Logical Equivalences Example: Show that (p q) and p q are logically equivalent ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 25 / 85

26 Propositional Equivalences Logical Equivalences Example: Show that p q and p q are logically equivalent ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 26 / 85

27 Propositional Equivalences Logical Equivalences Example: Show that p (q r) and (p q) (p r) are logically equivalent. This is the distributive law of disjunction over conjunction. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 27 / 85

28 Propositional Equivalences Logical Equivalences ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 28 / 85

29 Propositional Equivalences Logical Equivalences ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 29 / 85

30 Propositional Equivalences Logical Equivalences ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 30 / 85

31 Propositional Equivalences Logical Equivalences Example: Show that (p q) and p q are logically equivalent ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 31 / 85

32 Propositional Equivalences Logical Equivalences Example: Show that (p ( p q)) and p q are logically equivalent by developing a series of logical equivalences. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 32 / 85

33 Propositional Equivalences Logical Equivalences Example: Show that (p q) (p q) is a tautology. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 33 / 85

34 Homework due to 24th of Sept. From the text book, Section 1.1, page 12 Questions: Q1,Q3,Q9 [parts a,c,h], Q16, Q27[part a], Q31[parts a,c,e] and Q33[part e]. Homework due to 29th of Sept. From the text book, Section 1.3, page 34 Questions: Q3 [part a],q5,q9 [part c], Q10 [only repeat for Q9(c)] and Q23.

35 Predicates and Quantifiers Introduction Every computer connected to the university network is functioning properly. Is it a proposition? In this section we will introduce a more powerful type of logic called predicate logic. Statements involving variables, such as x > 3, is neither true nor false when the values of the variables are not specified. The statement x > 3 has two parts: The subject: the variable x. The predicate: is greater than 3 refers to a property that the subject of the statement can have. We can denote the statement x is greater than 3 by P(x), where P denotes the predicate is greater than 3 and x is the variable. The statement P(x) is also said to be the value of the propositional function P at x. Once a value has been assigned to the variable x, the statement P(x) becomes a proposition and has a truth value. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 35 / 85

36 Predicates and Quantifiers Predicates Example: Let P(x) denote the statement x > 3. What are the truth values of P(4) and P(2)? P(4), 4 > 3, True. P(2), 2 > 3, False. Example: Let Q(x, y) denote the statement x = y + 3. What are the truth values of the propositions Q(1, 2) and Q(3, 0)? Q(1, 2), 1 = 2 + 3, False. Q(3, 0), 3 = 0 + 3, True. Exercise: Let R(x, y, z) denote the statement x + y = z. What are the truth values of the propositions R(1, 2, 3) and R(0, 0, 1)? ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 36 / 85

37 Predicates and Quantifiers Quantifiers The universal quantification The universal quantification of P(x) is the statement P(x) for all values of x in the domain. The notation xp(x) denotes the universal quantification of P(x). is called the universal quantifier. We read xp(x) as for all xp(x) or for every xp(x). An element for which P(x) is false is called a counterexample of xp(x). The existential quantification The existential quantification of P(x) is the proposition There exists an element x in the domain such that P(x). We use the notation xp(x) for the existential quantification of P(x). Here is called the existential quantifier. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 37 / 85

38 Predicates and Quantifiers Quantifiers What are the truth values of the quantification xp(x) for the following statements: P(x) is x + 1 > x, D : Real No. s. True for all real numbers True. P(x) is x < 2, D : Real No. s. P(3) is false. That is, x = 3 is a counterexample for the statement xp(x) False. P(x) is x 2 > 0, D : All integers. We see that x = 0 is a counterexample because x 2 = 0 when x = 0, so that x 2 is not greater than 0 when x = 0. False. P(x) is x 2 < 10, D : +ve integers not exceeding 4. xp(x) = P(1) P(2) P(3) P(4). Because P(4), which is the statement 4 2 < 10, is false xp(x) is False. P(x) is x 2 x, D : Real No. s x(x 2 x) is false if the domain consists of all real numbers. However, its True if the domain consists of the integers No s only. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 38 / 85

39 Predicates and Quantifiers Quantifiers What are the truth values of the quantification xp(x) for the following statements: P(x) is x > 3, D : Real No. s. Because x > 3 is sometimes true, for instance, when x = 4 the existential quantification of P(x) is True. P(x) is x = x + 1, D : Real No. s. Because P(x) is false for every real number x the existential quantification of P(x) is False. P(x) is x 2 > 10, D : +ve integers not exceeding 4. xp(x) = P(1) P(2) P(3) P(4). Because P(4), which is the statement 4 2 > 10, is True xp(x) is True. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 39 / 85

40 Predicates and Quantifiers Quantifiers The uniqueness quantification The uniqueness quantifier of P(x) is the statement There exists a unique x such that P(x) is true. The notation!xp(x) or 1 xp(x) denotes the uniqueness quantification of P(x). Example: 1 x(x 1 = 0) with D : is the set of real numbers is a True statement. Quantifiers with Restricted Domains The domain of a quantifier can be restricted in an abbreviated form by using a condition on the variable that is included after the quantifier. Example: x < 0(x 2 > 0) states that The square of a negative real number is positive. This statement is the same as x(x < 0 x 2 > 0). ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 40 / 85

41 Predicates and Quantifiers Precedence of Quantifiers The quantifiers and have higher precedence than all logical operators from propositional calculus. Example: xp(x) Q(x) is the disjunction of xp(x) and Q(x). In other words, it means ( xp(x)) Q(x) rather than x(p(x) Q(x)). Logical Equivalences Involving Quantifiers Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value no matter which predicates are substituted into these statements and which domain of discourse is used for the variables in these propositional functions. We use the notation S T to indicate that two statements S and T involving predicates and quantifiers are logically equivalent. Example: x(p(x) Q(x)) xp(x) xq(x) ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 41 / 85

42 Predicates and Quantifiers Negating Quantified Expressions xp(x) x P(x) Let P(x) denotes the statement x knows Java programming, and let the universe of discourse be all the students in your class. xp(x) means all the students in your class know Java programming. The negation: not all the students in your class know Java programming. Or: there exists at least one student in your class who does not know Java programming. This is equivalent to x P(x) ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 42 / 85

43 Predicates and Quantifiers Negating Quantified Expressions xp(x) x P(x) Let P(x) denotes the statement x knows Java programming, and let the universe of discourse be all the students in your class. xp(x) means there exists at least one student in your class who knows Java programming. The negation: all the students in your class do not know Java programming. This is equivalent to x P(x) ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 43 / 85

44 Predicates and Quantifiers Negating Quantified Expressions Example: What are the negations of the statements x(x 2 > x) and x(x 2 = 2)? The negation of x(x 2 > x) is x(x 2 > x). This is equivalent to x (x 2 > x). This can be written as x(x 2 x). The negation of x(x 2 = 2) is x(x 2 = 2). This is equivalent to x (x 2 = 2). This can be written as x(x 2 2). Exercise: Show that x(p(x) Q(x)) and x(p(x) Q(x)) are logically equivalent. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 44 / 85

45 Nested Quantifiers Introduction Nested Quantifiers Its the statements that have one Quantifier within the scope of another. Examples: x yp(x, y) For all x, there exists a y such that P(x, y). Example: x y(x + y = 0). x yp(x, y) There exists an x, such that for all y P(x, y) is true. Example: x y(x y = 0). ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 45 / 85

46 Nested Quantifiers Understanding Statements Involving Nested Quantifiers Example: Translate the following statements into English where the domain is all the real numbers: x y(x + y = 0) Every real number has an additive inverse. x y((x > 0) (y < 0) (xy < 0)) The product of a positive real number and a negative real number is always a negative real number. x y(x + y = y + x) This is the commutative law for addition of real numbers. x y z(x + (y + z) = (x + y) + z) This is the associative law for addition of real numbers. x y(((x 0) (y < 0)) (x y > 0)) A non-negative number minus a -ve number is greater than zero. x y(((x 0) (y 0)) (x y > 0)) The difference between two non-positive numbers is not necessarily non-positive (i.e. can be +ve) ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 46 / 85

47 Nested Quantifiers Understanding Statements Involving Nested Quantifiers Exercise: x y(((x 0) (y 0)) (xy 0)) Example: Translate the following English statement into logical expression: The sum of two positive integers is always positive. We first rewrite the sentence For every two integers, if these integers are both positive, then the sum of these integers is positive. Next, we introduce the variables x and y to obtain For all positive integers x and y, x + y is positive. Consequently, we can express this statement as: x y((x > 0) (y > 0) (x + y > 0)), where the domain consists of all integers. If the domain is all positive integers, then the statement can be written as For every two positive integers, the sum of these integers is positive, and can be expressed mathematically as: x y(x + y > 0). ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 47 / 85

48 Nested Quantifiers Understanding Statements Involving Nested Quantifiers Example: Translate the following English statement into logical expression: Every real number except zero has a multiplicative inverse. We first rewrite the sentence For every real number x except zero, x has a multiplicative inverse. Next, we introduce the variables x and y to obtain For every real number x, if x 0, then there exists a real number y such that xy = 1. Consequently, we can express this statement as: x((x 0) y(xy = 1)). ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 48 / 85

49 Nested Quantifiers Translating English Sentences into Logical Expressions Example: Translate the following English statement into into logical expression: Any student either has a computer or has a friend that has a computer.. For any student x, x has a computer or there is some student y where y has a computer and x and y are friends. Consequently, we can express this statement as: x(c(x) y[c(y) F (x, y)]). where: C(x) is x has a computer. F (x, y) is x and y are friends. Universe of discourse for x and y is all students. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 49 / 85

50 Nested Quantifiers The Order of Quantifiers The order of the quantifiers is important unless all the quantifiers are universal quantifiers or all are existential quantifiers. The order of nested universal quantifiers (or existential quantifiers) in a statement without other quantifiers can be changed without changing the meaning of the quantified statement. Example: x y(x + y = y + x) y x(x + y = y + x). The order in which quantifiers appear when there is different types makes a difference. Example: the statements x y(x + y = 0) and x y(x + y = 0) are not logically equivalent. (WHY??) Exercise: Let Q(x, y, z) be the statement x + y = z. What are the truth values of the statements x y zq(x, y, z) and z x yq(x, y, z), where the domain of all variables consists of all real numbers? ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 50 / 85

51 Nested Quantifiers The Order of Quantifiers ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 51 / 85

52 Nested Quantifiers Negating Nested Quantifiers Statements involving nested quantifiers can be negated by successively applying the rules for negating statements involving a single quantifier. Example #1: x y(xy = 1) x y(xy = 1) x y (xy = 1) x y(xy 1) Example #2: x y zp(x, y, z) x y zp(x, y, z) x y zp(x, y, z) x y z P(x, y, z) ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 52 / 85

53 Rules of Inference Valid Arguments in Propositional Logic A correct (deductive) proof is to establish that If the conditions are true then the conclusion is true. i.e., Conditions conclusion is a tautology Argument An argument in propositional logic is a sequence of propositions. All but the final proposition in the argument are called premises and the final proposition is called the conclusion. An argument is valid if the truth of all its premises implies that the conclusion is true. Argument form An argument form in propositional logic is a sequence of compound propositions involving propositional variables. The conclusion is true if the premises are all true. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 53 / 85

54 Rules of Inference Valid Arguments in Propositional Logic Ex. Determine whether the following argument is valid If you have a current password, then you can log onto the network. You have a current password. Therfore You can log onto the network. Task: determine whether the conclusion must be true when the premises are both true. Use p to represent You have a current password and q to represent You can log onto the network. Then, the argument has the form where is the symbol that denotes therefore. The statement ((p q) p) q is a tautology [modus ponens]. In particular, When both p q and p are true, we know that q must also be true and hence the argument is valid. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 54 / 85

55 Rules of Inference Rules of Inference for Propositional Logic Valid argument form The argument form with premises p 1, p 2,, p n and conclusion q is valid, when (p 1 p 2 p n ) q is a tautology. We can always use a truth table to show that an argument form is valid. However, this can be a tedious approach. Instead, we can first establish the validity of some relatively simple argument forms, called rules of inference. These rules of inference can be used as building blocks to construct more complicated valid argument forms. Exercise: Check the validity of the following arguments ((p q) (q r)) (p r). If I like DM, I will study it. Either I study DM or I fail the course. Therefore, If I fail the course, then I do not like DM. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 55 / 85

56 Rules of Inference Rules of Inference for Propositional Logic ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 56 / 85

57 Rules of Inference Rules of Inference for Propositional Logic ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 57 / 85

58 Rules of Inference Rules of Inference for Propositional Logic State which rule of inference is the basis of the following arguments: It is below freezing now. Therefore, it is either below freezing or raining now. Let p be the proposition It is below freezing now and q the proposition It is raining now. Then this argument is of the form [the addition rule]. It is below freezing and raining now. Therefore, it is below freezing now. Let p be the proposition It is below freezing now and q the proposition It is raining now. Then this argument is of the form [the simplification rule]. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 58 / 85

59 Rules of Inference Rules of Inference for Propositional Logic State which rule of inference is the basis of the following argument: If it rains today, then we will not have a barbecue today. If we do not have a barbecue today, then we will have a barbecue tomorrow. Therefore, if it rains today, then we will have a barbecue tomorrow. Let p be the proposition It is raining today, let q be the proposition We will not have a barbecue today, and let r be the proposition We will have a barbecue tomorrow. Then this argument is of the form [hypothetical syllogism]. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 59 / 85

60 Rules of Inference Using Rules of Inference to Build Arguments Example: Show that the premises It is not sunny this afternoon and it is colder than yesterday, We will go swimming only if it is sunny, If we do not go swimming, then we will take a canoe trip, and If we take a canoe trip, then we will be home by sunset lead to the conclusion We will be home by sunset. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 60 / 85

61 Rules of Inference Using Rules of Inference to Build Arguments Example: Show that the premises If you send me an message, then I will finish writing the program, If you do not send me an message, then I will go to sleep early, and If I go to sleep early, then I will wake up feeling refreshed, lead to the conclusion If I do not finish writing the program, then I will wake up feeling refreshed. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 61 / 85

62 Rules of Inference Using Rules of Inference to Build Arguments Example: Show that the premises Gary is either intelligent or a good actor, If Gary is intelligent, then he can count from 1 to 10, and Gary can only count from 1 to 3, lead to the conclusion Gary is a good actor. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 62 / 85

63 Rules of Inference Rules of Inference for Quantified Statements ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 63 / 85

64 Rules of Inference Rules of Inference for Quantified Statements Example: Show that the premises Everyone in this discrete mathematics class has taken a course in computer science, and Marla is a student in this class, lead to the conclusion Marla has taken a course in computer science. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 64 / 85

65 Rules of Inference Rules of Inference for Quantified Statements Example: Show that the premises A student in this class has not read the book, and Everyone in this class passed the first exam, lead to the conclusion Someone who passed the first exam has not read the book. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 65 / 85

66 Rules of Inference Combining Rules of Inference for Propositions and Quantified Statements Universal modus ponens Universal modus tollens ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 66 / 85

67 Rules of Inference Combining Rules of Inference for Propositions and Quantified Statements Example: Assume that For all positive integers n, if n is greater than 4, then n 2 is less than 2 n is true. Use universal modus ponens to show that < ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 67 / 85

68 Rules of Inference ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 68 / 85

69 Homework due to 6th of Oct. From the text book, Section 1.4, page 53 Questions: Q2,Q4, Q12[parts e,f], Q14[parts c,d], and Q18. From the text book, Section 1.5, page 64 Questions: Q2,Q4 [parts a,d,f], Q24 [part a], Q26[parts e,g,h], Q28[parts f,h,j] and Q30[part a,c,e]. From the text book, Section 1.6, page 78 Questions: Q10[parts a,c,e], Q14[parts a,c], Q16[parts a,c], Q24, and Q28.

70 Introduction to Proofs Introduction Proof is a valid argument that establishes the truth of a mathematical statement. A proof can use the hypotheses of the theorem, if any, axioms assumed to be true, and previously proven theorems. Types of Proofs: Formal proofs [Used by computer programs]: show that statements involving propositions and quantified statements are true by supplying all the steps and giving the rules for each step in the argument. Informal proofs [Used by humans]: more than one rule of inference may be used in each step, where steps may be skipped, where the axioms being assumed and the rules of inference used are not explicitly stated. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 70 / 85

71 Introduction to Proofs Methods of Proving Theorems / Direct proof Direct proof showing that a conditional statement p q is true by showing that if p is true, then q must also be true, so that the combination p true and q false never occurs. Give a direct proof of the following theorems: If n is an odd integer, then n 2 is odd. Assume n is odd n = 2k + 1, where k is an integer. n 2 = (2k + 1) 2 = (4k 2 + 4k + 1) = 2(2k 2 + 2k) + 1 = 2`k + 1 Since n 2 can be written in this form, it is odd. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 71 / 85

72 Introduction to Proofs Methods of Proving Theorems / Direct proof Give a direct proof of the following theorems: If m and n are both perfect squares, then nm is also a perfect square. (An integer a is a perfect square if there is an integer b such that a = b 2.). Assume that n and m are perfect squares n = t 2 and m = s 2, where s and t are integers. mn = s 2 t 2 = (ss)(tt) = (st)(st) = (st) 2 [using commutativity and associativity of multiplication] Since mn can be written in this form, it is a perfect square. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 72 / 85

73 Introduction to Proofs Methods of Proving Theorems / Indirect proof Proof by Contraposition make use of the fact that the conditional statement p q is equivalent to its contrapositive, q p. Give an indirect proof of the following: if n is an integer and 3n + 2 is odd, then n is odd.. Assume that the conclusion q of this implication is false (n is even). Then use rules of inference and known theorems to show that the hypothesis p must also be false (3n + 2 is even). n is even n = 2k where k is an integer. 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1) = 2`k Therefore 3n + 2 is even. We have shown that the contrapositive of the implication is true, so the implication itself is also true (If 3n + 2 is odd, then n is odd). Exercise show that if m + n > 50 then m > 25 or n > 25 where m and n are integers. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 73 / 85

74 Introduction to Proofs Methods of Proving Theorems / Indirect proof Proof by Contradiction reveal that p is true if we can show that p (r r) is true for some proposition r. Way: assume q and p and then deduce any contradiction. Give an indirect proof of the following: if the square of an integer number is odd, then the integer is odd. Assume that the hypothesis p of this implication is true and the conclusion q is false (n is even). Then use rules of inference and known theorems to deduce contradiction. Assume n 2 is odd and n is not odd (even). n = 2k n 2 = 4k 2 = 2(2k 2 ) Therefore n 2 is even and is also odd by the assumption. We have a contradiction. Exercise show that if 3n + 2 is odd, then n is odd. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 74 / 85

75 Introduction to Proofs Proofs of Equivalence Prove the theorem: If n is an integer, then n is odd if and only if n 2 is odd. This theorem has the form p if and only if q, where p is n is odd and q is n 2 is odd. To prove this theorem, we need to show that p q and q p are true. Because we have shown that both p q and q p [refer to the last examples], we have shown that the theorem is true. To prove that a group of statements are equivalent, we can establish any chain of conditional statements we choose as long as it is possible to work through the chain to go from any one of these statements to any other statement. For example, we can show that p 1, p 2, and p 3 are equivalent by showing that p 1 p 3, p 3 p 2, and p 2 p 1. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 75 / 85

76 Introduction to Proofs Proofs of Equivalence Show that these statements about the integer n are equivalent: p 1 : n is even. p 2 : n 1 is odd. p 3 : n 2 is even. We can show that these three statements are equivalent by showing that the conditional statements p 1 p 2, p 2 p 3, and p 3 p 1 are true. p 1 p 2 [Direct proof]: n is even n = 2k for some integer k n 1 = 2k 1 = 2(k 1) + 1 n 1 is odd. p 2 p 3 [Direct Proof]: n 1 is odd n 1 = 2k + 1 for some integer k n = 2k + 2 and n 2 = (2k + 2) 2 = 4k 2 + 8k + 4 = 2(2k 2 + 4k + 2) n 2 is even. p 3 p 1 [Proof by Contraposition]: is equivalent to show that n is odd n 2 is odd (We proved this before). This completes the proof. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 76 / 85

77 Introduction to Proofs Mistakes in Proofs Every step is valid except for one, step 5 where we divided both sides by a b. The error is that a b equals zero; division of both sides of an equation by the same quantity is valid as long as this quantity is not zero. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 77 / 85

78 Proof Methods and Strategy Exhaustive Proof and Proof by Cases Proof by cases The original conditional statement with a hypothesis made up of a disjunction of the propositions p 1, p 2,, p n can be proved by proving each of the n conditional statements p i q, i = 1, 2,, n, individually. To prove a conditional statement of the form p 1 p 2 p n q, the tautology [(p 1 p 2 p n ) q] [(p 1 q) (p 2 q) (pn q)] can be used as a rule of inference. Exhaustive proof Proving by exhausting all possibilities [normally applicable when there is small number of possibilities]. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 78 / 85

79 Proof Methods and Strategy Exhaustive Proof and Proof by Cases EX. Prove that (n + 1) 3 3 n if n is positive integer with n 4. Using the method of exhaustion, we can verify that for the possible values of n = 1, 2, 3, 4 that (n + 1) 3 3 n. Exercise: Prove that the only consecutive positive integers not exceeding 50 that are perfect powers are 8 and 9. (An integer is a perfect power if it equals n a, where a is an integer greater than 1.) EX. Prove that if n is an integer, then n 2 n using proof by cases. We can prove that n 2 n for every integer by considering three cases, when n = 0, when n 1, and when n 1. Case(i): n = = 0 n 2 n for this case. Case(ii): n 1 n.n 1.n n 2 n for this case. Case(iii): n 1 n 2 0 n 2 n for this case. Because the inequality holds in all three cases, we can conclude that if n is an integer, then n 2 n. Exercise: Use a proof by cases to show that xy = x y, where x and y are real numbers.[wlog] ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 79 / 85

80 Proof Methods and Strategy Exhaustive Proof and Proof by Cases EX. Show by proof of cases that there are no solutions in integers x and y of x 2 + 3y 2 = 8. x 2 and y 2 are positive. Hence, to get x 2 + 3y 2 = 8, x 2 or 3y 2 should not exceeds 8. x 2 8 x = 0, ±1, ±2 3y 2 8 y = 0, ±1 The largest sum that we can get from these combinations is 7 and hence its impossible for x 2 + 3y 2 = 8 to hold if x and y are integers. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 80 / 85

81 Proof Methods and Strategy Exhaustive Proof and Proof by Cases EX. Show that if x and y are integers and both xy and x + y are even, then both x and y are even. We can proof using the proof by contraposition and the notion of (without loss of generality (WLOG)) and by proof by cases. First, suppose that x and y are not both even, that is x is odd or y is odd or both are odd. WLOG, assume that x is odd, x = 2m + 1 for some integer m. To complete the proof we need to show that xy or x + y is odd. We have two cases: Case(i): y is even y = 2n x + y = (2m + 1) + 2n = 2(m + n) + 1 is odd. Case(ii): y is odd y = 2n + 1 xy = (2m + 1) (2n + 1) = 2(2mn + m + n) + 1 is odd. which completes the proof. Note: WLOG means the inclusion of the case when y is assumed to be odd and then consider the two cases of x. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 81 / 85

82 Proof Methods and Strategy Existence Proofs Existence Proofs A proof of a proposition of the form xp(x). A Constructive Existence Proof finding an element a, called a witness, such that P(a) is true. A Nonconstructive Existence Proof we do not find an element a such that P(a) is true, but rather prove that xp(x) is true in some other way. EX. Show that there is a positive integer that can be written as the sum of cubes of positive integers in two different ways. After considerable computation (such as a computer search) we find that 1729 = = ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 82 / 85

83 Proof Methods and Strategy Uniqueness Proofs Uniqueness Proofs Show that an element with a given property exists and that no other element has this property. Existence: We show that an element x with the desired property exists. Uniqueness: We show that if y x, then y does not have the desired property. Equivalently, we can show that if x and y both have the desired property, then x = y. EX. Show that if a and b are real numbers and a 0, then there is a unique real number r such that ar + b = 0. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 83 / 85

84 Proof Methods and Strategy FORWARD AND BACKWARD REASONING EX. Show that for any two distinct real numbers x and y, the arithmetic mean (x + y)/2 is always greater than the geometric mean xy. ECOM Discrete Mathematics - Ch.1 Dr. Musbah Shaat 84 / 85

85 End of Chapter # 1

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

software design & management Gachon University Chulyun Kim

software design & management Gachon University Chulyun Kim Gachon University Chulyun Kim 2 Outline Propositional Logic Propositional Equivalences Predicates and Quantifiers Nested Quantifiers Rules of Inference Introduction to Proofs 3 1.1 Propositional Logic

More information

DISCRETE MATHEMATICS BA202

DISCRETE MATHEMATICS BA202 TOPIC 1 BASIC LOGIC This topic deals with propositional logic, logical connectives and truth tables and validity. Predicate logic, universal and existential quantification are discussed 1.1 PROPOSITION

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

Intro to Logic and Proofs

Intro to Logic and Proofs Intro to Logic and Proofs Propositions A proposition is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. Examples: It is raining today. Washington

More information

Logic Overview, I. and T T T T F F F T F F F F

Logic Overview, I. and T T T T F F F T F F F F Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical

More information

Readings: Conjecture. Theorem. Rosen Section 1.5

Readings: Conjecture. Theorem. Rosen Section 1.5 Readings: Conjecture Theorem Lemma Lemma Step 1 Step 2 Step 3 : Step n-1 Step n a rule of inference an axiom a rule of inference Rosen Section 1.5 Provide justification of the steps used to show that a

More information

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures Methods of Proof CSE0 Discrete Computational Structures Lecture 4 When is a mathematical argument correct? What methods can be used to construct mathematical arguments? Important in many computer science

More information

Rules of Inference. Arguments and Validity

Rules of Inference. Arguments and Validity Arguments and Validity A formal argument in propositional logic is a sequence of propositions, starting with a premise or set of premises, and ending in a conclusion. We say that an argument is valid if

More information

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

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations Logic Propositions and logical operations Main concepts: propositions truth values propositional variables logical operations 1 Propositions and logical operations A proposition is the most basic element

More information

1 The Foundation: Logic and Proofs

1 The Foundation: Logic and Proofs 1 The Foundation: Logic and Proofs 1.1 Propositional Logic Propositions( 명제 ) a declarative sentence that is either true or false, but not both nor neither letters denoting propositions p, q, r, s, T:

More information

1 The Foundation: Logic and Proofs

1 The Foundation: Logic and Proofs 1 The Foundation: Logic and Proofs 1.1 Propositional Logic Propositions( ) a declarative sentence that is either true or false, but not both nor neither letters denoting propostions p, q, r, s, T: true

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

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

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference CSI 2350, Discrete Structures Chapter 1, Logic and Proofs (3) Young-Rae Cho Associate Professor Department of Computer Science Baylor University 1.6. Rules of Inference Basic Terminology Axiom: a statement

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

CS 2336 Discrete Mathematics

CS 2336 Discrete Mathematics CS 2336 Discrete Mathematics Lecture 3 Logic: Rules of Inference 1 Outline Mathematical Argument Rules of Inference 2 Argument In mathematics, an argument is a sequence of propositions (called premises)

More information

Logic and Proof. Aiichiro Nakano

Logic and Proof. Aiichiro Nakano Logic and Proof Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science

More information

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University Discrete Mathematics Logics and Proofs Liangfeng Zhang School of Information Science and Technology ShanghaiTech University Resolution Theorem: p q p r (q r) p q p r q r p q r p q p p r q r T T T T F T

More information

PROPOSITIONAL CALCULUS

PROPOSITIONAL CALCULUS PROPOSITIONAL CALCULUS A proposition is a complete declarative sentence that is either TRUE (truth value T or 1) or FALSE (truth value F or 0), but not both. These are not propositions! Connectives and

More information

Rules Build Arguments Rules Building Arguments

Rules Build Arguments Rules Building Arguments Section 1.6 1 Section Summary Valid Arguments Inference Rules for Propositional Logic Using Rules of Inference to Build Arguments Rules of Inference for Quantified Statements Building Arguments for Quantified

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

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

Review: Potential stumbling blocks

Review: Potential stumbling blocks Review: Potential stumbling blocks Whether the negation sign is on the inside or the outside of a quantified statement makes a big difference! Example: Let T(x) x is tall. Consider the following: x T(x)

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

Discrete Mathematics and Its Applications

Discrete Mathematics and Its Applications Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 19, 2017 Outline 1 Logical

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

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Discrete Structures of Computer Science Propositional Logic III Rules of Inference Discrete Structures of Computer Science Propositional Logic III Rules of Inference Gazihan Alankuş (Based on original slides by Brahim Hnich) July 30, 2012 1 Previous Lecture 2 Summary of Laws of Logic

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 1.1 - Logical Form and Logical Equivalence Definition. A statement or proposition is a sentence that is either true or false, but not both. ex. 1 + 2 = 3 IS a statement

More information

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs The Foundations: Logic and Proofs Chapter 1, Part III: Proofs Summary Valid Arguments and Rules of Inference Proof Methods Proof Strategies Rules of Inference Section 1.6 Section Summary Valid Arguments

More information

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions Review Propositions, propositional operators, truth tables Logical Equivalences. Tautologies & contradictions Some common logical equivalences Predicates & quantifiers Some logical equivalences involving

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

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team KS091201 MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE Discrete Math Team 2 -- KS091201 MD W-04 Outline Valid Arguments Modus Ponens Modus Tollens Addition and Simplification More Rules

More information

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology Discrete Mathematic Chapter 1: Logic and Proof 1.5 Rules of Inference 1.6 Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of echnology Agenda Rules

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

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

Predicate Logic & Quantification

Predicate Logic & Quantification Predicate Logic & Quantification Things you should do Homework 1 due today at 3pm Via gradescope. Directions posted on the website. Group homework 1 posted, due Tuesday. Groups of 1-3. We suggest 3. In

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

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics Unit I LOGIC AND PROOFS B. Thilaka Applied Mathematics UNIT I LOGIC AND PROOFS Propositional Logic Propositional equivalences Predicates and Quantifiers Nested Quantifiers Rules of inference Introduction

More information

Mat 243 Exam 1 Review

Mat 243 Exam 1 Review OBJECTIVES (Review problems: on next page) 1.1 Distinguish between propositions and non-propositions. Know the truth tables (i.e., the definitions) of the logical operators,,,, and Write truth tables for

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

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

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional) Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional

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

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

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov Introduction Logic Inference Discrete Mathematics Andrei Bulatov Discrete Mathematics - Logic Inference 6-2 Previous Lecture Laws of logic Expressions for implication, biconditional, exclusive or Valid

More information

Math 3336: Discrete Mathematics Practice Problems for Exam I

Math 3336: Discrete Mathematics Practice Problems for Exam I Math 3336: Discrete Mathematics Practice Problems for Exam I The upcoming exam on Tuesday, February 26, will cover the material in Chapter 1 and Chapter 2*. You will be provided with a sheet containing

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

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

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference Logic? Propositional Logic (Rosen, Chapter 1.1 1.3) TOPICS Propositional Logic Truth Tables Implication Logical Proofs 10/1/12 CS160 Fall Semester 2012 2 What is logic? Logic is a truth-preserving system

More information

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another. Math 0413 Appendix A.0 Logic Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another. This type of logic is called propositional.

More information

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is

More information

Section 1.1 Propositions

Section 1.1 Propositions Set Theory & Logic Section 1.1 Propositions Fall, 2009 Section 1.1 Propositions In Chapter 1, our main goals are to prove sentences about numbers, equations or functions and to write the proofs. Definition.

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

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012 March 5, 2012 Webwork Homework. The handout on Logic is Chapter 4 from Mary Attenborough s book Mathematics for Electrical Engineering and Computing. Proving Propositions We combine basic propositions

More information

STRATEGIES OF PROBLEM SOLVING

STRATEGIES OF PROBLEM SOLVING STRATEGIES OF PROBLEM SOLVING Second Edition Maria Nogin Department of Mathematics College of Science and Mathematics California State University, Fresno 2014 2 Chapter 1 Introduction Solving mathematical

More information

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC I. BASICS OF PROPOSITIONAL LOGIC George Boole (1815-1864) developed logic as an abstract mathematical system consisting of propositions, operations (conjunction, disjunction, and negation), and rules for

More information

Manual of Logical Style

Manual of Logical Style Manual of Logical Style Dr. Holmes January 9, 2015 Contents 1 Introduction 2 2 Conjunction 3 2.1 Proving a conjunction...................... 3 2.2 Using a conjunction........................ 3 3 Implication

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

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes: Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements. An inference mechanism (a collection of rules) to

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

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

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

Proofs. Joe Patten August 10, 2018

Proofs. Joe Patten August 10, 2018 Proofs Joe Patten August 10, 2018 1 Statements and Open Sentences 1.1 Statements A statement is a declarative sentence or assertion that is either true or false. They are often labelled with a capital

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Today's learning goals Distinguish between a theorem, an axiom, lemma, a corollary, and a conjecture. Recognize direct proofs

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

Predicate Logic. Andreas Klappenecker

Predicate Logic. Andreas Klappenecker Predicate Logic Andreas Klappenecker Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P. Example Let D=Z be the set of integers.

More information

Logic and Propositional Calculus

Logic and Propositional Calculus CHAPTER 4 Logic and Propositional Calculus 4.1 INTRODUCTION Many algorithms and proofs use logical expressions such as: IF p THEN q or If p 1 AND p 2, THEN q 1 OR q 2 Therefore it is necessary to know

More information

2-4: The Use of Quantifiers

2-4: The Use of Quantifiers 2-4: The Use of Quantifiers The number x + 2 is an even integer is not a statement. When x is replaced by 1, 3 or 5 the resulting statement is false. However, when x is replaced by 2, 4 or 6 the resulting

More information

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017 3. The Logic of Quantified Statements Summary Aaron Tan 28 31 August 2017 1 3. The Logic of Quantified Statements 3.1 Predicates and Quantified Statements I Predicate; domain; truth set Universal quantifier,

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross

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

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical

More information

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.7, 5.5) TOPICS Sets and Functions Propositional and Predicate Logic Logical Operators and Truth Tables Logical Equivalences and Inference

More information

Discrete Structures for Computer Science

Discrete Structures for Computer Science Discrete Structures for Computer Science William Garrison bill@cs.pitt.edu 6311 Sennott Square Lecture #6: Rules of Inference Based on materials developed by Dr. Adam Lee Today s topics n Rules of inference

More information

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

What is Logic? Introduction to Logic. Simple Statements. Which one is statement? What is Logic? Introduction to Logic Peter Lo Logic is the study of reasoning It is specifically concerned with whether reasoning is correct Logic is also known as Propositional Calculus CS218 Peter Lo

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Distinguish between a theorem, an axiom, lemma, a corollary, and a conjecture. Recognize direct proofs

More information

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE 1 CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 February 5, 2015 2 Announcements Homework 1 is due now. Homework 2 will be posted on the web site today. It is due Thursday, Feb. 12 at 10am in class.

More information

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Packet #1: Logic & Proofs. Applied Discrete Mathematics Packet #1: Logic & Proofs Applied Discrete Mathematics Table of Contents Course Objectives Page 2 Propositional Calculus Information Pages 3-13 Course Objectives At the conclusion of this course, you should

More information

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu

More information

First order Logic ( Predicate Logic) and Methods of Proof

First order Logic ( Predicate Logic) and Methods of Proof First order Logic ( Predicate Logic) and Methods of Proof 1 Outline Introduction Terminology: Propositional functions; arguments; arity; universe of discourse Quantifiers Definition; using, mixing, negating

More information

Basic Logic and Proof Techniques

Basic Logic and Proof Techniques Chapter 3 Basic Logic and Proof Techniques Now that we have introduced a number of mathematical objects to study and have a few proof techniques at our disposal, we pause to look a little more closely

More information

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them. Proofs A mathematical system consists of axioms, definitions and undefined terms. An axiom is assumed true. Definitions are used to create new concepts in terms of existing ones. Undefined terms are only

More information

Logic. Def. A Proposition is a statement that is either true or false.

Logic. Def. A Proposition is a statement that is either true or false. Logic Logic 1 Def. A Proposition is a statement that is either true or false. Examples: Which of the following are propositions? Statement Proposition (yes or no) If yes, then determine if it is true or

More information

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here. Chapter 2 Mathematics and Logic Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here. 2.1 A Taste of Number Theory In this section, we will

More information

Some Review Problems for Exam 1: Solutions

Some Review Problems for Exam 1: Solutions Math 3355 Fall 2018 Some Review Problems for Exam 1: Solutions Here is my quick review of proof techniques. I will focus exclusively on propositions of the form p q, or more properly, x P (x) Q(x) or x

More information

Mathematical Reasoning (Part I) 1

Mathematical Reasoning (Part I) 1 c Oksana Shatalov, Spring 2017 1 Mathematical Reasoning (art I) 1 Statements DEFINITION 1. A statement is any declarative sentence 2 that is either true or false, but not both. A statement cannot be neither

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

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

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is

More information

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker CSCE 222 Discrete Structures for Computing Predicate Logic Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Predicates A function P from a set D to the set Prop of propositions is called a predicate.

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

With Question/Answer Animations. Chapter 1, Part III: Proofs

With Question/Answer Animations. Chapter 1, Part III: Proofs With Question/Answer Animations Chapter 1, Part III: Proofs Summary Valid Arguments and Rules of Inference Proof Methods Proof Strategies Section 1.6 Section Summary Valid Arguments Inference Rules for

More information

Supplementary Logic Notes CSE 321 Winter 2009

Supplementary Logic Notes CSE 321 Winter 2009 1 Propositional Logic Supplementary Logic Notes CSE 321 Winter 2009 1.1 More efficient truth table methods The method of using truth tables to prove facts about propositional formulas can be a very tedious

More information

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

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.3) TOPICS Propositional Logic Logical Operations Equivalences Predicate Logic CS160 - Spring Semester 2014 2 What

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

The statement calculus and logic

The statement calculus and logic Chapter 2 Contrariwise, continued Tweedledee, if it was so, it might be; and if it were so, it would be; but as it isn t, it ain t. That s logic. Lewis Carroll You will have encountered several languages

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

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

Discrete Mathematics

Discrete Mathematics Discrete Mathematics Chih-Wei Yi Dept. of Computer Science National Chiao Tung University March 9, 2009 Overview of ( 1.5-1.7, ~2 hours) Methods of mathematical argument (i.e., proof methods) can be formalized

More information