You are on page 1of 18

DISCRETE

MATHEMATICS
Logic and Proofs

• Logic – is the study of reasoning; it is specifically concerned with


whether reasoning is correct. Logic focuses on the relationships
among statements as opposed to the content of any particular
statement.
• All mathematicians wear sandals
• Anyone who wear sandals is an algebraist
• Therefore, all mathematicians are algebraist
Logic

• Logic – used to distinguish between valid and invalid


mathematical arguments.
• Logic was developed by Aristotle
• Application in computer science – design computer circuits,
construction of computer program, verification of the
correctness of programs.
• Logic is a system based on proposition
Understanding Logic
• At one time, the following ordinance was in effect in Naperville, Illinoi:
• “It shall be unlawful for any person to keep more than three dogs and three cats upon
his property within the city.
• Was one of the citizens ,who owned five dogs and no cats, in the violation of the
ordinance.
Propositions
• Propositions – is a declarative sentence or statement that is either true or false, but
not both.
• Which of sentences (a)-(e) are either true or false (but not both)?
a) The only positive integers that divide 7 are 1 and 7 itself
b) For every positive integer n , There is a prime number larger than n.
c) Earth is the only planet in the universe that contains life.
d) Mrs. Aiza Traya is the school registrar here in ACC.
e) Give me a one tablespoon of white sugar for my coffee.
Propositions
a) It is an another way to say 7 is a prime number, is true
b) It is an another way to say that the number of primes is infinite,
is true
c) Is either true or false (but not both), but no one knows which of
this time.
d) Mrs. Aiza Traya is the school registrar in ACC, is false.
e) Is neither true nor false [ it is a command ].
Propositions
• A proposition is typically expressed as declarative sentence (as opposed to the
questions or command, etc.).
• Propositions are the basic building blocks of any theory of logic.
• Variables such as p , q , and r.
• To represent propositions ,much as we use letters in algebra to represents numbers.
We will also use the notation
• p : 1+1 = 3
It define p to be the proposition 1 + 1 = 3.
Propositions
• In ordinary speech and writing, we combine propositions using connectives such as
and and or .
• For example, the propositions “It is raining” and “It is cold” can be combine into one
proposition “It is raining and It is cold”
Let p and q be propositions.
The conjunction of p and q, denoted p ∧ 𝑞, is the proposition:
p and q
The disjunction of p and q, denoted p ∨ 𝑞, is the proposition:
p or q
Propositions
The operator ∧ assigns to each pair of propositions p and q the proposition:
p ∧ q, thus,∧is a binary operator on propositions.
If
p: It is raining
q: It is cold
The conjunction of p and q is
p ∧ q : It is raining and it is cold.
The disjunction of p and q is
p V q : It is raining or it is cold.
Propositions
The truth value of the conjunction p ∧ q is determined by the truth values of p and q,
and the definition is based upon the usual interpretation of “and”. Consider the
proposition:
p ∧ q : It is raining and it is cold.
If it is raining (i.e., is true ) and it is also cold (i.e. , q is also true)
So we would consider that the proposition
p ∧ q : It is raining and it is cold is true.
Truth table

• that displays the relationships between the truth


values of the simple propositions and the compound
proposition
• The truth values of propositions such as
conjunctions and disjunctions can be describe by
truth table.
Truth Table of p ∧ q
P Q p∧q
T T T
T F F
F T F
F F F
Truth Table of p∨q
P Q p∨q
T T T
T F T
F T T
F F F
Propositions
The final operator on a proposition p that we will discuss in these section is the negation
of p.
The negation of p is denoted ¬ p
• not p
• The truth table for the proposition ¬ p is defined by the truth table:
P ¬P
T F
F T
Propositions
Note:
In expressions involving some or all of the operators ¬ , ∧ and V in the absence of
parenthesis, we first evaluate ¬ , then ∧ and then V. we call such a convention operator
precedence.
Given the proposition p is True, q is False and r is false
¬ (p V q) ∧ r
Give the truth VALUE of the equation:
p ∧ ¬ r Vq
p q r ¬r p∧¬r p ∧ ¬ r Vq
T T T F F T
T T F T T T
T F T F F F
T F F T T T
F T T F F T
F T F T F T
F F T F F F
F F F T F F
Formulate the symbolic expression into words
p: It is raining
q: It is not cold
• ¬p
• It is not raining
• ¬q
• It is cold
• ¬ qVp
• It is cold or it is raining.
Formulate the symbolic expression into words
p: A decade is 10 years
q: A millennium is 100 years
r: A century is 1000 years
• p∧q
• A decade is 10 years and a millennium is 100 years.
• ¬q
• A millennium is not 100 years
• ¬ qVp ∧ ¬ r
• A millennium is not 100 years or a decade is 10 years and a century is not 1000 years

You might also like