You are on page 1of 56

Celestine Bernard

LOGIC Statement: Any meaningful sentence. Any sentence with subject, predicate and verb Ex: 1) Canada is a country 2)1+101=110 3) X=2 is a solution of =4.

Compound proposition: A proposition consists of two or more simple propositions.

Ex: Consider any two propositions. 1) Roses are red in color. 2) Shirt is blue in color Then the compound proposition is Roses are red and shirts are blue in color.

Connectors: 1. Disjunction: Symbol: [V] Operator name: And Consider two propositions P and Q. The symbolic representation will be PVQ

Example: P: It is raining today Q: There are ten tables in this room.

P V Q: it is raining today or there are Ten tables are in this room.

Truth table: P T T F F Q T F T F PVQ T T T F

2) Conjunction: Symbol: [] Operator name: OR Explanation: Consider any two propositions P and Q Then the Symbolic representation will be PQ

Example: P: It is raining today. Q: there are ten tables in this room.

P Q: It is raining today and there are ten tables in this room.

Q P: there are ten tables in this room And it is raining today.

Truth table:

P T T F F

Q T F T F

PQ T F F F

3. Negation: Symbol: ~ Operator name: negation

Explanation: Consider a proposition P The symbolic representation will be ~P Example: P: London is a city ~P: London is not a city. Truth table: P T F ~P F T

Conditional Propositions: Symbol: P Q (If P then Q)


Truth table:

P T T F F Ex:

Q T F T F

PQ T F T T

P: 3=8 .F Q: 3+5=8 .T PQT If 3=8 then 3+5=8.

Biconditional propositions: Symbol: P Q (P if and only if Q)


Truth table:

P T T F F

Q T F T F

PQ T F F T

NOTE: P Q is direct proposition. Q P is transverse of P Q. ~P ~Q is inverse function. ~Q ~P is contra positive.

Q P ~P ~Q (Transverse Inverse) P Q ~Q ~P (Direct Proposition Contra positive) P Q (P Q) (Q P) (Biconditional Direct Prop., transverse)

Examples: 1) Construct truth table: Q (P Q) P P T T F F Q T F T F PQ Q(PQ) Q(PQ)P T T T F F T T T F F F T

2) (P Q) (Q P) Truth table: P T T F F Q T F T F PQ (QP) (PQ)(QP) T T T T F F F T F T T T

3) ~( P Q) (~P V ~Q)
P Q ~P ~Q (~PV~Q) PQ ~(PQ) ~(PQ)(~PV~Q)

T T F F

T F T F

F F T T

F T F T

F T T T

T F F F

F T T T

T T T T

Logical Equivalence: Suppose that compound propositions P and Q are made up of the propositions P1, P2,P3,. Pn Then P Q provided that given any truth values of P1, P2, P3 ,.P n either P and Q are both true or P and Q both false.

Properties of Equivalence: Idempotent law: Disjunction PVPP Associative law: Disjunction (P V Q) V R P V (Q V R) Conjunction (P Q) R P (Q R) Commutative law: Disjunction (P V Q) (Q V P) Conjunction (P Q) (Q P) Conjunction PPP

Distributive law: Disjunction P V (Q R) (P V Q) (P V R) Conjunction P (Q V R) (P Q) V (P R) Identity law: Disjunction TVPT FVPP Component law: Disjunction P V ~P T ~T F Conjunction P ~P F ~F T Conjunction TPP FPF

Absorption law: Disjunction P V( P V Q) P Conjunction P ( P Q) P DE Morgans law: Disjunction ~(P V Q) ~P ~Q Conjunction ~(P Q) ~P V ~Q Innovation law: ~(~P) P

Tautologies and Contradictions: Tautology: A statement is called a tautology (or) a universally valid formula (or) logically truth when the last column of the statement is true. Cheat sheet value: Last column will be true Ex: Find the tautology and contradiction. 1) P (PVQ) Sol: P Q T T T F F T F F Ans: Its a Tautology PVQ T T T F P(PVQ) T T T T

Contradiction: A statement is called a contradiction if the last column of the statement. Cheat sheet value: Last column will be false

Ex: 1) Find the tautology and contradiction. (~Q P) Q Sol: P T T F F Q T F T F ~Q F T F T (~QP) (~QP)Q T F T F T F F F

Ans: Its a contradiction

Tautology (or) Contradiction: Cheat sheet value: Last column will have Both (True and False) values

Ex: 1) Find the tautology and contradiction P T T F F Ans: Its neither tautology nor contradiction. Q T F T F PQ T F F F (PQ)P T F T T

Exercise: 1) Construct truth table for the following. And find whether it is tautology or contradiction. (P~P)~P (~PQ)(QP) [P(QR)][(PQ)(PR)] [P(PQ)](PQ) [(PQ)]*(PQ)V(~P~Q)+

Substitution instance: A formula X is called a substitution instance of another formula Y, If X can be obtain from Y by substituting formulas for some variables of Y. Ex: P V Q ~(~P) V ~(~Q) Important substitution formulae:
P Q (PQ) V (Q P) P Q ~P V Q

Cheat sheet value: Any substitution instance of a tautology is tautology

Replacement process: It is just like substitution instance. You can replace a formula by another formula if it equals. Ex: P Q (P V Q) Q

Example sum: Show that P(QR) (P(~Q VR)) ((PQ) R) Sol: There are three parts. Consider any two statements and prove. P (QR) P (~Q V R) ~P V (~QVR) Using PQ ~P V Q (~P V~Q) V R Using associative property
(P V Q) V R P V (Q V R) ~ (P Q) V R Using DE Morgans law ~P V ~Q ~ (P Q)

(P Q) R Using ~P V Q P Q

2. Show that {(PVQ) ~ [P (~QV~R)]} V {(~P~Q) V (~P~R)} is a tautology Sol: This statement has two parts. So take the first part and reduce it. Same way do it for the second one. Finally combine those two equations and make that as true. (PVQ) [~P (~Q V~R)] (PVQ) ~ (~P ~ (Q R)) Using DE Morgans law (PVQ) ~~ (PV (QR))

Using DE Morgans law (PVQ) (PV (QVR)) Using ~~PP (PVQ) * (PVQ) (PVR) + Using distributive law *(PVQ) (PVQ)+ (PVR) Using associative law (PVQ) (PVR) .(1) Now, Take the second part and reduce it. *(~P~Q) V (~P~R)+ ~ (PVQ) V ~ (PVR) Using DE Morgans law ~ *(PVQ) (PVR)+. (2)

Combine equations 1 & 2 [(PVQ) (PVR)]V ~ *(PVQ) (PVR)+ We know that P V ~P T PV~P T So it is a tautology.

For more formulae. Refer CHEAT SHEET Attached with this short notes

Duality law: Two formulae A and A* are said to be duals of each other if either one can be obtained from other one by replacing V by and by V. The connectives V and are known as duals of each other.

Cheat sheet value: Replace... V by by V T by F F by T

Example: Write the duals for the following. 1) (PVQ) R (PQ) V R 2) (PQ) V T (PVQ) F Sol: 1) (PQ)V R (PVQ) R 2) (PVQ) F (PQ) V T

Cheat sheet value: Proving methods: Consider a question like this Prove that A B CQ

Method I By using property of equivalence Ex: Associative law, DE Morgans law

Method II By using tautology (i.e) make AB and CD as true. Ex: AB T CD T Here you can write ABCD

Example for Method 2: Prove that P (QP) [~P (PQ)] Sol: Method II P (QP) ~P V (~QVP) (~PVP) V ~Q T V~Q T ..(1) [~P(PQ)]~P(~PVQ) PV(~PVQ) (P V~P) VQ T VQ T (2) From 1 & 2, P (QP) [~P (PQ)]

Example for method I: Prove that P(QVR) (P Q) V(PR) Sol: R.H.S (PQ)V(PR) (~PVQ) V (~PVR) (~PV~P) V(QVR) ~P V (QVR) P(QVR) L.H.S

Tautological implications: A statement M is said to be tautologically implied to a statement N if and only if MN is a tautology.
Tautological implications: PQ P PQ Q PPVQ ~P P Q Q P Q ~ (P Q) P ~ (P Q) ~Q P ( P Q) Q ~ Q ( P Q) ~P ~P ( P V Q) Q ( P Q) (Q R) PR ( P V Q) (P R) (Q R) R

Cheat sheet value: PQ P consequent

Antecedent

Proof: 1) PQ P Sol: P T T F F Q T F T F PVQ T F F F P V QP T T T T

It is a tautology. Therefore PQP Same way we can prove all statements.

Normal forms:

DNF :( Disjunctive Normal Form) Cheat sheet value: DNF is not unique It should have only and V symbols It shouldnt have any other symbols Ex: and Syntax: ( A ...) V (...B...)

Example: Find DNF of the following (I) P(PQ) (II) P[(PQ)~(~QV~P)+

Sol: (i) P(PQ) P (~PVQ) (PV~P) V (PVQ).. (DNF) P[(PQ)(~Q~P)+ ~PV [(PQ) (~Q~P)+ ~PV *(~PVQ) ~~ (QVP)+ ~PV *(~PVQ) (PVQ)+ ~PV *(~PVQ) (PQ)+ ~PV ,*~P (PQ)+ V *Q (PQ)+Using distributive law ~PV *(~PPQ) V (QPQ)+ ~PV *(TQ) V (PQ)+ ~PV *F V (QP)+ ~PV (QP) (DNF)

(ii) Sol:

Conjunctive normal form (CNF): Cheat sheet value: ( A ) ( B ) It should have only and V symbols It shouldnt have any other symbols Ex: and

Example: Find the CNF for the following a) P(PQ) b) *P~(PVR)+V , *(PQ)V~R+ PSol: a) P(PQ) P (~P V Q). (CNF)

b) *P~(PVR)+V { *(PQ)V~R+ P*P~ (PVR)+V ,*(PQ) V~R+ P*P (~P~R)+V ,*(PQ) P] V [~RP+- using distributive law *(P~P) ~R+V ,*(PP) Q+ V *~RP+*F~R+ V *(PQ) V (~RP)+ F V *(PQ) V (~RP)+ (PQ) V (~RP) .. (CNF)

Principle disjunctive normal form (PDNF): Let P and Q be two statement variables. Let us construct all possible formulas which consist of P, ~P, Q, ~Q. The possible forms are PQ, ~PQ, P~Q, ~P~Q These formulas are called minterms or Boolean conjunctions. For a given formula, an equivalent formula consisting of disjunctions of minterms only is known as its PDNF. Such a normal form is also called the Sum of products canonical form. Cheat sheet value(PDNF): Syntax: (V) (V) (V)

Obtain PDNF for the following. 1) ~P V Q 2) (PQ) V (~PR) V (QR) Sol: 1) ~P V Q Introduce a variable T (~PVT) V (QVT) Introduce the missing variable using component law. [~PV (~QVQ)] V [QV (PV~P)] (~PQ) V (~P~Q) V (QP)V(Q~P) Using distributive law (~PQ) V (~PV ~Q) V (QP) If a minterm repeats just negate 1 PDNF

2) (PQ) V (~PR) V (QR) Introduce the new variable T *(PQ)T+V*(~PR)T+ V*(QR) T+ *(PQ) (RV~R)+V*(~PR)(QV~Q)+ V *(QR)(PV~P)+ (PQR) V (PQ~R) V(~PR~Q) V (~PR~Q) V(QRP)V (QR~P) Using distributive law. If a minterm repeats just negate 1. (PQR) V (PQ~R) V (~PQR) V (~P~QR) PDNF

Principle conjunctive normal form (PCNF): Let us consider two variables P & Q Let us write all possible maxterms. The maxterms are, PVQ ~P V ~Q ~P V Q P V ~Q For a given formula, an equivalent formula consisting of conjunctions of maxterms only is known as its PCNF. This form is also called as the product of sums of canonical form. Cheat sheet value: Syntax: () V () V()

Example: Obtain PCNF for the following. PQ Sol: Step 1: construct the truth table P Q Minterms T T PQ T F P ~Q F T ~PQ F F ~P~Q *T=P & F=~P *T=Q & F=~Q Step 2: Write down the minterms which has true value and make that as A A (PQ) V (~P~Q) PQ T F F T

Step 3: Find ~A ~A (~P ~Q) V (P Q) *P=~P Step 4: Find ~ (~A) ~(~A)~{ (~P ~Q) V (P Q)-.PCNF of A *Q=~Q

For more theory refer discrete maths I-2

Discrete mathematics

Celestine Bernard

Cheat Sheet Disjunction:

Truth table: P T T F F
Conjunction:

Q T F T F

PVQ T T T F

Truth table: P T T F F Q T F T F PQ T F F F

Negation:

Truth table: P T F ~P F T

Conditional propositions: Truth table:

P T T F F

Q T F T F

PQ T F T T

Biconditional propositions: Truth table:

P T T F F

Q T F T F

PQ T F F T

NOTE: P Q is direct proposition. Q P is transverse of P Q. ~P ~Q is inverse function. ~Q ~P is contra positive.

Q P ~P ~Q (Transverse Inverse) P Q ~Q ~P (Direct Proposition Contra positive) P Q (P Q) (Q P) (Biconditional Direct Prop., transverse)

Properties of Equivalence: Idempotent law: Disjunction PVPP Associative law: Disjunction (P V Q) V R P V (Q V R) Conjunction (P Q) R P (Q R) Commutative law: Disjunction (P V Q) (Q V P) Conjunction (P Q) (Q P) Conjunction PPP

Distributive law: Disjunction P V (Q R) (P V Q) (P V R) Conjunction P (Q V R) (P Q) V (P R) Identity law: Disjunction TVPT FVPP Component law: Disjunction P V ~P T ~T F Conjunction P ~P F ~F T Conjunction TPP FPF

Absorption law: Disjunction P V( P V Q) P Conjunction P ( P Q) P DE Morgans law: Disjunction ~(P V Q) ~P ~Q Conjunction ~(P Q) ~P V ~Q Innovation law: ~(~P) P

Substitution instance: P Q (PQ) V (Q P) P Q ~P V Q

Tautological implications: PQ P PQ Q PPVQ ~P P Q Q P Q ~ (P Q) P ~ (P Q) ~Q P ( P Q) Q ~ Q ( P Q) ~P ~P ( P V Q) Q ( P Q) (Q R) PR ( P V Q) (P R) (Q R) R

Implication, Equivalence formulas for Inference theory: Implication formulae: P P V Q .(I -1) Q P V Q .(I-2) P Q P ..(I-3) P Q Q .(I-4) P , PQ Q ..(I-5) ~Q , PQ ~P .(I-6) ~P, P V Q Q .(I-7) P Q, Q R PR (I-8) P , Q P Q (I-9) Q PQ .(I-10) P V Q , PR , QR R .(I-11) ~P PQ .(I-12) ~(P Q) P ..(I-13) ~(P Q) ~P ..(I-14)

Equivalence formulae: ~ ~ P P (E-1) P Q ~P V Q .(E-2) P Q ~Q ~P (E-3) P Q (P Q) (QP) .(E-4) P (Q R) (P Q) R .(E-5) ~(P Q) (~P V ~Q) ..(E-6) (P Q ) (P Q) V (~P V ~Q)(E-7)

Quantifiers: There are two types of quantifiers. Universal quantifier Symbol: () Meaning: All

Existential quantifier Symbol :( ) Meaning: some

Equivalent formulae :( Quantifiers) (x) *P(x)+ ~(x) *~P(x)+ (x) *~P(x)+ ~(x) P(x) ~(x) *P(x)+ (x)*~P(x)+ ~(x) *~P(x)+ (x) *~P(x)+ (x) *A(x) V B(x)+ *(x)A(x) V (x)B(x)+ (x)*A(x) B(x)+ *(x)A(x)V(x)B(x)+ (x)*A B(x)+ A V (x)B(x) (x)*A B(x)+ A (x) B(x) (x) A(x) B (x) (A-1(x)B) (x) A(x) B (x)*A(x)B] A(x)B(x) (x)*AB(x)] A(x)B(x) (x)* AB(x)] Implication formulae: (x)A(x) V(x)B(x) (x)*A(x) VB(x)+ (x) *A(x) B(x)+ (x) A(x) (x) B(x) P(y) (x)P(x) (x)P(x) (x) P(x) (x)*P(x)Q(x)] (x)P(x)(x)Q(x)

Theory of inference: Rules: 1. Universal specification(UF): (x) A(x) A(y) 2. Universal generation(UG): A(y) (x)A(x) 3. Existential specification(ES): (x)A(x) A(y) 4. Existential generation(EG): A(y) (x)A(x)

You might also like