Discrete Mathematical الرياضيات المتقطعة Dr. Ahmad Tayyar Al Israa University

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

Appetizer: True or False 1.2  2 2.If 2 = 3, then 5 = 6. 3.If 1 = 2, then I am the Pope. 4.Open the window. 5.If the proof is wrong, then the proposition.
Grading Lecture attendance: -1% per 2 unexcused absences
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
Introduction to Logic Logical Form: general rules
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
First Order Logic. Propositional Logic A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not.
Adapted from Discrete Math
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Propositional Logic.
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
The Foundations: Logic and Proofs
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Chapter 8 Logic DP Studies. Content A Propositions B Compound propositions C Truth tables and logical equivalence D Implication and equivalence E Converse,
Discrete Maths 2. Propositional Logic Objective
MATERI II PROPOSISI. 2 Tautology and Contradiction Definition A tautology is a statement form that is always true. A statement whose form is a tautology.
Discrete Mathematics and Its Applications
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Discrete Mathematics. Propositional Logic 10/8/2015 What’s a proposition? PropositionsNot Propositions = 32Bring me coffee! CS173 is Bryan’s favorite.
1 Propositional Logic Proposition 2 Propositions can be divided into simple propositions and compound propositions. A simple (or basic) proposition is.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Reading: Chapter 4 (44-59) from the text book
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
LOGIC.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proof, Sets, and Foundations PROPOSITIONS A proposition is a declarative sentence that is either True or False, but not the.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Discrete Mathematics 0. INTRODUCTION TO DISCRETE MATHEMATICS Lecture 1 Dr.-Ing. Erwin Sitompul
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
CS104 The Foundations: Logic and Proof 1. 2 What is Discrete Structure?  Discrete Objects  Separated from each other (Opposite of continuous)  e.g.,
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Chapter 1 Propositional Logic
Discrete Mathematical
2. The Logic of Compound Statements Summary
(CSC 102) Discrete Structures Lecture 2.
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Information Technology Department
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
Discrete Mathematics Dr.-Ing. Erwin Sitompul
Discrete Mathematics and Its Applications Kenneth H
Presentation transcript:

Discrete Mathematical الرياضيات المتقطعة Dr. Ahmad Tayyar Al Israa University

1 July 2016 Propositional Logic (فرضيات المنطق) What’s a proposition? PropositionsNot Propositions = 32Bring me coffee! CS173 is Leen’s favorite class.CS173 is her favorite class. Every cow has 4 legs There is other life in the universe.Do you like Cake? A proposition is a declarative statement that’s either TRUE or FALSE (but not both). 2

1 July 2016 Propositional Logic Extra examples PropositionsNot Propositions Toronto is the capital of Canada.Sit down! The Moon is made of green cheese.What time is it? = 1 x + 1 = = 2 x + y = z 3

1 July 2016 Example: (Propositions)  13 is an odd number.  = 2.  8  square root of (8 + 8).  There is monkey in the moon.  Today is Wednesday.  For any integer n  0, there exists 2n which is an even number.  x + y = y + x for any real number x and y. 4

1 July 2016 Example: (Not Propositions)  What time does Argo Bromo train arrive at Gambir Station?  Do the quiz without cooperating!  x =  x > 5.  I am heavy. Conclusion: Propositions are declarative sentences. Conclusion: If a proposition is made out of mathematical equations, then the equations must posses an answer so that its truth value can be evaluated. 5

1 July 2016 Proposition Propositions are denoted with lower case letters starting with p such as p, q, r, … Example:  p : 13 is an odd number.  q : Ir. Soekarno was graduated from UGM.  r : = 4. 6

1 July 2016 Propositional Logic - negation Suppose p is a proposition. The negation of p is written  p and has meaning: “It is not the case that p.” Ex. CS107 is NOT Leen’s favorite class. Truth table for negation: p pp TFTF FTFT Notice that  p is a proposition! 7

1 July 2016 Propositional Logic - conjunction Conjunction corresponds to English “and.” p  q is true exactly when p and q are both true. Ex. Amy is curious AND clever. Truth table for conjunction: pqp  q TTFFTTFF TFTFTFTF TFFFTFFF 8

1 July 2016 Propositional Logic - disjunction Disjunction corresponds to English “or.” p  q is when p or q (or both) are true. Ex. Michael is brave OR nuts. Truth table for disjunction: pqp  q TTFFTTFF TFTFTFTF TTTFTTTF 9

1 July 2016 Combining Propositions Example: The following prepositions are known p : Today is rainy. q : The class is cancelled. p  q : Today is rainy and the class is cancelled. p  q : Today is rainy or the class is cancelled.  p : It is not true that today is rainy. (or: Today is not rainy) 10

Example: Given the following propositions, p : The girl is beautiful. q : The girl is smart. Express the following proposition combinations using symbolic notation. a) The girl is beautiful and smart. b) The girl is beautiful but not smart. c) The girl is neither beautiful nor smart. d) It is not true that the girl is ugly or not smart. e) The girl is beautiful, or ugly and smart. f) That the girl is ugly as well as smart, is not true. Combining Propositions p  qp  q p  qp  q p  qp  q (p  q)(p  q) p(p  q)p(p  q) (p  q)(p  q) 1 July

Example: p : 17 is a prime number. q : Prime number is always odd. p  q : 17 is a prime number and prime number is always odd. Truth Table Negation Conjunction Disjunction T F F 1 July

Compound Proposition Excercice: Build the truth table of the proposition (p  q)  (  q  r). 1 July

1 July 2016 Propositional Logic - implication Implication: p  q corresponds to English “if p then q,” or “p implies q.” If it is raining then it is cloudy. If I pass the exams, then I will get presents from my parents. If p then 2+2=4. Truth table for implication: pqp  q TTFFTTFF TFTFTFTF TFTTTFTT 14

Case 1: Your final exam grade is higher than 80 (true hypothesis) and you get an A for the subject (true conclusion).  The lecturer tells the truth. TRUE Case 2: Your final exam grade is higher than 80 (true hypothesis) but you do not get an A (false conclusion).  The lecturer tells a lie. FALSE Case 3: Your final exam grade is lower than 80 (false hypothesis) and you get an A (true conclusion).  The lecturer cannot be said to be wrong or telling a lie. Maybe he/she see your extra efforts and high motivation and thus without any doubt to give you an A. TRUE Case 4: Your final exam grade is lower than 80 (false hypothesis) and you do not get an A (false conclusion).  The lecturer tells the truth. TRUE Conditional Proposition Lecturer: “If your final exam grade is 80 or more, then you will get an A for this subject.” 1 July

Conditional Proposition Various ways to express implication p  q:  If p, then q.  If p, q.  p implies/causes q.  q if p.  p only if q.  p is the sufficient condition for q.  p is sufficient for q.  q is the necessary condition for p.  q is necessary for p.  q whenever p. 1 July

Conditional Proposition Example: Show that p  q is logically equivalent with ~p  q. “If p, then q”  “Not p or q” Example: Determine the negation of p  q. ~(p  q)  ~(~p  q)  ~(~p)  ~q  p  ~q 1 July

Biconditional If p and q are propositions, then we can form the biconditional proposition p ↔q, read as “ p if and only if q ” Example: If p denotes “You can take a flight” and q denotes “You buy a ticket” then p ↔q denotes “You can take a flight if and only if you buy a ticket” –True only if you do both or neither –Doing only one or the other makes the proposition false pqp ↔q TTT TFF FTF FFT 18

Expressing the Biconditional Alternative ways to say “p if and only if q”: –p is necessary and sufficient for q –if p then q, and conversely –p iff q 19

1 July 2016 p is logically equivalent to q if their truth tables are the same. We write p  q. Propositional Logic - logical equivalence 20

Equivalence of Compound Proposition Two compound proposition P(p,q,…) and Q(p,q,…) are said to be logically equivalent if they have identical truth table. Notation: P(p,q,…)  Q(p,q,…) Example: De Morgan’s Law  (p  q)   p   q 1 July

Exercise: Show that p  ~(p  q) and p  ~q are logically equivalent. Logical Equivalence 1 July

1 July 2016 Propositional Logic - logical equivalence Challenge: Try to find a proposition that is equivalent to p  q, but that uses only the connectives , , and . pqp  q TTFFTTFF TFTFTFTF TFTTTFTT pq  pq   p TTFFTTFF TFTFTFTF FFTTFFTT TFTTTFTT 23

1 July 2016 Propositional Logic - proof of 1 famous  Distributivity: p  (q  r)  (p  q)  (p  r) pqr q  rq  rp  (q  r)p  qp  qp  rp  r(p  q)  (p  r) TTTTTTTT TTFFTTTT TFTFTTTT TFFFTTTT FTTTTTTT FTFFFTFF FFTFFFTF FFFFFFFF All truth assignment s for p, q, and r. I could say “prove a law of distributivity.” 24

1 July 2016 Propositional Logic - special definitions Contrapositives: p  q and  q   p Ex. “If it is noon, then I am hungry.” “If I am not hungry, then it is not noon.” Converses: p  q and q  p Ex. “If it is noon, then I am hungry.” “If I am hungry, then it is noon.” Inverses: p  q and  p   q Ex. “If it is noon, then I am hungry.” “If it is not noon, then I am not hungry.” One of these things is not like the others. Hint: In one instance, the pair of propositions is equivalent. p  q   q   p 25

Exercise: Prove that p  ~q  q  ~p  p  ~q  q  ~p

Some Examples Example: Given a proposition “It is not true that he learns Technical Drawing but not State Philosophy.”, a)Express the proposition above in symbolic notation (logical expression). b)Write a logically equivalent proposition as the proposition above (Hint: Use De Morgan’s Law). Solution: Takingp: He learns Technical Drawing. q: He learns State Philosophy. then: a)~ (p  ~q) b) ~ (p  ~q)  ~ p  q “He does not learn Technical Drawing or indeed learns State Philosophy.”

Example: Three propositions are given to describe the quality of a hotel: p : The service is good. q : The room rate is low. r : The hotel is a three star hotel. Translate the following proposition into symbolic notation using p, q, and r : a) “The room rate is low but the service is bad.” b) “Either the room rate is high or the service is good, but not both.” c) “It is not true that if a hotel is a three star hotel, then the room rate is low and the service is bad.” Some Examples Solution: a)q  ~pb)~q  pc)~ (r  (q  ~p)) (~q  ~p )  (q  p)

Example: Express the following statement in symbolic notation: “If you are below 17 years old, then you may not vote in a general election, unless you are already married.” Some Examples Solution: Defining: p : You are below 17 years old. q : You are already married. r : You may vote in a general election. then the statement above can be express in symbolic notation as: (p  ~q)  ~r “If you are below 17 years old and are not already married, then you may not vote in a general election.”  r  (~p  q)

1 July 2016 Propositional Logic - 2 more defn… A tautology is a proposition that’s always TRUE. A contradiction is a proposition that’s always FALSE. p ppp  pp  pp  pp  p TF FT TTTT FFFF 30

Some Examples Example: Proof that [~p  (p  q)]  q is a tautology. Solution: To proof the tautology, we construct the truth table: True in all cases [~p  (p  q)]  q is a tautology.

Example: Express the following statement in symbolic notation: “If you are below 17 years old, then you may not vote in a general election, unless you are already married.” Some Examples Solution: Defining: p : You are below 17 years old. q : You are already married. r : You may vote in a general election. then the statement above can be express in symbolic notation as: (p  ~q)  ~r “If you are below 17 years old and are not already married, then you may not vote in a general election.”  r  (~p  q)

Argument Argument is a list of propositions written as: In this case, p 1, p 2, …, p n are denoted as hypothesis (premise) and q as conclusion (consequence) The value of an argument may be valid or invalid. It should be emphasized that valid does not necessarily means true.

Definition: An argument is valid if the conclusion is true, then all the hypotheses are true; otherwise the argument is invalid. Argument If an argument is true, then we can say “the conclusion logically follows the hypotheses; or equivalently showing that the implication: is true. An invalid argument shows false reasoning. (p 1  p 2    p n )  q

Argument Example: Show that the argument below is valid: “If the last digit of this number is a 0, then this number is divisible by 10.” “The last digit of this number is a 0.” “Therefore, this number is divisible by 10.” Solution: Assume: p : A last digit of this number is a 0. q : this number is divisible by 10. then the argument can be written as: p  qpqp  qpq There are two ways to proof the validity of the argument, both using the truth table, and will be discussed now.

Argument 1 st way: Constructing the truth table of p, q, and p  q, and analyzing case by case. :  If each case “If all hypotheses are true, then the conclusion is true” applies, then the argument is valid.  Let us check whether if hypotheses p  q and p are true, then the conclusion q is also true.  See line 1: p  q and p are true at the same time, and q in line 1 is also true.  The argument is v a l i d. p  qpqp  qpq

2 nd way: Showing that the truth table of [(p  q)  p]  q is a tautology. If the compound proposition is a tautology, then the argument is valid. p  qpqp  qpq  The argument is v a l i d. Argument

Show that the reasoning of the following argument is false, or the argument is invalid: “If the last digit of this number is a 0, then this number is divisible by 10.” “A number is divisible by 10.” “A last digit of this number is a 0.” Solution: Assume: p : A last digit of this number is a 0. q : A number is divisible by 10. then the argument can be written as: Argument p  qqpp  qqp  See line 3.  Conclusion p is false, even though all the hypotheses are true.  Thus, the argument is i n v a l i d.

2 nd way: Showing that the truth table of [(p  q)  q]  p is a tautology. If the compound proposition is a tautology, then the argument is valid. p  qqpp  qqp  The argument is i n v a l i d. Argument

The Connective Or in English In English “or” has two distinct meanings. –Inclusive Or: For p ∨q to be T, either p or q or both must be T Example: “CS 202 or Math 120 may be taken as a prerequisite.” Meaning: take either one or both –Exclusive Or (Xor). In p ⊕q, either p or q but not both must be T Example: “Soup or salad comes with this entrée.” Meaning: do not expect to get both soup and salad pqp ⊕q TTF TFT FTT FFF 401 July 2016

Logical operator for exclusive disjunction is xor, with the notation . Exclusive Disjunction 1 July

Homework(1) for Monday 4/11 Pages: 39, 40(Discrete mathematics and its applications, Sussana S.epp,2007) 1) Use truth tables to determine whether the following argument forms are valid

2) Some of the following arguments are valid while the others exhibit the converse or the inverse error. Use symbols to write the logical form of each argument. If the argument is valid, identify the rule of inference that guarantees its validity. Otherwise state whether the converse or the inverse error is made. a) If Jules solved his problem correctly, then Jules obtained the answer 2. Jules obtained the number 2 Jules solved this problem correctly b) This real number is rational or it is irrational. This real number is rational This real number is irrational

c) If this number is larger than 2, then its square is larger than 4. This number is not larger than 2. The square of this number is not larger than 4.

SOLUTION Homework(1) 1 July

1 July

1 July

First Exam 1 July

Remember 1 July