Anda di halaman 1dari 7

Prerequisite: Chapter 1

Logic is the discipline that deals with the methods of reasoning. On

an elemen tary level, logic provides rules and techniques for
determining whether a given argument is valid. Logical reasoning is
used in mathematics to prove theorems, in computer science to verify
the correctness of programs and to prove theorems, in the natural
and physical sciences to draw conclusions from experiments, and in
the social sciences and in our everyday lives to solve a multitude
of problems. Indeed, we are constantly using logical reasoning. In this
chapter we discuss a few of the basic ideas.

Propositions and Logical Operations

A statement or proposition is a declarative sentence that is either true or false,
but not both.
Example 1. Which of the following are statements?
(a) The earth is round.
(b) 2 + 3 = 5
(c) Do you speak English?
(d) 3 - x = 5
(e) Take two aspirins.
(f) The temperature on the surface of the planet Venus is 800 F.
(g) The sun will come out tomorrow.
0

Solution
(a) and (b) are statements that happen to be true.
(c) is a question, so it is not a statement.
(d) is a declarative sentence, but not a statement, since it is true or false
depending on the value of x.
(e) is not a statement; it is a command.
(f) is a declarative sentence whose truth or falsity we do not know at this
time; however, we can in principle determine if it is true or false, so it is a
statement.
(g) is a statement since it is either true or false, but not both, although we
would have to wait until tomorrow to find out if it is true or false.

Logical Connectives and C o m p o u n d Statements

In mathematics, the letters x, y, z, ... often denote variables that can be replaced by real numbers, and
these variables can be combined with the familiar operations +, x, - , and ;.I.n logic, the letters p, q, r,
... denote propositional variables, that is, variables that can be replaced by statements. Thus we can write
p: The sun is shining today. q: It is cold. Statements or propositional variables can be combined by
logical connectives to obtain compound statements. For example, we may combine the preceding
statements by the connective and to form the com pound statement p and q: The sun is shining and it is
cold. The truth value of a compound statement depends only on the truth values of the statements
being combined and on the types of connectives being used. We shall now look at the most important
connectives.
If p is a statement, the negation of p is the statement not p, denoted by ~ p,
Thus ~ p is the statement "it is not the case that p." From this definition, it follows that if p is true, then ~ p
is false, and if p is false, then ~ p is true. The truth value of ~ p relative to p is given in Table 2.1. Such a

table, giving the truth values of a compound statement in terms of its component parts, is called a
truth table.

Strictly speaking, not is not a connective, since it does not join two statements,
and ~P is not really a compound statement. However, not is a unary operation
for the collection of statements and ~ P is a statement if p is.

Example 1: Let p: Tajmahal is in New York.

Then the negation of p is
~p: it is false that Tajmahal is in New York.
Example 2: Form the negation of the statement
p: n > 12
Solution: ~p: n > 12 is false.

Example 3 . Give the negation of the following statements.

(a) p: 2 + 3 > 1
(b) q: It if. cold.
Solution
(a) ~p: 2 + 3 is not greater than 1. That is, ~p: 2
in this case, ~P is false.

+ 3 1. Since p is true

(b) ~ q : It is not the case that it is cold. More simply, ~q It is not cold.
Ifp and q are statements, the conjunction of p and q is the compound state
ment "p and q," denoted by p /\ q. The connective and is denoted by the symbol
/\. And is a binary operation on the set of statements. The compound statement
p /\ q is true when both p and q are true; otherwise, it is false. The truth values
of p /\ q in terms of the truth values of p and of q are given in the truth table
shown in Table 2.2. Observe that in giving the truth table of p /\ q we need to
look at four possible cases. This follows from the fact that each of p and q can be
true or false.

Example 1: Form the conjunction of

p: Delhi is in India.
q: 5 + 7 = 12.
Solution: p q is the statement:
Delhi is in India and 5 + 7 = 12
Example 2: From the conjunction of
p: It is raining.
q: The sun is shining.
Solution: p q. It is raining and the sun is shining.
Example 4 . Form the conjunction of p and q for each of the
following. (a) p: It is snowing.
q: I am cold.
(b) p: 2 < 3
q: -5 > -8
(c) p: It is snowing.
q: 3 < 5
Solution
(a) p /\ q: It is snowing and I am
cold. (b) p /\ q: 2 < 3 and -5 > -8
<
(c) p /\ q: It is snowing and 3 5.
Example 4 (c) shows that in logic, unlike in everyday English, we may join
two totally unrelated statements by the connective and.
Ifp and q are statements, the disjunction of p and q is the compound state
ment "p or q, " denoted by p V q. The connective or is denoted by the symbol V.
The compound statement p V q IS true if at least one of p or q is true; it is false
when both p and q are false.The truth values of p V q are given in the truth table
shown in Table 2.3.

Example 1:

Let p: 5 + 2 = 7, q: 9 + 2 = 10 then
p q: 5 + 2 = 7 or 9 + 2 = 10

Example 2: Let p: Roses are red

q: Violets are blue, then,
p q: Roses are red or violets are blue.
Example 3 . Form the disjunction of p and q for each of the following.
(a) p: 2 is a positive integer.
q: \/2 is a rational number.
(b) p: 2 + 3 *- 5
q: London is the capital of France.
Solution
(a) p V q: 2 is a positive integer or \/2 is a rational number. Since p is true,
the disjunction p V q is true, even though q is false.
(b) p V q: 2 + 3 *- 5 or London is the capital of France. Since both p and
q are false, p V q is false.

Example 3(b) shows that in logic, unlike in ordinary English, we may join
two totally unrelated statements by the connective or.
The connective or is more complicated than the connective and because it
is used in two different ways in English. Suppose that we say "I drove to work or I took the train to work."
In this compound statement we have the disjunction of the statements p: "I drove to work" and q: "I took
the train to work." Of course, exactly one of the two possibilities occurred. Both could not have occurred,
so the connective or is being used in an exclusive sense. On the other hand, consider the disjunction "I passed
mathematics or I failed French." In this case, at least one of the two possibilities occurred. However, both
could have occurred, so the connective or is being used in an inclusive sense. In mathematics and
computer science, we agree to use the connective or always in the inclusive manner.

Example: Find the truth table of the Proposition ~p q

Solution: The truth table of ~p q is:
Table 1.5

Truth table ~p q

&

~p

~p q

T
T
F
F

T
F
T
F

F
F
T
T

F
F
T
F

1 '

Example 1: Let p be it is cold and q be it is raining. Give a simple verbal sentence which describes
each of the following:
(i) ~p
(ii) ~p ~q
Solution:
(i) ~p: It is not cold
(ii) ~p ~q: It is not cold and it is not raining.

Example 2: Let p be He is tall and let q be He is Handsome. Write each of the following
statements in symbolic form using p and q.
(i) He is tall and handsome.
(ii) He is neither tall nor handsome.
Solution: (i) p q (ii) ~p ~q
Example 3: Write the disjunction of:
Roses are red. Violets are blue.
Solution: Let p: Roses are red
q: Violets are blue then the disjunction of p and q is p q: Roses are red or violets are blue.
Example 4: Determine the truth value of each of the following statements (Propositions):
(i) 3 + 5 = 8 or 2 +1 = 9
(ii) 4 +3 = 7 and 5 + 2 = 7
(iii) Agra is in England or 1 + 9 = 8
Solution: (i) Let p: 3 + 5 = 8, q: 2 + 1 = 9
p is true, q is false
hence p q is true
i.e., Truth Value of p q is T
(ii) Let p: 4 + 3 = 7, q: 5 + 2 = 7
p is true and q is true p q is true (T)
(iii) Let p: Agra is in England
q: 1 + 9 = 8
p is false; q is false p q is false. Example
5: Construct a truth table for p ~p. Solution: The
truth table for p ~p is given below:
Table 1.6
p
~p
T

Example 6:
Solution:

p ~p

F
T

FF
F

Table 1.7

Example 7:
Example 8:

~q

p ~q

T
T
F
F

T
F
T
F

F
T
F
T

T
T
F
T

Find the truth table for p (q r)

Find the truth table for ~(~p) (Double negation)

Propositional Logic is concerned with statements to which the truth

values, true and false, can be assigned. The purpose is to analyze these
statements either individually or in a composite manner.

Propositional Logic Definition

A proposition is a collection of declarative statements that has either a truth
value "true or a truth value "false". A propositional consists of propositional
variables and connectives. We denote the propositional variables by capital
letters (A, B, etc). The connectives connect the propositional variables.
Some examples of Propositions are given below

The following is not a Proposition

"A is less than 2". It is because unless we give a specific value of A, we cannot
say whether the statement is true or false.

Implication / if-then () An implication AB is False if A is true and B

is false. The rest cases are true.
The truth table is as follows
A

AB

True

True

True

True

False

False

False

True

True

False

False

True

If and only if () AB is bi-conditional logical connective which is true

when p and q are both false or both are true.

A

AB

True

True

True

True

False

False

False

True

False

False

False

True