Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Department of

Information Technology Studies


DISCRETE STRUCTURES

Chapter II
Mathematical Logic
Logic is used to establish the validity of arguments.
It is not so much concerned with what the argument is about
but more with providing rules so that the general form of the
argument can be judged as sound or unsound. The rules which
logic provides allow us to assess whether the conclusion
drawn from stated premises is consistent with those premises
or whether there is some faulty step in the deductive process
which claims to support the validity of the conclusion.

Propositions and Truth Values


A proposition is a declarative statement which is either
true or false, but not both simultaneously. (Propositions are
sometimes called ‘statements’.) Examples of propositions are:
1. This rose is white.
2. Triangles have four vertices.
3. 3 + 2 = 4.
4. 6 < 24.
5. Tomorrow is my birthday.

Note that the same proposition may sometimes be


true and sometimes false depending on where and when it
was stated and by whom. While proposition 5 is true when
stated by anyone whose birthday is tomorrow, it is false when
stated by anyone else. Further, if anyone for whom it is a true
statement today states it on any other day, it will then be false.
Similarly, the truth or falsity of proposition 1 depends on the
context in which the proposition was stated.
Exclamations, questions and demands are not
propositions since they cannot bedeclared true or false. Thus
the following are not propositions:
1. Keep off the grass.
2. Long live the Queen!
3. Did you go to Jane’s party?
4. Don’t say that.
17
Department of
Information Technology Studies
DISCRETE STRUCTURES

The truth (T) or falsity (F) of a proposition is called


truth value. Proposition 4 has a truth value of true (T) and
propositions 2 and 3 have truth values of false (F).
The truth values of propositions 1 and 5 depend on the
circumstances in which the statement was uttered. Sentences
6–9 are not propositions and therefore cannot be assigned
truth values.
Propositions are conventionally symbolized using
the letters p, q, r, . . .. Anyof these may be used to symbolize
specific propositions, e.g. p: Manchester isin Scotland, q:
Mammoths are extinct. We also use these letters to stand
forarbitrary propositions, i.e. as variables for which any
particular proposition maybe substituted.

Logical Connectives and Truth Tables


The propositions 1–4 mentioned in this module are
simple propositions since they makeonly a single statement.
In this section we look at how simple propositions can be
combined to form more complicated propositions called
compoundpropositions. The devices which are used to
link pairs of propositions arecalled logical connectives and
the truth value of any compound propositionis completely
determined by:
• The truth values of its component
simplepropositions, and
• The particular connective, or connectives, used to
link them.

Before we look at the most commonly used


connectives we first look at an operation which can be
performed on a single proposition. This operation is called
negation and it has the effect of reversing the truth value
of the proposition. We state the negation of a proposition by
prefixing it by ‘It is not the case that. . . ’. This is not the only
way of negating a proposition but what is important is that the
negation is false in all circumstances that the proposition is
true, and true in all circumstances that the proposition is false.

18
Department of
Information Technology Studies
DISCRETE STRUCTURES

We can summarize this in a table. If p symbolizes a


proposition, p (or ~ p or –p or ¬ p) symbolizes the negation
of p. The following table shows the relationship between the
truth values of p and those of p.
The left-hand column gives all possible truth values
for p and the right-hand column gives the corresponding
truth values of p, the negation of p. A table which
summarizes truth values of propositions in this way
is called a truth table.
There are several alternative ways of stating
the negation of a proposition. If we consider the
proposition ‘All dogs are fierce’, some examples of
its negation are:

• It is not the case that all dogs are fierce.


• Not all dogs are fierce.
• Some dogs are not fierce.

Note that the proposition ‘No dogs are fierce’ is not


the negation of ‘All dogs are fierce’. Remember that to
be the negation, the second statement must be false in all
circumstances that the first is true and vice versa. This is
clearly not the case since ‘All dogs are fierce’ is false if just
one dog is not fierce. However, ‘No dogs are fierce’ is not true
in this case.

Conjunction
Two simple propositions can be combined by using
the word ‘and’ between them. The resulting compound
proposition is called the conjunction of its two component
simple propositions. If p and q are two propositions p ^ q (or
p.q) symbolizes the conjunction of p and q. For example:

p : The sun is shining.


q : Pigs eat turnips.
p^q : The sun is shining and pigs eat turnips.

19
Department of
Information Technology Studies
DISCRETE STRUCTURES

The following truth table gives the truth values of p ^q


(read as ’p and q’) foreach possible pair of truth values of p
and q.

From the table it can be seen that the


conjunction p ^ q is true only when both pand q
are true. Otherwise the conjunction is false.

Disjunction
The word ‘or’ can be used to link two simple
propositions. The compound proposition so formed is called
the disjunction of its two component simple propositions.
In logic we distinguish two different types of disjunction,
the inclusive and exclusive forms. The word ‘or’ in natural
language is ambiguous inconveying which type of disjunction
we mean. We return to this point after we have considered the
two forms.

Given the two propositions p and q, p ˅ q symbolizes


the inclusive disjunction of p and q. This compound
proposition is true when either or both of its componentsare
true and is false otherwise. Thus the truth table for p ˅ q is
given by:
The exclusive disjunction of p and
q is symbolized by p ˅ q. This compound
proposition is true when exactly one (i.e. one
or other, but not both) of its components is
true.The truth table for p ˅ q is given by:

When two simple propositions are


combined using ‘or’, context will often
provide the clue as to whether the inclusive
or exclusive sense is intended. For instance,
‘Tomorrow I will go swimming or play
golf’ seems to suggest that I will not do
both and therefore points to an exclusive

20
Department of
Information Technology Studies
DISCRETE STRUCTURES

interpretation. On the other hand, ‘Applicants for this post


must be over 25 or have at least 3 years relevant experience’
suggests that applicants who satisfy both criteria will be
considered, and that ‘or’ should therefore be interpreted
inclusively.

Where context does not resolve the ambiguity


surrounding the word ‘or’, the intended sense can be made
clear by affixing ‘or both’ to indicate an inclusive reading,
or by affixing ‘but not both’ to make clear the exclusive
sense. Where there is no clue as to which interpretation is
intended and context does not make this clear, then ‘or’ is
conventionally taken in its inclusive sense.

Conditional Propositions
The conditional connective (sometimes called
implication) is symbolized by→. The linguistic expression of
a conditional proposition is normally accepted as utilizing ‘if .
. . then . . . ’ as in the following example:

p : I eat breakfast.
q : I don’t eat lunch.
p→ q : If I eat breakfast then I don’t eat lunch.

Alternative expressions for p →q in this example are:

I eat breakfast only if I don’t eat lunch.


Whenever I eat breakfast, I don’t eat lunch.

The following is the truth table for p →q:


Notice that the proposition ‘if p
then q’ is false only when p is true and
q isfalse. If p is false, the compound
proposition is true no matter what
the truth value of q. To clarify this,
considerthe proposition: ‘If I pass my
exams then I will eat ice cream’. This
statement says nothing about what I will

21
Department of
Information Technology Studies
DISCRETE STRUCTURES

do if I don’t pass my exams. I may eat ice cream or I may not,


but in either case you could not accuse me of having made
a false statement.The only circumstances in which I could
be accused of uttering a falsehood is if I pass my exams and
don’t eat ice cream.

In the conditional proposition p → q, the proposition p


is sometimes called the antecedent and q the consequent. The
proposition p is said to be a sufficient condition for q and q a
necessary condition for p.

Biconditional Propositions
The biconditional connective is symbolized by ↔, and
expressed by ‘if and only if . . . then . . . ‘. Using the previous
example:

p : I eat breakfast.
q : I don’t eat lunch.

p↔ q : I eat breakfast if and only if I don’t eat


lunch
(or alternatively, ‘If and only if I eat breakfast,
then I don’t eat lunch’).

The truth table for p ↔ q is given by:

Note that for p ↔ q to be true, p and q must


both have the same truth values, i.e. both must
be true or both must be false.

Examples:

1. Consider the following propositions:


p : Mathematicians are generous.
q : Spiders hate algebra.

22
Department of
Information Technology Studies
DISCRETE STRUCTURES

Write the compound propositions symbolized by:


1. p ˅ q
2. (q ˄ p)
3. p → q
4. p ↔ q

Solution:
1. Mathematicians are generous or spiders don’t hate algebra (or
both).
2. It is not the case that spiders hate algebra and mathematicians
are generous.
3. If mathematicians are not generous then spiders hate algebra.
4. Mathematicians are not generous if and only if spiders don’t
hate algebra.

2. Let p be the proposition ‘Today is Monday’ and q is ‘I’ll go to


London’. Write the following propositions symbolically.

1. If today is Monday then I won’t go to London.


2. Today is Monday or I’ll go to London, but not both.
3. I’ll go to London and today is not Monday.
4. If and only if today is not Monday then I’ll go to London.

Solution:
1. p →q
2. p ˅q
3. q˄p
4. p↔q

23

You might also like