5

Click here to load reader

Rules of Inference for Propositional Calculus

Embed Size (px)

DESCRIPTION

Rules of Inference for Propositional Calculus in theory of computation

Citation preview

Page 1: Rules of Inference for Propositional Calculus

Chapter 1: Propositions and Predicates J;;I, 15

DefInition 1.12 A formula ex is in principal conjunctive normal form if exis a product of maxterms. For obtaining the principal conjunctive normal formof ex, we can construct the principal disjunctive normal form of -, ex and applynegation.

EXAMPLE 1.16

Find the principal conjunctive normal form of ex = P v (Q :::::} R).

Solution

-, ex= -,(P v (Q:::::} R))

== -, (P v (-, Q v R)) by using 112

== -, P 1\ (-, (-, Q v R)) by using DeMorgan' slaw

== -, P 1\ (Q 1\ -, R) by using DeMorgan's law and 17

-, P /\ Q 1\ -, R is the principal disjunctive normal form of -, ex. Hence,the principal conjunctive normal form of ex is

-, (-, P 1\ Q 1\ -, R) = P v -, Q v R

The logical identities given in Table 1.11 and the normal forms of well-formedformulas bear a close resemblance to identities in Boolean algebras and normalforms of Boolean functions. Actually, the propositions under v, 1\ and -, forma Boolean algebra if the equivalent propositions are identified. T and F act asbounds (i.e. 0 and 1 of a Boolean algebra). Also, the statement formulas forma Boolean algebra under v, 1\ and -, if the equivalent formulas are identified.

The normal forms of \vell-formed formulas correspond to normal formsof Boolean functions and we can 'minimize' a formula in a similar manner.

1.3 RULES OF INFERENCE FOR PROPOSITIONALCALCULUS (STATEMENT CALCULUS)

In logical reasoning. a certain number of propositions are assumed to be true.and based on that assumption some other propositions are derived (deduced orinferred). In this section we give some important rules of logical reasoning orrules of inference. The propositions that are assumed to be true are calledh)potheses or premises. The proposition derived by using the rules of inferenceis called a conclusion. The process of deriving conclusions based on theassumption of premises is called a valid argument. So in a valid argument we /are concerned with the process of arriving at the conclusion rather~obtaining the conclusion.

The rules of inference are simply tautologies in the form of implication(i.e. P :::::} Q). For example. P :::::} (P v Q) is such a tautology, and it is a rule

Pof inference. We write this in the form Q . Here P denotes a premise.

. ".PvThe proposition below the line. i.e. P v Q is the conclusion.

http://engineeringbooks.net

Page 2: Rules of Inference for Propositional Calculus

16 J;;i Theory ofComputer Science

We give in Table 1.13 some of the important rules of inference. Of course,we can derive more rules of inference and use them in valid arguments.

For valid arguments, we can use the rules of inference given inTable 1.13. As the logical identities given in Table 1.11 are two-wayimplications. we can also use them as rules of inference.

TABLE 1.13 Rules of Inference

Rule of inference Implication form

RI1: Addition

P:. PvQ

Rh Conjunctionp

Q:. P A Q

Rh Simplification

PAQP

Rh: Modus ponens

P

P=>Q~

F~I5: Modus tollens

-,Q

P=>Q:. ~P

RIs: Disjunctive syllogism

-,P

PvQ~

RI7: Hypothetical syllogismP=>Q

Q=>R:. P => R

RIa: Constructive dilemma

(P => Q) /" (R => 8)

PvR:. Qv S

RIg: Destructive dilemma

CJ => Q) 1\ (R => 8)

~Qv--,S

:. P v R

P => (P v Q)

(P A Q) => P

(P 1\ (P => Q)) => Q

(-, Q 1\ (P => Q)) => -, Q

(-, P 1\ (P V Q)) => Q

((P => Q) 1\ (Q => R)) => (P => R)

((P => Q) 1\ (R => 8) 1\ (P v R)) => (Q v 8)

((P => Q) 1\ (R => 8) 1\ (-, Q v -,8)) => (--, P v -, R)

http://engineeringbooks.net

Page 3: Rules of Inference for Propositional Calculus

Chapter 1: Propositions and Predicates ~ 17

EXAMPLE 1.17

Can we conclude S from the following premises?

(i) P =} Q(ii) P =} R

(iii) -,( Q /\ R)

(iv) S \j P

Solution

The valid argument for deducing S from the given four premises is given asa sequence. On the left. the well-formed fOlmulas are given. On the right, weindicate whether the proposition is a premise (hypothesis) or a conclusion. Ifit is a conclusion. we indicate the premises and the rules of inference or logicalidentities used for deriving the conclusion.

1. P =} Q Premise (i)

2. P =} R Premise (ii)

3. (P =} Q) /\ (P => R) Lines 1. 2 and RI2

4. ---, (Q /\ R) Premise (iii)

5. ---, Q \j ---, R Line 4 and DeMorgan's law (h)

6. ---, P v ---, P Lines 3. 5 and destructive dilemma (RI9)

7. ---, P Idempotent law I]

8. S v P Premise (iv)

9. S Lines 7, 8 and disjunctive syllogism Rh

Thus, we can conclude 5 from the given premises.

EXAMPLE 1.18

Derive 5 from the following premises using a valid argument:

(i) P => Q

(ii) Q => ---, R(iii) P v 5(iv) R

Solution

1. P =} Q Premise (i)2. Q => ---, R Premise (ii)3. P => ---, R Lines 1, 2 and hypothetical syllogism RI74. R Premise (iv)5. ---, (---, R) Line 4 and double negation h6. ---, P Lines 3. 5 and modus tollens RIs7. P \j 5 Premise (iii)8. 5 Lines 6, 7 and disjunctive syllogism RI6

Thus, we have derived S from the given premises.

\

http://engineeringbooks.net

Page 4: Rules of Inference for Propositional Calculus

18 ~ Theory ofComputer Science

EXAMPLE 1.19

Check the validity of the following argument:If Ram has completed B.E. (Computer Science) or MBA, then he is

assured of a good job. If Ram is assured of a good job, he is happy. Ram isnot happy. So Ram has not completed MBA.

SolutionWe can name the propositions in the following way:

P denotes 'Ram has completed B.E. (Computer Science)'.Q denotes 'Ram has completed MBA'.R denotes 'Ram is assured of a good job'.S denotes 'Ram is happy'.

The given premises are:

(i) (P v Q) ~ R

(ii) R ~ S(iii) --, S

The conclusion is --, Q.

1. (P v Q) ~ R Premise (i)2. R ~ S Premise (ii)3. (P v Q) ~ S Lines 1, 2 and hypothetical syllogism RJ7

4. --, S Premise (iii)5. --, (P v Q) Lines 3, 4 and modus tollens RJs6. --, P /\ --, Q DeMorgan's law h7. --, Q Line 6 and simplification RJ3

Thus the argument is valid.

EXAMPLE 1.20

Test the validity of the following argument:If milk is black then every cow is white. If every cow is white then it has

four legs. If every cow has four legs then every buffalo is white and brisk.The milk is black.

Therefore, the buffalo is white.

Solution

We name the propositions in the following way:P denotes 'The milk is black'.Q denotes 'Every cow is white'.R denotes 'Every cow has four legs'.S denotes 'Every buffalo is white'.T denotes 'Every buffalo is brisk'.

http://engineeringbooks.net

Page 5: Rules of Inference for Propositional Calculus

Chapter 1: Propositions and Predicates ~ 19

Premise (iv)Premise (i)Modus ponens RIJ,Premise (ii)Modus ponens RIJ,Premise (iii)Modus ponens RIJ,Simplification Rl~

valid.

The given premises are:

(i) p ~ Q(ii) Q ~ R

(iii) R ~ S 1\ T(iv) P

The conclusion is S.1. P2. P ~ Q3. Q4. Q ~ R5. R6. R ~ S 1\ T7. 5 1\ T8. S

Thus the argument is

1.4 PREDICATE CALCULUS

Consider two propositions 'Ram is a student', and 'Sam is a student'. Aspropositions, there is no relation between them, but we know they havesomething in common. Both Ram and Sam share the property of being astudent. We can replace the t\VO propositions by a single statement 'x is astudent'. By replacing x by Ram or Sam (or any other name), we get manypropositions. The common feature expressed by 'is a student' is called apredicate. In predicate calculus we deal with sentences involving predicates.Statements involving predicates occur in mathematics and programminglanguages. For example. '2x + 3y = 4,:', 'IF (D. GE. 0.0) GO TO 20' arestatements in mathematics and FORTRAN. respectively, involving predicates.Some logical deductions are possible only by 'separating' the predicates.

1.4.1 PREDICATES

A part of a declarative sentence describing the properties of an object orrelation among objects is called a predicate. For example, 'is a student' is apredicate.

Sentences involving predicateSCfe~-cribing the property of objects aredenoted by P(x), where P denotes the predicate and x is a variable denotingany object. For example. P(x) can denote 'x is a student'. In this sentence, xis a variable and P denotes the predicate 'is a student'.

The sentence 'x is the father of y' also involves a predicate 'is the fatherof. Here the predicate describes the relation between two persons. We canwrite this sentence as F(x, y), Similarly, 2x + 3y = 4z can be described bySex, y, ,:).

http://engineeringbooks.net