Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

Logic ChAPTER 3.
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
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.
Chapter 2. Logic Weiqi Luo ( 骆伟祺 ) School of Software Sun Yat-Sen University : Office : A309
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.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
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
TRUTH TABLES. Introduction Statements have truth values They are either true or false but not both Statements may be simple or compound Compound statements.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
The Foundations: Logic and Proofs
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Propositions and Truth Tables
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 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
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.
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Discrete Maths 2. Propositional Logic Objective
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Discrete Mathematics and Its Applications
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
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.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
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.
Chapter 2: The Logic of Compound Statements 2.2 Conditional Statements
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Chapter 7 Logic, Sets, and Counting
Conditional Statements
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,
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
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
Conditional Statements – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Conditional Statements Reading: Kolman, Section 2.2.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
Logical Operations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Logical Operations Reading: Kolman, Section 2.1.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
رياضيات متقطعة لعلوم الحاسب 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.
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Propositional and predicate logic
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
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Simple Logic.
2. The Logic of Compound Statements Summary
CSNB 143 Discrete Mathematical Structures
2.1 Propositions and Logical Operations
2 Chapter Introduction to Logic and Sets
Information Technology Department
1 Chapter An Introduction to Problem Solving
1 Chapter An Introduction to Problem Solving
Presentation transcript:

Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures

OBJECTIVES Student should be able to know what is it means by statement. Students should be able to identify its connectives and compound statements. Students should be able to use the Truth Table without difficulties.

Logic Statement or proposition is a declarative sentence with the value of true or false but not both. Ex 1: Which one is a statement? The world is round = 5 Have you taken your lunch? 3 - x = 5 The temperature on the surface of Mars is 800F. Tomorrow is a bright day. Read this!

Statement usually will be replaced by variables such as p, q, r or s. Ex 2: p: The sun will shine today. q: It is a cold weather. Statements can be combined by logical connectives to obtain compound statements. Ex 3: AND (p and q): The sun will shine today and it is a cold weather.

Connectives AND is what we called conjunction for p and q, written p  q. The compound statement is true if both statements are true. Connectives OR is what we called disjunction for p and q, written p  q. The compound statement is false if both statements are false. To prove the value of any statement (or compound statements), we need to use the Truth Table.

PQ P  QP  Q TTTT TFFT FTFT FFFF

Negation for any statement p is not p. written as ~p or  p. The Truth Table for negation is: Ex 4: Find the value of (~p  q)  p using Truth Table. P˜ P TF FT

PQ ˜ P  Q(˜ P  Q)  P TTFFT TFFFT FTTTT FFTFF

Conditional Statements If p and q are statements, the compound statement if p then q, denoted by p  q is called a conditional statement or implication. Statement p is called the antecedent or hypothesis; and statement q is called consequent or conclusion. The connective if … then is denoted by the symbol . Ex 5: a) p : I am hungryq : I will eat b) p : It is cold q : = 8 The implication would be: a) If I am hungry, then I will eat. b) If it is cold, then = 8.

Take note that, in our daily lives, Ex 5 b) has no connection between statements p and q, that is, statement p has no effect on statement q. However, in logic, this is acceptable. It shows that, in logic, we use conditional statements in a more general sense. Its Truth Table is as below: To understand, use:p = It is raining q = I used umbrella PQP  Q TTT TFF FTT FFT

Another meaning that use the symbol  includes: if p, then q p implies q if p, q p only if q p is sufficient for q q if p q is necessary for p

If p  q is an implications, then the converse of it is the implication q  p, and the contrapositive of it is ~q  ~p. Ex 6: p = It is rainingq = I get wet Get its converse and contrapositive.

If p and q are statements, compound statement p if and only if q, denoted by p  q, is called an equivalence or biconditional. Its Truth Table is as below: To understand, use:p = It is raining q = I used umbrella Notis that p  q is True in two conditions: both p and q are True, or both p and q are false. PQ P  Q TTT TFF FTF FFT

Another meaning that use the symbol  includes: p is necessary and sufficient for q if p, then q, and conversely In general, compound statement may contain few parts in which each one of it is yet a statement too. Ex 7: Find the truth value for the statement (p  q)  (~q  ~p)

PQP  Q (A) ˜Q˜P˜Q  ˜P (B) (A)  (B) TTTFFTT TFFTFFT FTTFTTT FFTTTTT A statement that is true for all possible values of its propositional variables is called a tautology.

A statement that is always false for all possible values of its propositional variables is called a contradiction. A statement that can be either true or false, depending on the truth values of its propositional variables is called a contingency

Logically Equivalent Two statements p and q are said to be logically equivalent if p  q is a tautology. Ex 8: Show that statements p  q and (~p)  q are logically equivalent.

Quantifier Quantifier is used to define about all elements that have something in common. Such as in set, one way of writing it is {x | P(x)} where P(x) is called predicate or propositional function, in which each choice of x will produces a proposition P(x) that is either true or false.

There are two types of quantifier being used: a) Universal Quantification (  ) of a predicate P(x) is the statement “For all values of x, P(x) is true” In other words: for every x every x for any x

b) Existential Quantification (  ) of a predicate P(x) is the statement “There exists a value of x for which P(x) is true” In other words: there is an x there is some x there exists an x there is at least one x

Theorem 1 Operations on statements are: Commutative p  q  q  p p  q  q  p Associative p  (q  r)  (p  q)  r p  (q  r)  (p  q)  r Distributive p  (q  r)  (p  q)  (p  r) p  (q  r)  (p  q)  (p  r)

Idempotent p  p  p p  p  p Negation’s ~(~p)  p ~(p  q)  (~p)  (~q) ~(p  q)  (~p)  (~q)

Theorem 2 Operations on implications are: (p  q)  ((~p)  q) (p  q)  ((~q)  ~p) (p  q)  ((p  q)  (q  p)) ~(p  q)  (p  ~q) ~(p  q)  ((p  ~q)  (q  ~p))

Theorem 3 Operations on quantifier are: ~(  x P(x))   x ~P(x) ~(  x ~P(x))   x P(x)  x (P(x)  Q(x))   x P(x)   x Q(x)  x P(x)   x Q(x)   x (P(x)  Q(x))

 x (P(x)  Q(x))   x P(x)   x Q(x)  x (P(x)  Q(x))   x P(x)   x Q(x) ((  x P(x))  (  x Q(x)))   x (P(x)  Q(x))tautology  x (P(x)  Q(x))   x P(x)   x Q(x)tautology

Theorem 4 All of these are tautology: a) (p  q)  p f) (p  q)  p b) (p  q)  qg) (p  (p  q))  q c) p  (p  q)h) (~p  (p  q))  q d) q  (p  q) i) (~q  (p  q))  ~p e) ~p  (p  q) j) ((p  q)  (q  r))  (p  r)