UNIT-I Statements and Notations Connectives Normal Forms

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

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 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
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.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
CS128 – Discrete Mathematics for Computer Science
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.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
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.
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.
Chapter 2: The Logic of Compound Statements 2.1 Logical Forms and Equivalence 12.1 Logical Forms and Equivalences Logic is a science of the necessary laws.
Adapted from Discrete Math
The Foundations: Logic and Proofs
Intro to Discrete Structures
Propositions and Truth Tables
Propositions and Truth Tables. Proposition: Makes a claim that may be either true or false; it must have the structure of a complete sentence.
The Foundations: Logic and Proofs
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
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
1 Propositional Logic Proposition 2 Propositions can be divided into simple propositions and compound propositions. A simple (or basic) proposition is.
Review I Rosen , 3.1 Know your definitions!
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.
Fallacies The proposition [(p  q)  q]  p is not a tautology, because it is false when p is false and q is true. This type of incorrect reasoning is.
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
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
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.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Section 1.2: Propositional Equivalences In the process of reasoning, we often replace a known statement with an equivalent statement that more closely.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
CS203 Discrete Mathematical Structures
LOGIC AND QUANTIFIERS. INTRODUCTION Many algorithms and proofs use logical expressions such as: “IF p THEN q” or “If p1 AND p2, THEN q1 OR q2” Therefore.
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.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
LECTURE 1. Disrete mathematics and its application by rosen 7 th edition THE FOUNDATIONS: LOGIC AND PROOFS 1.1 PROPOSITIONAL LOGIC.
Outline Logic Propositional Logic Well formed formula Truth table
رياضيات متقطعة لعلوم الحاسب 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 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.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
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
2. The Logic of Compound Statements Summary
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
G. Pullaiah College of Engineering and Technology
(CSC 102) Discrete Structures Lecture 2.
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Information Technology Department
CS201: Data Structures and Discrete Mathematics I
Foundations of Discrete Mathematics
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

UNIT-I Statements and Notations Connectives Normal Forms Theory of Inference

Deals with the methods of reasoning. Mathematical Logic Logic Deals with the methods of reasoning. Provides rules and techniques for determining whether a given argument is valid. Concerned with all kinds of reasonings Legal arguments. Mathematical proofs. Conclusions in scientific theory based upon set of hypotheses. Main aim Provide rules that determine whether any particular argument or reasoning is valid (correct).

Uses of Logic reasoning Mathematics to prove theorems. Computer Science to verify the correctness of programs and to prove theorems. Natural and Physical Sciences to draw conclusions from experiments. Social Sciences, and everyday lives to solve a multitude of problems.

Statements/Propositions and notations Primitive/Primary/Atomic statements Declarative statements: Cannot be further broken down or analyzed into simpler sentences Have one and only of two possible truth-values. true (T or 1) false (F or 0) Denoted by distinct symbols A, B, C, …, P, Q, …. Ex: P : The weather is cloudy. Q : It is raining today. R : It is snowing.

Truth Table Summary of the truth-values of the resulting statements for all possible assignments of values to the statements. Connectives Negation Conjunction Disjunction P,Q,……… Statements/Propositions

Negation (, ~, not, --) Truth Table Connective that modifies a statement. Unary operation operates on a single statement. Formed by introducing the word “not” at a proper place in the statement or by prefixing the statement with the phrase “It is not the case that”. ~P or not P. Truth Table P ~P T F

P: London is a city ~P :London is not a city ~P :It is not the case that London is a city P: I went to my class yesterday ~P : I did not go to my class yesterday ~P : I was absent from my class yesterday ~P : It is not the case that I went to my class yesterday

Conjunction () Truth Table P  Q (P and Q). Truth-value T whenever both P and Q have the truth-values T; otherwise truth-value F. Truth Table P Q P  Q T F

P : The weather is cloudy. Ex: P : The weather is cloudy. Q : It is raining today. P  Q : The weather is cloudy and it is raining today.

P: It is raining today Q: There are 20 tables in this room It is raining today and there are 20 tables in this room Jack and Jill went up the hill Jack went up the hill and Jill went up the hill P : Jack went up the hill Q : Jill went up the hill

Roses are red and violets are blue He opened the book and started to read Jack and Jill are cousins

Disjunction / inclusive or () P  Q (P or Q). Truth value F only when both P and Q have the truth value F; otherwise Truth-value T. Truth Table P Q P  Q T F

P : The weather is cloudy. Ex: P : The weather is cloudy. Q : It is raining today. P  Q : The weather is cloudy or it is raining today.

I shall watch the game on television or go to the game There is something wrong with the blub or with the wiring Twenty or thirty animals were killed in the fire today

Exclusive or Truth Table Either P is true or Q is true, but not both. P  Q T F

Implication or Conditional P  Q P premise, hypothesis, or antecedent of the implication. Q conclusion or consequent of the implication. Truth Table P Q P  Q T F

Valid principles of implication that are sometimes considered paradoxical. i) A False antecedent P implies any proposition Q. ii) A True consequent Q is implied by any proposition P. P implies Q if P then Q P only if Q P is a sufficient condition for Q Q is a necessary condition for P Q if P Q follows from P Q provided P Q is a consequence of P Q whenever P

P: the sun is shining today Q: 2 + 7 > 4 If the sun is shining today, then 2 + 7 > 4 “If I get the book , then I shall read it tonight” “If I get the book, then this room is red” “If I get the money, then I shall buy the car” “If I do not buy the car even though I get the money”

J: Jerry takes Calculus K: Ken takes Sociology L: Larry takes English If either Jerry takes Calculus or Ken takes Sociology, then Larry will take English J: Jerry takes Calculus K: Ken takes Sociology L: Larry takes English (J  K)  L The crop will be destroyed if there is a flood C: The crop will be destroyed F: There is a flood F  C

Biconditional Biconditional P  Q Conjunction of the conditionals P  Q and Q  P. True : when P and Q have the same truth-values. False : otherwise.  P if and only if Q - P iff Q - P is necessary and sufficient for Q P Q P  Q T F

Truth table Construct the truth table for the formula P Q P  Q Q  P P  Q T F Construct the truth table for the formula ~(P  Q)  (~P  ~Q)

Well-formed / Statement formulas (wff) / Formulas Expression consisting of statements (Propositions/variables) parentheses connecting symbols.

A statement variable standing alone is a well-formed formula. If A is a well-formed formula, then ~A is a well-formed formula. If A and B are well-formed formulas, then (A  B), (A  B), (A  B), and (A  B) are well-formed formulas. A string of symbols containing the statement variables, connectives, and parentheses is a well-formed formula, iff it can be obtained by finitely many applications of 1, 2, and 3 above.

Variables are propositions. Propositional Functions Variables are propositions. Truth Table P Q PQ ~P ~PQ ~Q ~Q~P Converse Q  P Opposite ~P  ~Q T T T F F T F F T F

Tautologies A statement formula which is true regardless of the truth values of the statements which replace the variables in it is called a universally valid formula or a tautology or a logical truth A statement formula which is false regardless of the truth values of the statements which replace the variables in it is called a contradiction A formula A is called a substitution instance of another formula B if A can be obtained from B by substituting formulas for some variables of B, with the condition that the same formula is substituted for the same variable each time it occurs. .

P F F T T Propositional functions of two variables: Q F T F T T T T T Universally true or Tautology F T T T (P  Q) 3 T F T T Q  P 4 F F T T (P) 5 T T F T P  Q 6 F T F T (Q) 7 T F F T P  Q 8 F F F T (P  Q) 9 T T T F ~(P  Q) 10 F T T F ~(P  Q) or P / Q 11 T F T F (~Q) 12 F F T F ~(P  Q) or P / Q 13 T T F F (~P) 14 F T F F ~(Q  P) or P / Q 15 T F F F ~(P  Q) 16 F F F F Universally false or contradiction

~(P  Q)  (~P)  (~Q) and ~(P  Q)  (~P)  (~Q) DeMorgan’s laws ~(P  Q)  (~P)  (~Q) and ~(P  Q)  (~P)  (~Q) Law of Double Negation P  ~(~P). (P  Q)  (~P)  Q (Law of implication) (P  Q)  (~P  ~P) (Law of contrapositive) Contrapositive Contrapositive of P  Q ~Q  ~P

Tautology / Identically True Converse Converse of P  Q Q  P Opposite/Inverse Opposite/Inverse of P  Q (~P)  (~Q) Tautology / Identically True Propositional function whose truth-value is true for all possible values of the propositional variables. Ex: P  ~P.

Contradiction / Absurdity / Identically False Propositional function whose truth-value is always false. Ex: P  ~P. Contingency Propositional function that is neither a tautology nor a contradiction. Tautologies 1. (P  Q)  P 2. (P  Q)  Q 3. P  (P  Q) 4. Q  (P  Q) 5. ~P  (P  Q) 6. ~(P  Q)  P 7. (P  (P  Q))  Q 8. (~P  (P  Q))  Q 9. (~Q  (P  Q))  ~P 10. ((P  Q)  (Q  R))  (P  R)

Equivalence implication Two well-formed formulas A and B are said to be equivalent, if the truth value of A is equal to the truth value of B for every one of the 2n possible sets of truth values assigned. Commutative Properties P  Q  Q  P P  Q  Q  P Associative Properties P  (Q  R)  (P  Q)  R P  (Q  R)  (P  Q)  R

P  P  P Distributive Properties Idempotent Properties P  (Q  R)  (P  Q)  (P R) P  (Q  R)  (P  Q)  (P  R) Idempotent Properties P  P  P P  P  P Properties of Negation ~(~P)  P ~(P  Q)  (~P)  (~Q) ~(P  Q)  (~P)  (~Q)

Tautological Implications A Statement P is said to tautologically imply a Statement Q if and only if PQ is a tautology. We shall denote this as P  Q. Here, P and Q are related to the extent that, Whenever P has the truth value T then so does Q. Every logical implication is an implication, but all implications are not logical implications.

Properties of operations on implication (P  Q)  ((~P)  Q) (P  Q)  (~Q  ~P) (P  Q)  ((P  Q)  (Q  P)) ~(P  Q)  (P  ~Q) ~(P  Q)  ((P  ~Q)  (Q  ~P)) P Q  (P  Q)  (~P  ~Q)

Let A(P1,P2,……, Pn) be a statement formula where P1,P2,……, Pn are the atomic variables. If we consider all possible assignments of the truth values to P1,P2,……, Pn and obtain the resulting truth values of the formula A. Such a truth table contains 2n rows. If A has the truth value T for at least one combination of truth values assigned to P1,P2,……, Pn then A is said to be satisfiable. The problem of determining , in a finite number of steps, whether a given statement formula is a tautology or a contradiction or at least satisfiabe is known as a decision problem.

Normal forms Elementary Product Product of the variables and their negations in a formula. Ex: P ~P  Q ~Q  P  ~P P  ~P Q  ~P

Sum of the variables and their negations in a formula. Elementary Sum Sum of the variables and their negations in a formula. Ex: P ~P  Q ~Q  P  ~P P  ~P Q  ~P Factor of the elementary sum or product any part of an elementary sum or product, which is itself is an elementary sum or product. Ex: Factors of ~Q  P  ~P ~Q P  ~P ~Q  P

A necessary and sufficient condition for an elementary product to be identically false is that it contain at least one pair of factors in which one is the negation of the other. A necessary and sufficient condition for an elementary sum to be identically true is that it contain at least one pair of factors in which one is the negation of the other.

Disjunctive Normal Forms A formula equivalent to a given formula and consists of a sum of elementary products of the given formula. Examples 1. Obtain Disjunctive Normal Form of P  (P  Q). P  (P  Q)  P  (~P  Q)  (P  ~P)  (P  Q)

2.Obtain Disjunctive Normal Form of ~(P  Q)  (P  Q).  (~(P  Q)  (P  Q))  ((P  Q)  ~(P  Q))  (~P  ~Q  P  Q)  ((P  Q)  (~P  ~Q) since [R  S  (R  S)  (~R  ~S)]  (~P  ~Q  P  Q)  ((P  Q)  (~P  ~Q))  (~P  ~Q  P  Q)  ((P  Q)  ~P)  ((P  Q)  ~Q)  (~P  ~Q  P  Q)  (P  ~P)  (Q  ~P)  (P  ~Q)  (Q  ~Q)

Conjunctive Normal Forms A formula equivalent to a given formula and consists of a product of elementary sums of the given formula. Examples 1. Obtain Conjunctive Normal Form of P  (P  Q). P  (P  Q)  P  (~P  Q)

2.Obtain Conjunctive Normal Form of ~(P  Q)  (P  Q).  (~(P  Q)  (P  Q))  ((P  Q)  ~(P  Q))  ((P  Q)  (P  Q))  (~(P  Q)  (~P  ~Q) since [R  S  (R  S)  (S  R)]  ((P  Q  P)  (P  Q  Q))  ((~P  ~Q)  (~P  ~Q)  (P  Q  P)  (P  Q  Q)  (~P  ~Q  ~P)  (~P  ~Q  ~Q)

3.Obtain Conjunctive Normal Form of Q  (P  ~Q)  (~P  ~Q).  Q  ((P  ~P)  ~Q)  (Q  (P  ~P))  (Q  ~Q)  (Q  P  ~P)  (Q  ~Q)

P {(P Q) ~(~Q  ~ P)) ~{P(QR)} (~P  ~ Q) (P  ~ Q) (P (Q R))(~P  (~Q  ~ R)) (~P  ~ Q) (P  ~ Q) (CNF)

Principal Disjunctive Normal Forms Let P and Q be two statement variables. Let us construct all possible formulas which consists of conjunctions of P or its negation and conjunctions of Q or its negation. None of the formulas should contain both a variable and its negation. Ex: either P  Q or Q  P is included but not both. For two variables P and Q , there are 22 such formulas given by P  Q, P  ~ Q , ~ P  Q and ~ P  ~ Q  these formulas are called minterms.

From the truth tables of these minterms, it is clear that no two minterms are equivalent Each minterm has the truth value T for exactly one combination of the truth values of the variables P and Q. For a given formula , an equivalent formula consisting of disjunction of minterms only is known as its principal disjunctive normal form. Also called sum-of –products canonical form.

Principal Conjunctive Normal Forms Let us construct all possible formulas which consists of conjunctions of P or its negation and conjunctions of Q or its negation. None of the formulas should contain both a variable and its negation. Ex: either P  Q or Q  P is included but not both. For two variables P and Q , there are 22 such formulas given by P  Q, P  ~ Q , ~ P  Q and ~ P  ~ Q  these formulas are called maxterms.

For a given formula , an equivalent formula consisting of conjunctions of maxterms only is known as its principal conjunctive normal form. Also called products-of-sums canonical form.

Obtain the principal disjunctive normal forms of the following. ~P  Q (P  Q)  (~P  R)  (Q  R). P  (~P(~Q ~R)) Obtain the principal conjunctive normal forms of the following. (~P  R)  (Q  P) (Q  P)  (~P  Q) Show that the following are equivalent formulas. P  (P  Q)  P P  (~P  Q)  P  Q

Theory of Inference The main function of the logic is to provide rules of inference, or principles of reasoning. The theory associated with such rules is known as inference theory because it is concerned with the inferring of a conclusion from certain premises. When a conclusion is derived from a set of premises by using the accepted rules of reasoning, then such a process of derivation is called a deduction or formal proof. In a formal proof, every rule of inference that is used at any stage in the derivation is acknowledged.

Theory of Inference Now we come to the questions of what we mean by the rules and theory of inference The rules of inference are criteria for determining the validity of an argument. These rules are stated in terms of the forms of the statements involved rather than in terms of the actual statements or their truth values.

Validity Using Truth Tables Let A and B be two statement formulas. We say that “ B logically follows from A” or “ B is a valid conclusion of the premise A” iff A  B is a tautology, that is A  B. From a set of premises {H1 , H2 , …. , Hn } a conclusion C follows logically iff H1  H2  ….  Hn  C ---------- (1) Given a set of premises and a conclusion, it is possible to determine whether the conclusion logically follows from the given premises by constructing truth tables “Truth table technique” for the determination of the validity of a conclusion

Validity Using Truth Tables Determine whether the conclusion C follows logically from the premises H1 and H2 . H1 : P  Q H2: P C: Q H1 : P  Q H2: ~P C: Q H1: P  Q H2: ~ (P  Q) C: ~P H1 : ~P H2:P  Q C:~ (P  Q) H1 : P  Q H2:Q C: P

Rules of Inference Rule P: A premise may be introduced at any point in the derivation Rule T: A formula S may be introduced in a derivation if S is tautologically implied by any one or more of the preceding formulas in the derivation

Exercises 1. Construct the truth tables for the following [(P  Q)  (~R)]  Q (P  Q)  (~P)  (~R)] {(P  Q)  (~P  R)}  (Q  R) [(P  Q)  (~R)]  (Q  R) 2. Prove that the following are tautologies: ~(P  Q)  [(~P)  Q]  P. [(P  Q)  (R  S)  (P  R)] (Q  S) [(P  R)  (Q  R)]  [(P  Q)  R] {(P  (Q  R)]  (~Q)} (P  R) {[(P  Q)  R]  (~P)} (Q  R) 3. Consider the propositions: P: David is playing pool. Q: David is inside. R: David is doing his homework. S: David is listening to music. Translate the following sentences into symbolic notation using P, Q, R, S, ~, ,  and parentheses only. Either David is playing pool or he is inside. Neither is David playing pool, nor he is doing his homework. David is playing pool and not doing his homework. David is inside doing his homework, not playing pool. David is inside doing his homework while listening to music. David is not listening to music, nor is he playing pool; neither is he doing his homework.

Brown ,Jones and Smith are suspected of income tax evasion Brown ,Jones and Smith are suspected of income tax evasion. They testify under oath as follows: Brown: Jones is guilty and Smith is innocent. Jones: If brown is guilty, then so is Smith. Smith: I am innocent but at least one of the others guilty. Questions are: 1. Assuming every body told the truth who is/ are innocent / guilty? 2. Assuming the innocent told the truth and guilty lied who is / are innocent / guilty?