DM Lecture 01
DM Lecture 01
IT -211
Lecture #01
Propositional Logic
A proposition is a declarative sentence (that is, a
sentence that declares a fact) that is either true or
false, but not both. e.g
1. Washington, D.C., is the capital of the United States of
America.
2. Toronto is the capital of Canada.
3. 1 + 1 = 2.
4. 2 + 2 = 3.
Propositions 1 and 3 are true, whereas 2 and 4 are false.
Propositional Logic
Some sentences that are not propositions
1. What time is it?
2. Read this carefully.
3. x + 1 = 2.
4. x + y = z.
Sentences 1 and 2 are not propositions because they
are not declarative sentences.
Sentences 3 and 4 are not propositions because they
are neither true nor false.
Propositional Logic
We use letters to denote propositional variables (or
statement variables), that is, variables that represent
propositions.
The conventional letters used for propositional
variables are p, q, r, s, . . . .
The truth value of a proposition is true, denoted by T,
if it is a true proposition, and the truth value of a
proposition is false, denoted by F, if it is a false
proposition.
Negation of Proposition
Let p be a proposition. The negation of p, denoted by
¬p , is the statement
“It is not the case that p.”
The proposition ¬p is read “not p.” The truth value of
the negation of p, ¬p, is the opposite of the truth value
of p.
E.g. “Michael’s PC runs Linux”
The negation is
“It is not the case that Michael’s PC runs Linux.” OR
“Michael’s PC does not run Linux.”
Conjunction
Let p and q be propositions.
The conjunction of p and q,
denoted by p ∧ q, is the
proposition “p and q.”
The conjunction p ∧ q is true
when both p and q are true
and is false otherwise.
Disjunction/ Inclusive OR
Let p and q be propositions.
The disjunction of p and q,
denoted by p ∨ q, is the
proposition
“p or q.” The disjunction p ∨ q
is false when both p and q are
false and is true otherwise
“Students who have taken
calculus or computer science
can take this class.”
Exclusive OR/ XOR
Let p and q be propositions.
The exclusive or of p and q,
denoted by p ⊕q, is the
proposition that is true when
exactly one of p and q is true
and is false otherwise.
“Students who have taken
calculus or computer science,
but not both, can enroll in this
class.”
Conditional Statements
Let p and q be propositions.
The conditional statement p
→ q is the proposition “if p,
then q.”
The conditional statement p
→ q is false when p is true
and q is false, and true
otherwise.
In the conditional statement
p → q, p is called the
hypothesis (or antecedent or
premise)and q is called the
conclusion (or consequence).
Conditional Statements
The statement p → q is called a conditional statement
because p → q asserts that q is true on the condition that p
holds.
A conditional statement is also called an implication.
E.g. “If I am elected, then I will lower taxes.” OR
“If you get 100% on the final, then you will get an A.”
Other ways to express this conditional statement:
1. “if p, then q”
2. “p implies q”
3. “if p, q”
4. “p only if q”
Conditional Statements
5. “p is sufficient for q”
6. “a sufficient condition for q is p”
7. “q if p”
8. “q whenever p”
9. “q when p”
10. “q is necessary for p”
11. “a necessary condition for p is q”
12. “q follows from p”
13. “q unless ¬p”
Conditional Statements
Let p be the statement “Maria learns discrete mathematics”
and q the statement “Maria will find a good job.” Express
the statement p → q as a statement in English.
1. “If Maria learns discrete mathematics, then she will find a
good job.”
2. “Maria will find a good job when she learns discrete
mathematics.”
3. “For Maria to get a good job, it is sufficient for her to learn
discrete mathematics.”
4. “Maria will find a good job unless she does not learn
discrete mathematics.”
CONVERSE, CONTRAPOSITIVE, AND
INVERSE
The proposition q → p is called the converse of p → q.
The contrapositive of p → q is the proposition ¬q →
¬p.
The proposition ¬p → ¬q is called the inverse of p → q.
only the contrapositive always has the same truth value as
p → q.
What are the contrapositive, the converse, and the inverse
of the conditional statement
“The home team wins whenever it is raining?”(q whenever p)
OR
“If it is raining, then the home team wins.” (p → q)
CONVERSE, CONTRAPOSITIVE, AND
INVERSE
The contrapositive of this conditional statement is
“If the home team does not win, then it is not raining.”
The converse is
“If the home team wins, then it is raining.”
The inverse is
“If it is not raining, then the home team does not win.”
BICONDITIONALS
Let p and q be
propositions. The
biconditional statement p
↔ q is the proposition “p if
and only if q.” The
biconditional statement p
↔q is true when p and q
have the same truth
values, and is false
otherwise. Biconditional
statements are also called
bi-implications.
BICONDITIONALS
There are some other common ways to express p ↔ q:
1. “p is necessary and sufficient for q”
2. “if p then q, and conversely”
3. “p iff q.”
Note that p ↔ q has exactly the same truth value as
(p → q) ∧ (q → p).
Let p be the statement “You can take the flight,” and
let q be the statement “You buy a ticket.” Then p ↔ q
is the statement,
“You can take the flight if and only if you buy a ticket.”