0% found this document useful (0 votes)
16 views29 pages

Lecture 1 Proposition

The document is a lecture on discrete mathematics, focusing on propositional logic and logical operators. It defines key concepts such as propositions, truth values, and various logical operators including AND, OR, and NOT, along with their applications. The lecture also includes examples and exercises for translating English sentences into logical expressions.

Uploaded by

joy331456
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views29 pages

Lecture 1 Proposition

The document is a lecture on discrete mathematics, focusing on propositional logic and logical operators. It defines key concepts such as propositions, truth values, and various logical operators including AND, OR, and NOT, along with their applications. The lecture also includes examples and exercises for translating English sentences into logical expressions.

Uploaded by

joy331456
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

DISCRETE MATHEMATICS

LECTURE #1

1
RECOMMENDED TEXTBOOK

 Discrete Mathematics and Its Applications by Kenneth H.


Rosen

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.

According to writer Kenneth H. Rosen-


Discrete mathematics is the part of mathematics
devoted to the study of discrete objects.

3
APPLICATION AREA

• Advanced algorithms & data • Database management


structures systems
• Programming language • Cryptography
compilers & interpreters. • Error correction codes
• Computer networks • Graphics & animation
• Operating systems algorithms, game
• Computer architecture engines, etc.…
• I.e., the whole field!

4
TODAY’S TOPICS

• Basic Propositional Logic


• Variable Based Propositional Logic
• Logical Operators

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?

• What time is it?


• Read this carefully.
• a + 2 = 10
• x+y =z

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.

p = Dhaka is the capital of Bangladesh. Truth value :


T
p = Dhaka is the capital of Pakistan. Truth value : F

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 pq
p = “Today is Friday”
T T T
q = “Today is my birthday”
T F F
pq = ?
F T F
pq = “Today is Friday and today is my
F F F
birthday”
12
LOGICAL OPERATORS: OR
Definition

An “or” operation is true if either operands or both are


true.
Symbol:  p q pq
p = “Today is Friday”
T T T
q = “Today is my birthday”
T F T
pq=?
F T T
p  q = “Today is Friday or today is my
birthday” F F F
13
MORE LOGICAL OPERATORS

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.
pq = “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 pq

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 pq
• 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

• Let p = “You take this class” and q = “You get a grade”


• pq = “You take this class if and only if you get a
grade”
• Alternatively, it means “If you take this class, then you
get a grade and if you get a grade then you take (took)
this class”
TRUTH TABLES OF COMPOUND
PROPOSITIONS
Example
Construct the truth table of the compound proposition
(p∨¬q)→(p∧q).

19
BOOLEAN OPERATORS SUMMARY
and or xor conditional Bi-conditional
p q pq pq pq pq pq
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

Learn what they mean, don’t just memorize the


table!
20
PRECEDENCE OF OPERATORS

• Just as in algebra, operators have precedence

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

• Translating English Sentences


• System Specifications
• Boolean Searches
• Logic Puzzles
• Logic Circuits

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 pq
• Often called XOR T T F
• pq  (p  q)  ¬(p  q)
T F T
pq = “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 pq
It is below freezing but not snowing p¬q

If it is below freezing, it is also snowing p→q


It is either below freezing or it is snowing, but it
is not snowing if it is below freezing (pq)(p→¬q)

That it is below freezing is necessary and p↔q


sufficient for it to be snowing
26
TRANSLATING ENGLISH SENTENCES
Problem: How can this English sentence be translated into a logical expression?
“You can access the Internet from campus only if you are a computer science
major or you are not a freshman.”

Solve:
Let, a = “You can access the Internet from campus,”
c = “You are a computer science major,” and
f = “You are a freshman,”

Then the statement can be represented as a → (c ∨ ¬f).

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

Thanks to all !!!

You might also like