module - 1 discrete mathematics and graph theory

Post on 13-Apr-2017

503 Views

Category:

Science

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

MAT-1014 Discrete Mathematics and Graph Theory

Faculty: Dr.D.EzhilmaranTeaching Research Associate: M.Adhiyaman

Department of Mathematics, School of Advanced Sciences, VIT-University,Tamil Nadu, India

ezhilmaran.d@vit.ac.in

January 31, 2017

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 1 / 43

Overview

1 Module -1 Mathematical logic and Statement CalculusIntroductionStatement and NotationsConnectivesTautologiesTwo State Devices and Statement LogicEquivalanceImplicationsNormal formsThe Theory of Inference for the Statement Calculus

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 2 / 43

Basics of proof techniques

Definition 1. (Proposition)A statement or proposition is a declarative sentence that is either true orfalse (but not both).

For instance, the following are propositions:1. 3 > 1 (true).2. 2 < 4 (true).3. 4 = 7 (false)

However the following are a not propositions:1. x is an even number.2. what is your name?.3. How old are you?.4. Close the door.5. Wow! Wonderful statue.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 3 / 43

Definition 2. (Atomic statements)Declarative sentences which cannot be further split into simple sentencesare called atomic statements (also called primary statements or primitivestatements).

Example: p is a prime number

Definition 3. (Compound statements)New statements can be formed from atomic statements through the use ofconnectives such as ”and, but, or etc...” The resulting statement are calledmolecular or compound (composite) statements.

Example: If p is a prime number then, the divisors are p and 1 itself

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 4 / 43

Definition 4. (truth value)The truth or falsehood of a proposition is called its truth value.

Definition 5. (Truth Table)A table, giving the truth values of a compound statement interms of itscomponent parts, is called a Truth Table.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 5 / 43

Definition 6. (Connectives)

Connectives are used for making compound propositions. The main onesare the following (p and q represent given two propositions):

Table 1. Logic Connectives

Name Represented Meaning

Negation ¬p not in pConjunction p ∧ q p and qDisjunction p ∨ q p or q (or both)Implication p → q if p then qBiconditional p ↔ q p if and only if q

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 6 / 43

The truth value of a compound proposition depends only on the value ofits components. Writing F for false and T for true, we can summarize themeaning of the connectives in the following way:

p q ¬p p ∧ q p ∨ q p → q p ↔ q

T T F T T T TT F F F T F FF T T F T T FF F T F F T T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 7 / 43

Definition 7. (Tautology)A proposition is said to be a tautology if its truth value is T for anyassignment of truth values to its components.

Example: The proposition p ∨ ¬p is a tautology.

Definition 8. (Contradiction)A proposition is said to be a contradiction if its truth value is F for anyassignment of truth values to its components.

Example: The proposition p ∧ ¬p is a contradiction.

Definition 9.(Contingency)A proposition that is neither a tautology nor a contradiction is called acontingency.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 8 / 43

p ¬p p ∧¬p p ∨¬pT F F TT F F T

p q p ∨ q ¬p (p ∨ q) ∨ (¬p)

T T T F TT F T F TF T T T TF F F T T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 9 / 43

I. Construct the truth table for the following statements

(i) (p → q) ←→ (¬p ∨ q)

(ii) p ∧ (p ∨ q)

(iii) (p → q) → p

(iv) ¬ (p ∧ q) ←→ (¬ p ∨ ¬ q)

(v) (p ∨ ¬q) → q

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 10 / 43

Solutions

(i) Let S = (p → q) ←→ (¬p ∨ q)

p q ¬p p → q ¬p ∨ q S

T T F T T TT F F F F TF T T T T TF F T T T T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 11 / 43

(ii) Let S = p ∧ (p ∨ q)

p q p ∨ q S

T T T TT F T TF T T FF F F F

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 12 / 43

(iii) Let S = (p → q) → p

p q p → q S

T T T TT F F TF T T FF F T F

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 13 / 43

(iv) Let S = ¬ (p ∧ q) ←→ ¬ p ∨ ¬ q

p q p ∧ q ¬ (p ∧ q) ¬p ¬q ¬ p ∨ ¬ q S

T T T F F F F TT F F T F T T TF T F T T F T TF F F T T T T T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 14 / 43

(v) Let S = (p ∨ ¬q) → q

p q ¬q p ∨ ¬q S

T T F T TT F T T FF T F F TF F T T F

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 15 / 43

Implications

S.No Formula Name

1 p ∧ q ⇒ p simplificationp ∧ q ⇒ q

2 p ⇒ p ∨ q additionq ⇒ p ∨ q

3 p, q ⇒ p ∧ q4 p, p → q ⇒ q modus ponens5 ¬p, p ∨ q ⇒ q disjunctive syllogism6 ¬q, p → q ⇒ ¬p modus tollens7 p → q , q → r ⇒ p → r hypothetical syllogism

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 16 / 43

Logical Equivalence

The compound propositions p → q and ¬p ∨ q have the same truthvalues:

p q ¬p p → q ¬p ∨ q

T T F T TT F F F FF T T T TF F T T T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 17 / 43

When two compound propositions have the same truth value they arecalled logically equivalent.

For instance p → q and ¬p ∨ q are logically equivalent, and it is denotedby

p → q ⇔ ¬p ∨ q

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 18 / 43

Definition 10. (Logically Equivalent)Two propositions A and B are logically equivalent precisely when A ⇔ Bis a tautology.

Example: The following propositions are logically equivalent:p ↔ q ⇔ (p → q) ∧ (q → p)

p q p ↔ q p → q q → p (p → q) ∧ (q → p) S

T T T T T T TT F F F T F TF T F T F F TF F T T T T T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 19 / 43

Table 2. Logic equivalences

Equivalences Name

p ∧ T ⇔ p Identity lawp ∨ F ⇔ p

p ∨ T ⇔ T Dominent lawp ∧ F ⇔ F

p ∨ p ⇔ p Idempotent lawp ∧ p ⇔ p

p ∨ q ⇔ q ∨ p Commutative lawp ∧ q ⇔ q ∧ p

(p ∨ q) ∨ r ⇔ p ∨ (q ∨ r) Associative law(p ∧ q) ∧ r ⇔ p ∧ (q ∧ r)

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 20 / 43

Table 2. Logic equivalences (Continued...)

Equivalences Name

(p ∨ q) ∧ r ⇔ (p ∧ r) ∨ (q ∧ r) Distributive law(p ∧ q) ∨ r ⇔ (p ∨ r) ∧ (q ∨ r)

(p ∨ q) ∧ p ⇔ p Absorbtion law(p ∧ q) ∨ p ⇔ p

¬ (p ∧ q) ⇔ ¬ p ∨ ¬ q De morgan’s law¬ (p ∨ q) ⇔ ¬ p ∧ ¬ q

¬ p ∧ p ⇔ F Negation law¬ p ∨ p ⇔ T¬ (¬ p ) ⇔ p

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 21 / 43

Table 3. Logic equivalences involving implications

Implications

p → q ⇔ ¬p ∨ q

p → q ⇔ ¬q → ¬p¬(p → q) ⇔ p ∧ ¬qp ∨ q ⇔ ¬p → q

p ∧ q ⇔ ¬(p → ¬q)

(p → q) ∧ (p → r) ⇔ p → (q ∧ r)

(p → q) ∨ (p → r) ⇔ p → (q ∨ r)

(p → r) ∧ (q → r) ⇔ (p ∨ q)→ r)

(p → r) ∨ (q → r) ⇔ (p ∧ q)→ r)

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 22 / 43

Table 4. Logic equivalences involving Biconditions

Biconditions

p ↔ q ⇔ (p → q) ∧ (q → p)

p ↔ q ⇔ ¬p ↔ ¬qp ↔ q ⇔ (p ∧ q) ∨ (¬p ∧ ¬q)

¬(p ↔ q) ⇔ p ↔ ¬q

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 23 / 43

Converse, Inverse, Contrapositive

Definition 11. (Converse)The converse of a conditional proposition p → q is the proposition q→ p

Definition 12. (Inverse)The inverse of a conditional proposition p → q is the proposition¬ p→¬ q

Definition 13. (Contrapositive)The contrapositive of a conditional proposition p → q is the proposition¬ q→¬ p.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 24 / 43

Example 1

Let us consider the statement,”The crops will be destroyed, if there is a flood.”Let F : there is a flood & C : The crops will be destroyedThe symbolic form is, F → C .Converse (C→F )

i.e., ”if the crops will be destroyed then there is flood.”Inverse (¬F→¬C )

i.e.,”if there is no flood then the crops won’t be destroyed, .”Contrapositive (¬C→¬F )

i.e., ”if the crops won’t be destroyed then there is no flood.”

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 25 / 43

Example 2

If two angles are congruent, then they have the same measure.Converse If two angles have the same measure, then they are congruent.Inverse If two angles are not congruent, then they do not have the samemeasure.Contrapositive If two angles do not have the same measure, then they arenot congruent.

Example 3

It rains,They cancel schoolConverse If they cancel school, then it rains.Inverse If it does not rain, then they do not cancel schoolContrapositive If they do not cancel school, then it does not rain.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 26 / 43

Inference Theory for Statement Calculus

An argument is a sequence of propositions H1,H2, . . . ,Hn called premises(or hypotheses) followed by a proposition C called conclusion. Anargument is usually written:

H1

H2...Hn

implies C

orH1∧H2∧ . . . ∧Hn ⇒ C

The argument is valid if C is true whenever H1,H2, ...,Hn are true;otherwise it is invalid.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 27 / 43

Example: H1 : p and H2 : p → q then C : q (Modus Ponens)

p q p → q p ∧ (p → q) (p ∧ (p → q))→ q

T T T T TT F F F TF T T F TF F T F T

Notice that (p ∧ (p → q))→ q is a tautology. Therefore it is valid.Thus p, p → q ⇒ q.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 28 / 43

Example: H1 : q and H2 : p → q then C : p

p q p → q q ∧ (p → q) (q ∧ (p → q))→ p

T T T T TT F F F TF T T T FF F T F T

Notice that q ∧ (p → q)→ p is a condigency. Therefore it is invalid.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 29 / 43

Implication Table:

S.No Formula Name

1 p ∧ q ⇒ p simplificationp ∧ q ⇒ q

2 p ⇒ p ∨ q additionq ⇒ p ∨ q

3 p, q ⇒ p ∧ q4 p, p → q ⇒ q modus ponens5 ¬p, p ∨ q ⇒ q disjunctive syllogism6 ¬q, p → q ⇒ ¬p modus tollens7 p → q , q → r ⇒ p → r

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 30 / 43

Rules of inference:

Rule P: A premises can be introduced at any step of derivation.

Rule T: A formula can be introduced provided it is Tautologically impliedby previously introduced formulas in the derivation.

Rule CP: If the conclusion is of the form r → s then we include r as anadditional premises and derive s.

Indirect method: We use negation of the conclusion as an additionalpremise and try to arrive a contradiction.

Inconsistent: A set of premises are inconsistent provided their conjunctionimplies a contradiction.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 31 / 43

Example: Show that ¬q and p → q implies ¬p.

Solution: (A formal proof is as follows):

Step 1. p → q Rule P

Step 2. ¬q → ¬p Rule T

Step 3. ¬q Rule P

Step 4. ¬p Combined {2, 3} and apply Modus Ponens

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 32 / 43

Example: Show that r is a valid inference from the premises p → q, q → rand p.Solution:

Step Derivation Rule

1 p P2 p → q P3 q {1, 2}, I44 q → r P5 r {3, 4}, I4

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 33 / 43

Example: Show that s ∨ r is tautologically implied by p ∨ q, p → r andq → s.Solution:

Step Derivation Rule

1 p ∨ q P2 ¬p → q T3 q → s P4 ¬p → s {2, 3}, I75 ¬s → p T6 p → r P7 ¬s → r {5, 6}, I78 s ∨ r T

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 34 / 43

Example: Prove by indirect method that p → q, p ∨ r ,¬q implies r .Solution: The desired result is r . Include ¬r as a new premise.

Step Derivation Rule

1 p ∨ r P2 ¬r → p T3 ¬r P(additional premise)4 p {2, 3}, I45 p → q P6 q {4, 5}, I47 ¬q P8 q ∧ ¬q {6, 7}, I3

The new premise together with the given premises, leads to acontradiction. Thus p → q, p ∨ r ,¬q implies r .

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 35 / 43

Example: Prove that p → q, p → r , q → ¬r and p are inconsistent.Solution: The desired result is false.

Step Derivation Rule

1 p P2 p → q P3 q {1, 2}, I44 q → ¬r P5 ¬r {3, 4}, I46 p → r P7 ¬p {5, 6}, I68 F {1, 7},I3

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 36 / 43

III. Problems:

(i) Show that r ∨ s is tautologically implied byc ∨ d , (c ∨ d)→ ¬h,¬h→ (a ∧ ¬b) and (a ∧ ¬b)→ (r ∨ s).

(ii) Show that r ∧ (p ∨ q) is tautologically implied by p ∨ q, q → r , p → mand ¬m.

(iii) Show that r → s is tautologically implied by ¬r ∨ p, p → (q → s) andq.

(iv) Show that p → s is tautologically implied by ¬p ∨ q, ¬q ∨ r andr → s.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 37 / 43

(v) Show that p → (q → s) is tautologically implied by p → (q → r) andq → (r → s) using CP rule.

(vi) Show that the following premises are inconsistent.v → l , l → b, m→ ¬b and v ∧m.

(vii) Show that p → ¬s logically follows from the premisesp → (q ∨ r), q → ¬p, s → ¬r and p by indirect method.

(viii) Show that r logically follows from the premises p → q, ¬q and p ∨ rby indirect method.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 38 / 43

Example: Consider the following statements: ’I take the bus or I walk. If Iwalk I get tired. I do not get tired. Therefore I take the bus.’ We canformalize this by calling B= I take the bus, W= I walk and J= I get tired.The premises are B ∨W , W → J and ¬J, and the conclusion is B. Theargument can be described in the following steps:

step statement reason

1 W → J P2 ¬J P3 ¬W {1, 2}, Modus Tollens4 B ∨W P5 B {3, 4}, Disjunctive Syllogism

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 39 / 43

(i) Show that the following set of premises is inconsistent.1. If Jack misses many classes through illness, then he fails high school.2. If Jack fails high school, then he is uneducated.3. If Jack reads a lot of books, then he is not uneducated.4. Jack misses many classes through illness and reads a lot of books.

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 40 / 43

Let us consider,E : Jack misses many classes through illnessS : Jack fails high schoolA : Jack reads a lot of booksH : Jack is uneducated.The premises are,

E → S

S → H

A→ ¬H and

E ∧ A

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 41 / 43

Let us consider,E : Jack misses many classes through illnessS : Jack fails high schoolA : Jack reads a lot of booksH : Jack is uneducated.The premises are,

E → S

S → H

A→ ¬H and

E ∧ A

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 41 / 43

Let us consider,E : Jack misses many classes through illnessS : Jack fails high schoolA : Jack reads a lot of booksH : Jack is uneducated.The premises are,

E → S

S → H

A→ ¬H and

E ∧ A

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 41 / 43

Let us consider,E : Jack misses many classes through illnessS : Jack fails high schoolA : Jack reads a lot of booksH : Jack is uneducated.The premises are,

E → S

S → H

A→ ¬H and

E ∧ A

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 41 / 43

Let us consider,E : Jack misses many classes through illnessS : Jack fails high schoolA : Jack reads a lot of booksH : Jack is uneducated.The premises are,

E → S

S → H

A→ ¬H and

E ∧ A

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 41 / 43

Step Derivation Rule

1 E ∧ A P2 E T3 A T4 E → S P5 S {2, 4}, I46 S → H P7 H {5, 6}, I48 A→ ¬H P9 ¬H {3, 8}, I4

10 H ∧ ¬H {7, 9}, I3

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 42 / 43

For further queriesProf.Dr.D.Ezhilmaran, Ph.D.,Assistant Professor (Senior),Department of Mathematics,Vellore Institute of Technology, Tamilnadu, India.E-mail.ID : ezhilmaran.d@vit.ac.in

Faculty: Dr.D.Ezhilmaran Teaching Research Associate: M.Adhiyaman (VIT)Discrete Mathematics January 31, 2017 43 / 43

top related