Lecture 1 Proposition
Lecture 1 Proposition
LECTURE #1
1
RECOMMENDED TEXTBOOK
2
From http://dictionary.oed.com:
Discrete adj.
1. a. Separate, detached from others,
individually distinct. Opposed to continuous.
2. a. Consisting of distinct or individual parts;
discontinuous.
3
APPLICATION AREA
4
TODAY’S TOPICS
5
PROPOSITION
Definition
A proposition is a declarative sentence (that is, a sentence
that declares a fact) that is either true or false, but not
both.
Example
• Washington, D.C., is the capital of the United States of America
• Dhaka is the capital of Bangladesh
• Dhaka is the capital of India
• 8 + 2 = 10 , 2 + 1= 3
• 4 + 4 = 10
6
PROPOSITION OR NOT?
7
SOME COMMON TERMS
The truth value
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.
8
SOME COMMON TERMS
Propositional Calculus or Propositional Logic.
The area of logic that deals with propositions is called the
propositional calculus or propositional logic.
Compound Propositions
New propositions formed from existing propositions using
logical operators are called compound propositions.
9
INTRODUCTION TO LOGICAL OPERATORS
• Similar to algebraic operators + * - /
Basic Operators
1. Negation (NOT)
2. Conjunction (AND)
3. Disjunction (OR)
10
LOGICAL OPERATORS: NOT
Definition
A “not” operation switches (negates) the truth value.
Symbol: or ~
Truth table
• If
P p
• ?
T F
F T
11
LOGICAL OPERATORS: AND
Definition
An “and” operation is true if both operands are true.
Symbol:
p q pq
p = “Today is Friday”
T T T
q = “Today is my birthday”
T F F
pq = ?
F T F
pq = “Today is Friday and today is my
F F F
birthday”
12
LOGICAL OPERATORS: OR
Definition
More Operators
1. Exclusive OR
2. Conditional
3. Bicondition
14
LOGICAL OPERATORS: CONDITIONAL
Definition
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.
pq = “If today is Friday, then today is my
birthday”
• In the conditional statement p→q,
• p is called the hypothesis (or antecedent or
premise)
• q is called the conclusion (or consequence)
15
Logical operators: Conditional
p → q = ¬p q
p q pq
the
T T T
the
antecedent consequence T F F I will
do
F T T only
Let, p = “Maria learns discrete mathematics” and
for
q = “Maria will find a good job.” F F T myself
Express the statement p→q as a statement in
English. If I am
elected,
then I will
lower taxes.
LOGICAL OPERATORS: BI-CONDITIONAL
Definition
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.
• “p is necessary and sufficient for
q”
• “if p then q, and conversely”
• “p iff q.”
17
LOGICAL OPERATORS: BI-CONDITIONAL
True when both has same truth values and otherwise false.
p q pq
• Alternatively, it means “(if p then q) and (if q T T T
then p)” (p→q)∧ (q→p).
T F F
• Note that a bi-conditional has the opposite
truth values of the exclusive or F T F
F F T
19
BOOLEAN OPERATORS SUMMARY
and or xor conditional Bi-conditional
p q pq pq pq pq pq
T T T T F T T
T F F T T F F
F T F T T T F
F F F F F T T
4+3*2 = ?
4+3*2 = 4+(3*2)
4+3*2 = (4+3)*2
21
Precedence of operators
Operators Precedence
p q ¬r → s ↔ t = ?
¬ 1
2
=(p (q (¬r)) → s) ↔ (t)
3
First three are the → 4
most important ↔ 5
NOT is always
performed before any
other operation
LOGIC AND BIT OPERATIONS
23
APPLICATIONS OF PROPOSITIONAL LOGIC
24
LOGICAL OPERATORS: EXCLUSIVE OR
Definition
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.
• Symbol: p q pq
• Often called XOR T T F
• pq (p q) ¬(p q)
T F T
pq = “Today is Friday or today is my birthday, F T T
but not both” F F F
25
TRANSLATING ENGLISH SENTENCES
Example
p = “It is below freezing”
q = “It is snowing”
It is below freezing and it is snowing pq
It is below freezing but not snowing p¬q
Solve:
Let, a = “You can access the Internet from campus,”
c = “You are a computer science major,” and
f = “You are a freshman,”
27
TRANSLATING ENGLISH SENTENCES
How can this English sentence be translated into a logical
expression?
“You can not ride the roller coaster if you are under 4 feet tall
unless you are older than 16 years old.”
Solution: Let q, r, and s represent “You can ride the roller
coaster,” “You are under 4 feet tall,” and “You are older than 16
years old,” respectively. Then the sentence can be translated to (r
∧ ¬s) → ¬q.
28
29
END OF LESSON