You are on page 1of 23

UNIT 2: A DISCUSSION ON FUNDAMENTALS OF LOGIC Introduction: Logic is being used as a tool in a number of situations for a variety of reasons.

Logic is found to be extremely useful in decision taking problems. In computer science and engineering, knowledge of logic is essential in in the following field: Analysis of algorithms and implementation Development of algorithms into a structured program in a programming language. A material of logic theory forms a basis in theoretical computer science such as Artificial Intelligence, Fuzzy logic, functioning of expert systems etc. Many times while working on a project after the beginning steps, we always have a doubt regarding whether the direction followed is right or wrong? Are we doing the job correctly? Whether the decisions taken are correct or incorrect etc? It is here logic plays an important role; using which one can solve a problem with lot of confidence and satisfaction. remarks, the next sections introduce formal symbolic logic. Basic Terminologies of logic: A Proposition is a declarative sentence written in some language, usually English, which is either true or false, but not both (i.e. true and false) at the same time. It is also referred as a simple statement or primitive proposition or an atomic statement. A proposition is denoted by using lower case letters such as p, q, r, s etc. Every proposition has exactly one of the two truth values; either true or false. When it is true, the same is assigned a symbol T or 1. If the primitive statement is false, it is assigned the symbol F or 0. In view of this, a proposition may be defined as a pair either (p, T) or (p, F). This situation may be compared to what we discussed earlier in set theory. It is seen that with respect to a set A and an element x, there are only two options; either x is an element of A or x need not be an element of A. There too we used the numbers 1 and 0 to describe the situation. The following are examples of propositions: p: Dr. Manmohan Singh is the president of India. q: Mumbai is the financial capital of India r: Bangalore is the silicon valley of India. s: 3+3=5 With these few

t: Dr. Abdul Kalam was awarded Bharath Rathna What about the following? x+3 is an integer. Please come in! Are u alright? Complete work today itself What are you doing? What a beautiful evening!

These are not considered as propositions. Because, x + 3 is an integer cannot be a proposition, as x is not specified. A statement of this kind is called an open statement. the statement gets a meaning only when x is assigned a value chosen from the universe of discourse of the problem considered. Others are either commands, or enquiries, or exclamatory sentences. These are not referred to as non-propositions. Discussion of various logical connectives Negation: Let p be a proposition. It is not the case that p is called as negation of the p.

Simply, it is NOT p . This is denoted by the symbol p . This situation can well be explained by using a truth table which is shown below:
p T F p F T p 1 0 p 0 1

Disjunction or logical OR: Let p and q be simple propositions. A proposition obtained by combining p and q using logical OR is called p disjunction q . It is denoted by p q . The truth value of p q is false only when both
p and q are false, otherwise, p q is a true

proposition. This is explained in the truth table given below.


p q pq

T T F F

T F T F

T T T F

Note: Logical operator is similar to the union operator in the case of set theory. Conjunction or logical AND:

Let p and q be simple propositions. A proposition obtained by combining p and q using logical AND is called p conjunction q . It is denoted by p q . The truth value of p q is true only when both
p and q are true otherwise p q

is a false proposition.

The same is

explained in the truth table given below.


p q pq

T T F F

T F T F

T F F F

Note: Logical operator is similar to the intersection operator in the case of set theory. Also, logical OR and logical AND have dual characteristics. Thus, conjunction and disjunction are examples of dual operators. One sided implication or logical IMPLICATION or IF THEN : Let p and q be simple propositions. A proposition obtained by combining p and q using logical connective, namely, one sided IMPLICATION is called p implies q . It is denoted by

p q . The truth value of p q is false only when p is true but q is a false proposition. In
all other instances, p q is a true statement. The truth table is given below.
p q

p q
T F T T

T T F F Few examples:

T F T F

If 3+3=7, then Sunday is a Christmas is a holiday. If 3+2 = 5, then sun raises in the east. If tomorrow is Monday, then yesterday was Saturday. If 32 7 = 23, then 5 + 6 = 9. 1. if p then q

Note: p implies q can be explained in many ways.

2. p is sufficient for q 3. q is necessary for p 4. p only if q Bi-conditional or two sided implication OR IF AND ONLY IF or IFF: Let p and q be two simple propositions. denoted by the symbol p
p Bi-conditional q

is a compound proposition

q . he truth value of p

q is true only when both p and q are

assigned the same truth value; otherwise, its truth value is false.
p q

T T F F

T F T F

T F T F

Note: Here, p is necessary and also sufficient for q. p bi-conditional q is to be read as p if and only if q.

Exclusive logical OR: Consider two propositions, say, p and q . Then p exclusive or
q is a compound proposition whose true value is false when both

p and q have the same

truth values. Otherwise, the truth value is true. It is denoted by pq . The truth table is given below.
p q

pq
F T T F

T T F F

T F T F

Note: This logical operator is similar to the symmetric difference operation for sets.

NAND logical connective:


This is defined as negation of p and q , denoted by ( p q) or by p - q .

NOR logical connective:

This is defined as negation of


pq

p or q , denoted by ( p q) or by ( p q) .

( p q) : p - q
F T T T

pq

( p q) : p - q :
F F F T

T T F F

T F T F

T F F F

T T T F

Note: NAND and NOR are examples of dual logical operators.


A discussion on statement formula, Tautology, Contradiction and Contingency A proposition obtained by combining many logical variables (i.e. propositions when not specified) using a number of logical connectives, and, containing proper parentheses is called a statement formula or simply a statement. For example, the following are statement formulas:
p [(q r ) q ] ( p q ) [(q r ) (q s )]

(( p q) ( p )) r ) is not a valid formula.

Note: It may be noted each logical variable has two possible truth value assignments; True or False. Thus, if a statement formula contains n logical variables, then there are 2 n choices. Hence, the truth table of the formula will contain 2 n rows. What is meant by Tautology?
A : A( p1, p2, p3, . . . pk , ,,, ,

Consider a statement, say


, ) . If for each of the 2 k options, truth value of A turns out

to be true, then A is called a tautology, or as universally accepted formula, or as universally valid formula, Thus, if a statement formula A is always true, then it said to be a tautology. Suppose, the truth value of A is always false, then it is called an absurdity, or contradiction, or universally invalid formula. On the other hand, if the truth value of A is some times true and at others false, then it is called contingency. Illustrative examples: By constructing the truth table of the following, determine which one is a tautology? Which one is a contradiction? Which is one a contingency?

1.

( p q)

(p q ) (q p)

2. (p q ) 3.
4. 5.

[p (p q)] q
((p q ) q ) p

(( p q) (q r)) ( p r)
(p q )
p

Solution to problem number 1 ( p q )


p q

A: p q

B : p q

T T F F

T F T F

T F T T

F F T T

T F T T

T T T T

Therefore, ( p q)

(p q) is a Tautology
(p q )
p

Solution to problem number: 2.

(q p)
q

A: p q

B : q p

T T F F

T F T F

T F T T

F F T T

F T F T

T F T T

T T T T

As A : p q and B : q p have same set of truth values, therefore, p q and q p are logically equivalent to each other. Therefore, if a situation demands, the formula may well be replaced by q p . Solution to problem number 4:

p q

p q
T F T T

q
F T F T

A:

( p q) q
F F F T

A p

T T F F

T F T F

F F T T

T T T T

Since, ((p q ) q ) p is a tautology, and Thus, ((p q ) q ) p is a tautology. Logically equivalent statements Two statement formulas A and B are said to be logically equivalent, whenever A
B is a

tautology. Equivalently, if A and B have same set of truth values for each of the truth value assignments to the components of A and B. We denote this by A B . By constructing truth table, determine whether the following are logically equivalent? 1.

pq and [( p q ) (p q )] ,

2. (p q ) ( p ( p q )) and p q 3. ( p - q ) and (p q ) 4.

p (q r )) and ( p q ) r )

Solution of Problem No. 1. Consider the following truth table showing truth values of both the formulas
p q

pq
F T T F

q
F T F T

A : p q

B : p q

A B
F T T F

T T F F

T F T F

F F T T

F T F F

F F T F

From the table, it is clear that pq and [( p q ) (p q )] are logically equivalent. Solution of Problem Number 3: Consider the following truth table
p q pq

( p q ) : ( p - q )

( p - q )

q
F T F T

p q

(p q) : p q

T T F F

T F T F

T F F F

F T T T

T F F F

F F T T

F T T T

T F F F

From the above table, it follows that ( p - q ) and (p q ) are logically equivalent.

Tutorial on fundamentals of logic


Let p, q , r , s denote the following statements
p : I finish writing my computer program before lunch q : I shall play tennis this afternoon r : The sun is shining s : The humidity is low

Write the following statements in symbolic form:


(a) If the sun is shining, I shall play tennis this afternoon. (b) Finishing the writing of my computer program before lunch is necessary for my playing tennis this afternoon. (c) Low humidity and sunshine are sufficient for me to play this tennis this afternoon.

Solution: (a ) r q (b) p q

(c)

( s r) q

2. Determine the truth value of each of the following:


(i) (ii) (iii) If 3 + 4 = 12, then 3 + 2 = 6. (True) If 3 + 3 = 6, then 3 + 4 = 9. (False) If George Bush was the third president of USA, then 2 + 3 = 5. (True)

3. Rewrite the following statements as an implication in the form if . . . Then. . form.

(a) For practicing her serve daily is a sufficient condition for Ms. Sania Mirza to have a good chance of winning the Australian Open tennis tournament. (b) Fix my air-conditioner or I wont pay the rent. (c) Manavi will be allowed to sit on Mohans motor bike only if she wears her helmet.

Solution :( a) If Ms. Sania Mirza practices her serve daily, then she will have a good chance of
winning the tennis tournament. (b) If you do not fix my air-conditioner, then I shall not pay the rent. (c) If Manavi is to be allowed on Mohans motor bike, then she must wear her helmet

Determine all truth value assignment, if any, for the primitive statements p, q, r , s, t that make each of the following statements false.

(a) [( p q) r ] ( s t )

(b) [( p q) r ] ( st )

Solution: For (a), the implication is given to be a false one, therefore, we must have ( p q ) r
as true, and s t as false. Thus, truth values of these primitive statements are: Primitive statements Truth values
p q
r

s
F

(b) The implication is given to be a false; we must have ( p q ) r as true and st as false. Thus, truth values of these primitive statements are: Primitive statements Truth values
p q r

s
T F

T T

T T

T T

T F

If statement q has the truth value 1, determine all truth value assignments for the primitive statements p, r, and s for which the truth value of (q [(p r ) s ]) [s (r q )] is 1. Solution: We shall setup A : (q [(p r ) s ]), B :[s (r q )] . Note that we are given
that A B is true (i.e. 1), therefore, it follows that both A and B are true statements. It is given that q has the truth value 1, it is clear that truth value of (p r ) s is 1, otherwise, the implication becomes false, which is not true actually. From this we infer that p r and s

are true statements. Thus, truth value of is true, so it follows that being true, w must

s is true. We do have that B :[s (r q )]


r

r is true, and so truth value of


have
p

is false. With p r conclusion is that if

as

false.

Hence,

A : (q [(p r ) s ]), B :[s (r q )] is true, then we truth value assignments of p, q, r,

and s are: Primitive statements Truth values

s
F

In the following program segment, I, j, m, and n are integer variables. The values of m and
n are supplied by the user earlier in the execution of the total program. for i := 1 to m do for j := 1 to n do if i j then pr int i * j How many times the print statement in the segment is executed when
(a ) m = 10, n = 10 (b) m = 20, n = 20 (c ) m = 10, n = 20 (d ) m = 20, n = 10

Solution: (a) For m = 10, n = 10, print statement will be executed only for 90 times. (b) For m = 20, n = 20, print statement will be executed only for 380 times. (c) For m = 10, n = 20, print statement will be executed only for 190 times. (d) For m = 20, n = 10, print statement will be executed only for 180 times

Negate and express the following statements in smooth English. (c) If Harold passes his C++ course and finishes his data structures project, then he will graduate at the end of semester. Solution: let us set up p: Harold passes C++ course, q: Harold finishes his data structures project, r: Harold becomes a graduate at the end of semester. Symbolically, the given statement may be written as ( p q) r . The negation of this statement is

(( p q ) r )

( p q) r , since A B A B

Applying De-Morgan laws, we

obtain

( p q) r

. Thus, the negated statement in English is Harold passes C++ course and

Harold finishes his data structures project but fails to graduate at the end of semester.

Concept of Duality in logic: Given a statement formula involving a number of primitive statements and several logical connectives, its dual may be obtained just by replacing conjunction

()

by disjunction ()

and vice versa, not disturbing other logical connectives. If the formula contains special symbols like T or F, then these are to be replaced by F and T respectively. Write the dual of the following: (a ) q p, (b) p ( q r ) , (c) p q Solution: Consider (a ) q p q p , therefore, its dual is q p . Consider (b) p ( q r ) p ( q r ) , therefore, the respective dual is p ( q r ) . Consider (c) p q Thus, the dual is

( p q) (q p) (p q) ( q p) .

( p q) ( q p) .

Concept of converse, inverse and contra positive statements:

For the statement p q , q p is called the converse statement. For the statement p q , p q is called the inverse statement. For the statement p q , q p is called the contra-positive statement

Write the converse, inverse and contra -positive of the statement If today is a labor day, then tomorrow is Tuesday. Solution: The converse statement is If tomorrow is Tuesday, then today is Labor Day . The inverse statement is If today is not Labor Day, then tomorrow is not Tuesday. The contra-positive statement is If tomorrow is not Tuesday, then today is not Labor Day

Laws of logic: With respect to conjunction (i.e. logical AND),


p p p (idempotent law) p q q p (Commutative law)

( p q) r

p ( q r ) (Associative law)

p F F (identity law) p T p(universal law) p p p p F

Thus, ( a set of propositions, ) is a discrete structure

Laws of logic: With respect to disjunction i.e. (logical OR),


p p p (idempotent law) p q q p (Commutative law)

( p q) r

p ( q r ) (Associative law) .

p F p(identity law) p T T (universal law) p p p p T Thus, ( a set of propositions, ) is a discrete structure

With respect to combination of conjunction operator i.e. logical AND operator disjunction operator i.e. logical OR

()

and

() ,

we can generate distributive laws. Thus, ( P , , )

is another discrete structure where P denotes the set of all propositions.

( p q) r ( p r ) (q r ) (Distributive law) ( p q) r ( p r ) (q r ) (Distributive law)


If the operators , and are combined then, we obtain

( p q) p q (De - Morgan law) ( p q) p q (De - Morgan law) ( p) p (double negation law) Therefore, one can claim that ( P , , , ) is a discrete structure.

Simplify [[( p q) r ] q] using laws of logic only. Also, state the law used in the derivation.

Solution:

We shall use De-Morgan law, Double negation law, and Associative law and Consider

Absorption law to simply the above expression.

[[( p q) r ] q ] ( p q) r q because A A ( p q) r q [By Double Negation Law] (By associative law)

( ) p q) q r ) ((

But

(( p q) q)

q by Absorption Law . Therefore, [[( p q) r ] q] q r .

Discussion on Methods of Proof:


Note: A statement which is given to be true or just true is called as a premise. Now, consider a set of premises H 1 , H 2 , H 3 , . . . H k . Let C be a conclusion of some argument. We say

that k premises implies the conclusion C whenever ( H1 H 2 H 3 . . . H k ) C is a tautology. Symbolically, we describe it as ( H1 H 2 H 3 . . . H k ) C and read it as

C follows logically from all the k premises or the k premises C logically.


Determine whether the following argument is logically valid? H1: If you invest in stock market, then you will get rich. H2: If you get rich, then you will be happy, Conclusion: Therefore, If you invest in stock market, then you will be happy. Solution: We shall set up: p : You invest in stock market, q : You will become rich and
r : You will be happy . Then, problem may be formulated symbolically as

H 1 : p q, H 2 : q r therefore C : p r . Here, the problem is to determine whether

(H

H 2 ) C i.e.( H 1 H 2 ) C is a tautology? As 3 variables are involved, one can adopt

truth table method.


p q

H1 : p q

H2 : q r

H1 H 2

C:p r

(H

H2 ) C
T T T

T T T

T T F

T F T

T T F

T F T

T F F

T F T

F T F F F
Since

T F T F F

T F F T F

T F T T T

T T F T T

T F F T T

T F T T T

T T T T T

(H

H 2 ) C is a tautology, therefore, it may be concluded that this is a valid

argument.

Determine whether the following argument is logically valid? H1: If I try hard and I have talent, then I will become a musician. H2: If I become a musician then I will be happy. H3: hard or I do not have talent. I have not become happy. Therefore, I did not try

Solution:
First we shall set up the following simple statements, namely, p : I try hard , q : I have talent ,
r : I become a musician and s : I became happy .

Then given premises may be written in

symbolical form as H1 : Here, to find whether

( p q) r ,
1

H 2 : r s, H 3 : s and the conclusion as C : p q

(H

H 2 H 3 ) C or whether ( H1 H 2 H 3 ) C a tautology?

Observe that this problem involves 4 logical variables. Therefore, truth table approach may not be proper as it is required to construct a table of 16 rows. This is not feasible, thus, there is a necessity to develop alternate strategies. With this in view, we shall now introduce rules of inference theory.

Rule 1: A given premise (i.e. a statement which is given to be true in the problem can be
used at any stage during the argument.

Rule 2: An statement can be replaced by means of an equivalent statement. This is


permitted. For example the statement
p q or by q p .

p q can be replaced as either by

Rule 3: In conditional proof, for example, if a problem to determine whether A B


and if nothing is told about the nature of A is given, then we can introduce an additional premise in the problem by

H : A i.e. A is true.

Rule 4: Modus ponens: Whenever p is true, p implying q is true, then q is certainly true.
Symbolically it is given as p, p q q . is a tautology. We can verify that

( p p q) q

Rule 5: Modus Tollens: Whenever p q is true and q is true, then p is true.


Symbolically, it is given as

q, p q p

One

can

verify

that

q ( p q) p is a tautology.

Rule 6: Law of Syllogism: Whenever p q is true and q r is true, then


is true. Symbolically, same can be written as ( p q) ( q r )

p r

( p r) .

Rule 7: Law of Conjunction Rule 8: Law of Disjunction -

( p q) p p ( p q) .

Now, we shall use the rules of inference theory. Consider the premises H1 and H2, i.e.

( p q) r and H : r s . Applying the law of syllogism, we obtain R1 : ( p q) s . Now consider R1 : ( p q) s and H : s ; using the law of Modus Tollens, we should get R2 : ( p q) . But it is known that ( p q) p q . Hence, argument is logically
H1 :
2 3

valid.

Determine whether the following argument is valid? H1: If Haripriya gets the supervisor position and works hard, then she gets a raise. H2: If she gets a raise, then she will buy a new car. H3: She has not purchased a new car. Conclusion: Either Haripriya did not get the supervisors position or she did not work hard Solution:

First we shall set up p: Haripriya gets the supervisors position. q: Haripriya works hard. r: She gets the raise. s: She purchase a new car. Then, then given premises can be written in symbolic form as H1 : ( p q) r , H2 : r s, H3 : s C : p q . Consider the premises H3 and H2, namely, H2 : r s and H3 : s . Applying the rule of Modus Tollens, we obtain the result

R1: r .

Now consider the premise H1 and the result just obtained R1, viz.,

H1 : ( p q) r , R1: r . Again using the rule of Modus Tollens, we should get R2 : ( p q) .


It is well known that ( p q) p q . Hence, the given argument is logically valid.

Determine whether the following argument is valid? If the band could not play rock music or the refreshments were not delivered on time, then the New Years party would have been cancelled and Anita would have been angry. If the party were cancelled, then refunds would have had to be made. No refunds were made. Therefore, the band could play rock music. Solution: First we shall form the following primitive statements:
p : The band could play rock music, q : The refreshments were delivered on time r : New year party is cancelled, s : Anitha has become angry , t : Refunds had to be made

Then, the given premises may be written in symbolic form as


H1 : (p q ) ( r s ), H2 : r t , H3 : t and C : p .

Here, to determine whether

( H 1 H 2 H 3)

is a tautology?

As 5 parameters are

involved in this problem, we shall use the rules of inference theory. Consider the premises H3 and H2, namely, H2 : r t and H3 : t . Using Modus Tollens here, we will get the result that R1 : r . Equivalently, we have got that negation of r is true. Therefore, we must have that truth value of r as false. Due to this, it is clear that truth value of

r s is false. But according to H 1 : (p q ) ( r s ) , i.e. this implication is true.

From

here, it follows that truth value of (p q ) is false. But this is possible only when both
p and q are false. Thus, we obtain that truth value of p and q as true. Hence, given

argument is logically valid.

Determine whether the argument is valid?

H1 : p ( r s) , H2 : p q, H3 : q ( r s) , H 4 : r ( t u) , H 5 : p t
imply the conclusion C : u ? Consider
H5 : pt .

Argument:

Using law of conjunction, we get that the primitive is false. To consider H2

propositions p and t are both true. Equivalently the truth value of t

and H3, namely, H2 : p q , H3 : q ( r s) , using the law of syllogism, we get the result

R1 : p ( r s) . With p being a true proposition, applying Modus Ponens, we obtain R2 : r s


as a true statement. Thus, truth value of both r and s are true. Equivalently, the truth value of negation of r is false, i.e. r is false. According to H4, we have Already, we have obtained that (i) t is false and (ii) r

r ( t u) is true.

is false, so only option left for us

to conclude is truth value of u is true. Hence, the given argument is logically valid.

Determine whether the argument is valid?

H 1 : u r , H 2 : (r s) ( p t ), H 3 : q ( u s) , H 4 : t Imply the conclusion C : q p


?

Solution:
Note that this problem is based on conditional proof. However, nothing is given about the nature of the primitive proposition, q . Thus, we shall introduce an additional premise namely, H5 : q i.e. q is a true proposition. Consider the premises H3 and H5 i.e. q and q ( u s) , applying the rule of Modus Ponens, we get the result R1 : ( u s) . Using the law of conjunction we obtain R2: u and s i.e. both u and s are true statements. Now using the result R2 and the premise H1, i.e.
R2: u, H1 : u r and the rule of Modus Ponens, we will get

R3 : r . As r

and s are true propositions, r s is a true statement. Using this and we Using get
( p t)

H2 : ( r s ) ( p t )

is

true

statement.

We

know

that p t t p t p .

H4: t here, and applying once again rule of Modus Pones, we should get that p is a

true proposition. Hence the given argument is logically valid.

Discussion of Direct Proof and Indirect Proof


Let n be a positive integer. Prove that n 2 is odd if and only if n is odd. Proof: It is known that an odd integer may be written as n = 2k + 1, where k Z
squaring both sides,
n 2 = ( 2k + 1) 2 = 4k 2 + 4k + 1 =2 2k 2 + 2k + 1 =2m + 1 where m = 2k 2 + 2k , an integer

Thus,

n 2 is odd . To prove the converse, we shall give an indirect proof. To begin with let

n 2 be an odd integer. To prove that n is odd. Suppose on the contrary that let n be an even

integer. Then we can write as

n = 2k so that n2 = ( 2k ) = 4k 2 = 2 2k 2 an even integer. But


2

( )

this is against our hypothesis that n 2 is odd. Hence, we conclude that n is an odd integer.

Prove that if

3m + 2 is an odd integer, then m is an odd integer.

Proof: Observe that 3m + 2 = 2k + 1, therefore 3m = 2k - 1, an odd integer . Now, we have 3m


an odd integer. From this, we must conclude that

is

odd,

otherwise

3m + 2 = 3 ( 2k ) + 2 = 6k + 2 = 2( 3k + 1) , an even integer. this is impossible as it is given that 3m + 2 is an odd integer. Hence our assumption that m is even is wrong and so m must be an
odd integer.

Let n be an integer. Prove that n is even if and only if

31n +12 is even.

Proof: Suppose that n is an even integer, Thus, n = 2k , where k is an integer. Therefore,


31n + 12 = 312k = 62k = 2 ( 31k ) is even. On the other hand suppose that 31n +12 is even.

To prove that

n is an even integer. We shall prove this by giving an indirect proof. Suppose


be odd. Then we can write n = 2k + 1, where k is an integer. Thus,

on the contrary, let n

31n +12 = 31( 2k +1) +12 = 62k + 43 = 62k + 42 +1 = 2(31k + 21) +1 = 2m +1 where m = 31k + 21 is an odd integer which is impossible as we ourselves had
assumed that n is even. Hence, n must be an even integer.

A discussion on Predicates and Quantifiers


So far study was confined to a set of simple, primitive propositions or compound statements only. We discussed various concepts such as logical connectives, formation of compound proposition, tautologies, contradiction, and contingency. Also, we discussed logical equivalence of statements, duality of a formula etc.

Further, rules of inference theory were introduced using which problems based on logical arguments were examined. Now we shall initiate a discussion on predicates and quantifiers. Before understanding these, consider the following statements, Dog is an animal Cat is an animal Elephant is an animal Tiger is an animal Lion is an animal Deer is an animal Horse is an animal and the list go on Observe that all these statements are about individuals which are animals, so to study these; we require different symbols to denote these animals. But even the usage of different symbols, does not show the common property of the symbols, that each symbol denotes an animal. Suppose if we want to describe all the animals of the universe, then certainly a large number of symbols are necessary. To deal with a situation of this type, it is appropriate to develop a mechanism using which it must be possible represent all the common feature of the objects. The following section is devoted to the same. First we introduce a symbol to denote the phrase is an animal and secondly, a technique to joint it with a symbol representing an animal, then we are done as this single expression will speak about all the individuals which are animals. Here, the part is an animal is called as predicate. Usually, a predicate is represented by using upper case letters and lower case letters are considered for the objects associated with a predicate. Thus, let us consider A : is an animal then all objects which are animals may be expressed as
A( x ) where x is a variable to be chosen from the universe of discourse, namely, A( x )

the set of animals.

to be read as x is A or as object has the property stated in the

predicate, . Since only one variable is involved here, A( x ) is said to be 1 place predicate function or as an open statement of a single variable. Similarly 2 place, 3 place predicates can be introduced. The study of predicate functions constitutes predicate calculus. Thus, it is clear that all the topics discussed under fundamentals of logic can be extended to predicates calculus. Therefore, one may combine the open statements using the logical

connectives, one can extend the definitions like logical equivalence, tautology etc to these. Please remember that the set of all objects is called as universe of discourse or just universe.

A note on Quantifiers
In a practical situation, we come across a number of quantified statements like Live lectures through EDUSAT programme is open for all engineering college students in Karnataka A vehicle having Karnataka state permit is permitted to move on any road in the state. There are some bad boys in a class room. Some students never follow Discrete Mathematics course whoever teaches this course. There is at least one student in some engineering watching this programme coming live from VTU studio, Bangalore. Pythagoras Theorem holds well for all right angled triangles and the list go on.

Statements shown in previous slides can be expressed symbolically using quantifiers. There are two types of quantifiers:

1. Universal quantifier: A statement which is universally valid may be explained using an


universal quantifier. This is similar to the situation, namely, for all, for every and for any etc. Symbolically, it is denoted as " . Consider an open statement p( x ) which is true for all substitutions from a universe of discourse, then the same may be written in symbolic form as " x p( x ) .

2. Existential Quantifier: There are statements which are true only under circumstances. These
statements may be symbolically expressed in terms of existential quantifier, denoted by $ . Consider an open statement of the form q ( x ) . Suppose that this statement is true only for some

values of x . This may be symbolically written as $ x q ( x ) . Note: An open statement of the form q ( x ) gets A meaning only when x is replaced by a proper value from the universe or universe of discourse, denoted by U .

Examples: Examples: Consider universe of discourse as the set of all days of a week. Then U =
{Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}. Consider the statement
p( x ) : x is a holiday . It is known that there is a day in a week which is declared as a general

holiday (i.e. Sunday), thus, this situation may be written as $ x p( x )

Another example; Take the universe as the set of all flowers and consider the statement, Flowers are beautiful. To write this statement in symbolic form, we shall set up .
f ( x ) : x is a flower , then above may be written symbolically as " x f ( x ) .

Some important remarks:


The statement " x f ( x ) assumes the truth value false even if for one value of x , f ( x ) is false. Therefore, we have the result [" x f ( x )] $ x f ( x ) . Similarly, the statement

$ q( x ) will take the truth value false, only when for all values of x the statement q ( x ) is false.

Hence, we obtain [$ x q ( x )] " x q( x ) . remarks regarding predicates and quantifiers.

Also, the following are some of important

[ p( x) q( x)] [$ x p( x) $ 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)]
$x

Also, we have the following results to negate the statements with one quantifier:

[" 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 p( x ) " x p( x )

Tutorial on Quantifiers: For the universe of integers, let p( x ), q ( x ), r ( x ), s ( x ), t ( x ) be the following open statements.

p( x ) : x > 0 q ( x ) : x is even r ( x ) : x is a perfect square s ( x ) : x is exactly divisible by 4 t ( x ) : x is exactly divisible by 5

Write the following statements in symbolic form: (i) (ii) (iii) (iv) (v) (vi) At least one integer is even . There exists a positive integer that is even. If x is even, then x is not divisibly by 5. No even integer is divisible by 5. There exists an even integer divisible by 5. If x is even and x is a perfect square, then

x is divisibly by 4.

Solution: i)

$ x q( x ) (ii ) $ x

(iv) " x [q ( x ) t ( x )] ( v)

[ p( x) q( x)] (iii) " x [q( x) t ( x)] $ x [q ( x ) t ( x )] ( vi) " x ( q ( x ) r ( x )) s ( x )

Translate each of these statements into logical expressions using predicates, quantifiers and logical connectives: (i) (ii) (iii) (iv) Some students do not follow the rules. Some students are very serious. No student can keep a secret. There is some in this class who is very intelligent

Solution: Let us consider the universe as the set of all students of a college. First we shall set up the following primitive statements p( x ) : x follows the rules. q ( x ) : x is a very serious person. r ( x ) : x can keep secret. s ( x ) : x is very intelligent. Solution: (i )
$ x p( x ), (ii) $ x q ( x ), (iii ) " x r ( x ). (iv) $ x s( x )

For the universe of all integers, determine the truth or falsity of each of the following statements. If a statement is false, give a counter example. p( x ) : x 2 - 8 x + 15 = 0, q ( x ) : x is odd , r ( x ) : x > 0.

(a ) " x
d)

[ p( x) q( x)] , (b) " x [q( x) p( x)] , (c) $ x [q ( x ) p( x )] , (e ) $ x [ r ( x ) p( x )] , ( f ) "

$x
x

[ p( x) q( x)] ( p( x ) q ( x )) r ( x )

( g) $ x p( x ) ( q ( x ) r ( x ))

Solution: The quadratic equation x 2 - 8 x + 15 = 0 may be factorized as Thus, roots are

( x - 3) ( x - 5) = 0 .

x = 3, x = 5. as both the roots are odd, it is clear that statement (a) is true.

According to statement (b) if x is an odd integer, then it is a solution of the quadratic equation
x 2 - 8 x + 15 = 0 .

This is a false statement, for, x = 1, an odd integer is not a root of the

quadratic equation. (c) The English version of this statement is that there is a solution of
x 2 - 8 x + 15 = 0 which is odd. As the roots are 3 and 5, which are odd, therefore, (c) and (d) are

both true statements. According to statement (e), there is a positive integer which is also a root of the quadratic equation x 2 - 8 x + 15 = 0 . This is true because x = 3 a positive integer and is a root. Statements (f) and (g) are both true.