Discrete Structures
DSCR211
Chapter 1: Formal Logic
Introduction to Logic
Mathematics can be broadly classified into two categories −
Continuous Mathematics
Discrete Mathematics
Continuous Mathematics is based upon continuous number line or
the real numbers. It is characterized by the fact that between any two
numbers, there are almost always an infinite set of numbers. For example,
a function in continuous mathematics can be plotted in a smooth curve
without breaks.
Discrete Mathematics, on the other hand, involves distinct values;
i.e. between any two points, there are a countable number of points. For
example, if we have a finite set of objects, the function can be defined as
a list of ordered pairs having these objects, and can be presented as a
complete list of those pairs.
Introduction to Logic
Discrete Mathematics is a branch of mathematics
involving discrete elements that uses algebra and
arithmetic. It is increasingly being applied in the practical
fields of mathematics and computer science. It is a very
good tool for improving reasoning and problem-solving
capabilities.
Introduction to Logic
Goals of Discrete Mathematics
Mathematical Reasoning – Students must understand mathematical
reasoning in order to read, comprehend and construct
mathematical arguments. It includes the discussion of mathematical
logic which serves as a foundation for the subsequent discussion of
method of proof.
Combinatorial Analysis – An important problem – solving skill is the
ability to count or enumerate objects; it includes the discussion of
basic techniques of counting.
Discrete Structures – a course in discrete mathematics should teach
students how to work with discrete structures, which are the
abstract mathematical structures used to represent discrete objects
and relationships between these objects. These discrete structure
include set, permutations, relations, graphs, trees, and finite – state
machines.
Introduction to Logic
Algorithmic Thinking – certain classes of problems are
solved by the specification of an algorithm, Aftermath,
an algorithm has been described a computer program
can be constructed implementing it.
Application and Modeling – Discrete mathematics has
applications to almost every conceivable area of study.
There are many applications to computer science and
data networking .
Introduction to Logic
What is a logic?
it is technically defined as “the science or study of how to evaluate
arguments and reasoning.”
Logical reasoning
it is used in mathematics to prove theorems.
Mathematical Logic ( symbolic logic )
it is a branch of mathematics with close connections to computer
science.
Four (4) Divisions
1. Set Theory
2. Model Theory
3. Recursion Theory
4. Proof Theory
Mathematical Logic
Definition: Methods of reasoning, provides rules and
techniques to determine whether an argument is valid
Theorem: a statement that can be shown to be true
(under certain conditions)
Example: If x is an even integer, then x + 1 is an odd
integer
This statement is true under the condition that x is an integer is true.
Mathematical Logic
A statement, or a proposition, is a declarative sentence
that is either true or false, but not both
Uppercase letters denote propositions
Examples:
P: 2 is an even number (true)
Q: 7 is an even number (false)
R: A is a vowel (true)
The following are not propositions:
P: My cat is beautiful
Q: My house is big
Mathematical Logic
Truth value
One of the values “truth” (T) or “falsity” (F) assigned to
a statement
Examples:
1. Manila is the capital of the Philippines.
2. What day it is?
3. Help me, please.
4. He is handsome.
Logical Connectives
Proportional Variable
it is a variable which used to represent a statement.
Logical connectives
are used to combine simple statement which are
referred as compound statement.
Compound statement
it is a statement composed of two or more simple
statements connected by logical connectives. (and, or, if then,
not, if and only if, exclusive – or)
Simple (atomic) statement
a statement which is not compound.
Logical Connectives
Six (6) main logical connectives
1. Conjunction
2. Disjunction
3. Negation
4. Conditional
5. Bi-conditional
6. Exclusive - or
Logical Connectives
Conjunction
Let p and q be statements. The conjunction of
p and q, written p ^ q , is the statement formed
by joining statements p and q using the word
“and”
The statement p ^ q is true if both p and q are true; otherwise
p ^ q is false.
Truth Table for Conjunction:
Logical Connectives
Disjunction
Let p and q be statements. The disjunction of
p and q, written p v q , is the statement formed
by joining statements p and q using the word
“or”
The statement p v q is true if at least one of the
statements p and q is true; otherwise p v q is false
The symbol v is read “or”
Truth Table for Disjunction:
Logical Connectives
Negation
The negation of the statement p is
denoted by ~ p where ~ is the symbol for
not.
Ifp is true
The symbol ~ is read as not. , ~ is false.
Truth Table for Disjunction:
Logical Connectives
Conditional or Implication
Let p and q be statements. The statement “if p
then q” is called an implication or condition.
The conditional statement p q is false only
when p is true and q is false.
The implication “if p then q” is written p q
p is called the hypothesis, q is called the
conclusion
Truth Table for Implication:
Logical Connectives
Bi–conditional (Bi-implication)
Let p and q be statements. The statement “p if and only
if q” is called the bi-implication or bi-conditional of
p and q
Ifp and q are true or both false, then p q is true; if p
and q have opposite truth values, then p q is false.
The bi-conditional “p if and only if q” is written p q
“p if and only if q”
Truth Table for the Bi-conditional:
Logical Connectives
Exclusive – or
The exclusive – or of the statement p and q is the
compound statement p exclusive – or q.
Symbolic, p xor q, where xor is the symbol for exclusive
or.
If p and q are true or both false, then p xor q is false; if
p and q have opposite truth values, then p xor q is
true.
Logical Connectives
Precedence of logical connectives is:
~ highest
^ second highest
v third highest
→ fourth highest
↔ fifth highest
Truth Tables
Constructthe truth table for each of the following
statements:
1. ~p v ~q
2. p (p ~q )
3. (~p ^ q) v (p ^~q)
4. (p q) v (q ^ ~r)
Compound Statement
Three (3) important classes of compound
statement:
1. Tautology is a compound statement that is true for all
possible combinations of the truth values of the
propositional variables also called logical true.
2. Contradiction is a compound statement that is false
for all possible combinations of the truth values of its
propositional variables also called logically false or
absurdity.
3. Contingency is a compound statement that can be
either true or false depending on the truth values of
the propositional variables are neither a tautology nor
a contradiction.
Compound Statement
Example: Write the truth table for each of the following
compound statements and determine whether the
compound statement is tautology, contradiction or
contingency.
1. (~p ^ q) → q
2. (p → q) (p →~q)
3. (~p v q) xor (p → q)
Logical Equivalence
Logically Implies
A statement formula p is said to logically imply a
statement formula q if the statement formula p → q is a
tautology. If p logically implies q, then symbolically we
write p → q.
Logically Equivalent
A statement formula p is said to be logically equivalent
to a statement formula q if the statement formula
p ↔ q is a tautology. If p is logically equivalent to q,
then symbolically we write p q.
Variation of Conditional Statement
Implication
Let p: Today is Sunday and q: I will wash the car.
Conditional : p q :
If today is Sunday, then I will wash the car
The converse of this implication is written q p
If I wash the car, then today is Sunday
The inverse of this implication is written ~p ~p
If today is not Sunday, then I will not wash the car
The contrapositive of this implication is written ~q ~p
If I do not wash the car, then today is not Sunday
END……
Please do exercises :
Exercises 1.1 page 25
Exercises 1.2 A , B and C page 26
Exercises 1.3 page 27
Exercises 1.4 page 28
Exercises 1.5 A and B page 29