SlideShare a Scribd company logo
Discrete Structures (CS 335)
Lecture 2

Mohsin Raza
University Institute of Information
Technology PMAS Arid Agriculture University
Rawalpindi
Compound Propositions
Producing new propositions from existing propositions.

Logical Operators or Connectives
1. Not



2. And

˄

3. Or

˅

4. Exclusive or



5. Implication



6. Biconditional


Discrete Structures(CS 335)

2
Compound Propositions
Negation of a proposition
Let p be a proposition. The negation of p, denoted by
 p (also denoted by ~p), is the statement

“It is not the case that p”.
The proposition  p is read as “not p”. The truth
values of the negation of p,  p, is the opposite of the
truth value of p.

Discrete Structures(CS 335)

3
Examples
1. Find the negation of the following proposition

p : Today is Friday.
The negation is
 p : It is not the case that today is Friday.

This negation can be more simply expressed by
 p : Today is not Friday.

Discrete Structures(CS 335)

4
Examples
2. Write the negation of

“6 is negative”.
The negation is

“It is not the case that 6 is negative”.
or

“6 is nonnegative”.

Discrete Structures(CS 335)

5
Truth Table (NOT)
• Unary Operator, Symbol: 
p

p

true

false

false

true

Discrete Structures(CS 335)

6
Conjunction (AND)
Definition
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 p and q are
both true and is false otherwise.

Discrete Structures(CS 335)

7
Examples
1. Find the conjunction of the propositions p and q, where

p : Today is Friday.
q : It is raining today.
The conjunction is

p˄q : Today is Friday and it is raining today.

Discrete Structures(CS 335)

8
Truth Table (AND)
• Binary Operator, Symbol: 
p

q

pq

true

true

true

true

false

false

false

true

false

false

false

false

Discrete Structures(CS 335)

9
Disjunction (OR)
Definition

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.

Discrete Structures(CS 335)

10
Examples
1. Find the disjunction of the propositions p and q,
where

p : Today is Friday.
q : It is raining today.
The disjunction is

p˅q : Today is Friday or it is raining today.

Discrete Structures(CS 335)

11
Truth Table (OR)

• Binary Operator, Symbol: 
p

q

pq

true

true

true

true

false

true

false

true

true

false

false

false

Discrete Structures(CS 335)

12
Exclusive OR (XOR)
Definition

Let p and q be propositions. The exclusive or
of p and q, denoted by pq, is the proposition
“pq”.
The exclusive or, p  q, is true when exactly
one of p and q is true and is false otherwise.

Discrete Structures(CS 335)

13
Examples
1. Find the exclusive or of the propositions p and q,
where

p : Atif will pass the course CSC102.
q : Atif will fail the course CSC102.
The exclusive or is

pq : Atif will pass or fail the course CSC102.

Discrete Structures(CS 335)

14
Truth Table (XOR)

• Binary Operator, Symbol: 
p

q

pq

true

true

false

true

false

true

false

true

true

false

false

false

Discrete Structures(CS 335)

15
Examples (OR vs XOR)
The following proposition uses the (English) connective
“or”. Determine from the context whether “or” is intended
to be used in the inclusive or exclusive sense.

1. “Nabeel has one or two brothers”.
A person cannot have both one and two brothers.
Therefore, “or” is used in the exclusive sense.

Discrete Structures(CS 335)

16
Examples (OR vs XOR)
2. To register for BSC you must have passed
the qualifying exam or be listed as an Math
major.
Presumably, if you have passed the qualifying exam and
are also listed as an Math major, you can still register for
BCS. Therefore, “or” is inclusive.

Discrete Structures(CS 335)

17
Composite Statements
Statements and operators can be combined in any
way to form new statements.

p

q

p

q

(p)(q)

true

true

false

false

false

true

false

false

true

true

false

true

true

false

true

false

false

true

true

true

Discrete Structures(CS 335)

18
Translating English to Logic
I did not buy a lottery ticket this week or I bought a
lottery ticket and won the million dollar on Friday.
Let p and q be two propositions
p: I bought a lottery ticket this week.
q: I won the million dollar on Friday.

In logic form

p(pq)

Discrete Structures(CS 335)

19
Discrete Structures(CS 335)

20
Conditional Statements
Implication
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 is true otherwise.

where p is called hypothesis, antecedent or premise.
q is called conclusion or consequence

Discrete Structures(CS 335)

21
Implication (if - then)
• Binary Operator, Symbol: 
P

Q

PQ

true

true

true

true

false

false

false

true

true

false

false

true

Discrete Structures(CS 335)

22
Conditional Statements
Biconditional Statements
Definition:

Let p and q be propositions.
biconditional statement pq, is
proposition “p if and only if q”.

The
the

The biconditional (bi-implication) statement p
 q is true when p and q have same truth
values and is false otherwise.

Discrete Structures(CS 335)

23
Biconditional (if and only if)

• Binary Operator, Symbol: 
P

Q

PQ

true

true

true

true

false

false

false

true

false

false

false

true

Discrete Structures(CS 335)

24
Composite Statements
• Statements and operators can be combined in any way to
form new statements.

P

Q

P

Q

(P)(Q)

true

true

false

false

false

true

false

false

true

true

false

true

true

false

true

false

false

true

true

true

Discrete Structures(CS 335)

25
Equivalent Statements
P

Q

(PQ)

(P)(Q)

(PQ)(P)(Q)

true

true

false

false

true

true

false

true

true

true

false

true

true

true

true

false false

true

true

true

• Two statements are called logically equivalent if and only if (iff) they
have identical truth tables
• The statements (PQ) and (P)(Q) are logically equivalent,
because (PQ)(P)(Q) is always true.
Discrete Structures(CS 335)

26
Tautologies and Contradictions
• Tautology is a statement that is always true regardless of the truth
values of the individual logical variables

• Examples:
• R(R)
• (PQ)  (P)(Q)
• If S  T is a tautology, we write S  T.
• If S  T is a tautology, we write S  T.

Discrete Structures(CS 335)

27
Tautologies and Contradictions
• A Contradiction is a statement that is always false regardless of
the truth values of the individual logical variables

Examples
• R(R)
• ((PQ)(P)(Q))
• The negation of any tautology is a contradiction, and
the negation of any contradiction is a tautology.

Discrete Structures(CS 335)

28
Exercises
•We already know the following tautology:
•(PQ)  (P)(Q)

•Nice home exercise:
•Show that (PQ)  (P)(Q).
•These two tautologies are known as De Morgan’s laws.

Discrete Structures(CS 335)

29
Logical Equivalence
Definition
Two proposition form are called logically equivalent if
and only if they have identical truth values for each
possible substitution of propositions for their
proposition variable.

The logical equivalence of proposition forms P
and Q is written

P≡Q
Discrete Structures(CS 335)

30
Equivalence of Two Compound
Propositions P and Q
1. Construct the truth table for P.
2. Construct the truth table for Q using the
same proposition variables for identical
component propositions.
3. Check each combination of truth values of
the proposition variables to see whether the
truth value of P is the same as the truth
value of Q.

Discrete Structures(CS 335)

31
Equivalence Check
a. If in each row the truth value of P is the
same as the truth value of Q, then P and Q
are logically equivalent.
b. If in some row P has a different truth value
from Q, then P and Q are not logically
equivalent.

Discrete Structures(CS 335)

32
Example
• Prove that ¬ (¬p)≡ p
Solution

p
T
F

¬p
F
T

¬ (¬p)
T
F

As you can see the corresponding truth values of p
and ¬ (¬p) are same, hence equivalence is justified.
Discrete Structures(CS 335)

33
Example
Show that the proposition forms ¬(pq) and ¬p  ¬q
are NOT logically equivalent.

p
T
T
F
F

q
T
F
T
F

¬p
F
F
T
T

¬q
F
T
F
T

(pq) ¬(pq) ¬p¬q

T
F
F
F

F
T
T
T

F
F
F
T

Here the corresponding truth values
differ and hence equivalence does
not hold

Discrete Structures(CS 335)

34
De Morgan’s laws
De Morgan’s laws state that:
The negation of an and proposition is
logically equivalent to the or proposition in
which each component is negated.
The negation of an or proposition is logically
equivalent to the and proposition in which
each component is negated.

Discrete Structures(CS 335)

35
Symbolically (De Morgan’s Laws)

1. ¬(pq) ≡ ¬p¬q
2. ¬(pq) ≡ ¬p¬q

Discrete Structures(CS 335)

36
Applying De-Morgan’s Law
Question: Negate the following compound Propositions

1. John is six feet tall and he weights at least 200
pounds.
2. The bus was late or Tom’s watch was slow.

Discrete Structures(CS 335)

37
Solution
a) John is not six feet tall or he weighs less
than 200 pounds.
b) The bus was not late and Tom’s watch was
not slow.

Discrete Structures(CS 335)

38
Inequalities and De Morgan’s Laws
Question Use De Morgan’s laws to write the negation of

-1< x  4
Solution: The given proposition is equivalent to

-1 < x and x  4,
By De Morgan’s laws, the negation is

-1 ≥ x

or

x > 4.

Discrete Structures(CS 335)

39
Tautology and Contradiction
Definition A tautology is a proposition form that is
always true regardless of the truth values of the
individual propositions substituted for its proposition
variables. A proposition whose form is a tautology is
called a tautological proposition.

Definition A contradiction is a proposition form that is
always false regardless of the truth values of the
individual propositions substituted for its proposition
variables. A proposition whose form is a contradiction is
called a contradictory proposition.
Discrete Structures(CS 335)

40
Example
Show that the proposition form p¬p is a
tautology and the proposition form p¬p is a
contradiction.
p

¬p

p ¬p

p ¬p

T

F

T

F

F

T

T

F

Exercise: If t is a tautology and c
contradiction, show that pt≡p and pc≡c?
Discrete Structures(CS 335)

is

41
Laws of Logic
1. Commutative laws

pq ≡ qp ; pq ≡ qp
2. Associative laws
p  (q  r) ≡ (p q)  r ; p(q r) ≡ (pq)r

3. Distributive laws

p  (q r ) ≡ (p  q)  (p  r)
p  (q  r) ≡ (p  q)  (p  r)
Discrete Structures(CS 335)

42
Laws of Logic
4. Identity laws
p  t ≡ p ; pc ≡ p
5. Negation laws
p¬p ≡ t ; p  ¬p ≡ c
6. Double negation law
¬(¬p) ≡ p
7. Idempotent laws
p  p ≡ p ; pp ≡ p
Discrete Structures(CS 335)

43
Laws of Logic
8. Universal bound laws
pt≡t ;pc≡ c
9. Absorption laws
p (pq) ≡ p ; p (p  q) ≡ p
10. Negation of t and c
¬t ≡ c ; ¬c ≡ t
Discrete Structures(CS 335)

44
Exercise
Using laws of logic, show that

⌐(⌐p  q) (p  q) ≡ p.
Solution
Take ⌐(⌐p  q) (p  q)
≡ (⌐(⌐p)  ⌐q) (p  q), (by De Morgan’s laws)
≡ (p  ⌐q) (p  q),
≡ p (⌐q  q),

(by double negative law)

(by distributive law)
Discrete Structures(CS 335)

45
contd…
≡ p (q  ⌐q), (by the commutative law)
≡ p  c, (by the negation law)
≡ p, (by the identity law)
Skill in simplifying proposition forms is useful in
constructing logically efficient computer programs
and in designing digital circuits.
Discrete Structures(CS 335)

46
Another Example
Prove that ¬[r ∨ (q ∧ (¬r →¬p))] ≡ ¬r ∧ (p∨ ¬q)
¬[r ∨ (q ∧ (¬r → ¬p))]
≡ ¬r ∧ ¬(q ∧ (¬r → ¬p)),
≡ ¬r ∧ ¬(q ∧ (¬¬r ∨ ¬p)),
≡ ¬r ∧ ¬(q ∧ (r ∨¬p)),
≡ ¬r ∧ (¬q ∨ ¬(r ∨ ¬p)),
≡ ¬r ∧ (¬q ∨ (¬r ∧ p)),
≡ (¬r ∧¬q) ∨ (¬r ∧ (¬r ∧ p)),
≡ (¬r ∧¬q) ∨ ((¬r ∧ ¬r) ∧ p),
≡ (¬r ∧¬q) ∨ (¬r ∧ p),
≡ ¬r ∧ (¬q ∨ p),
≡ ¬r ∧ (p ∨¬q),

De Morgan’s law
Conditional rewritten as disjunction
Double negation law
De Morgan’s law
De Morgan’s law, double negation
Distributive law
Associative law
Idempotent law
Distributive law
Commutative law

Discrete Structures(CS 335)

47
Lecture Summery
• Logical Connectives
• Truth Tables
• Compound propositions
• Translating English to logic and logic to English.

• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions

• Laws of Logic
• Simplification ofDiscrete Structures(CS 335)
Compound Propositions

48
Ad

More Related Content

What's hot (20)

Propositional logic
Propositional logicPropositional logic
Propositional logic
ForwardBlog Enewzletter
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
IT Engineering Department
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Dr. Khaled Bakro
 
Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
IT Engineering Department
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
Mamta Pandey
 
Truth table
Truth tableTruth table
Truth table
Abdur Rehman
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
Janet Stemwedel
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
allyn joy calcaben
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
harman kaur
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
University of Potsdam
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
asad faraz
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
taimoor iftikhar
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Trivuz ত্রিভুজ
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
Joey Fontanilla Valdriz
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
allyn joy calcaben
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of Computation
Shiraz316
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
allyn joy calcaben
 
Module - 1 Discrete Mathematics and Graph Theory
Module - 1 Discrete Mathematics and Graph TheoryModule - 1 Discrete Mathematics and Graph Theory
Module - 1 Discrete Mathematics and Graph Theory
Adhiyaman Manickam
 
language , grammar and automata
language , grammar and automatalanguage , grammar and automata
language , grammar and automata
ElakkiyaS11
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
nszakir
 
Discrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional LogicDiscrete Math Lecture 01: Propositional Logic
Discrete Math Lecture 01: Propositional Logic
IT Engineering Department
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Dr. Khaled Bakro
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
Mamta Pandey
 
Translating English to Propositional Logic
Translating English to Propositional LogicTranslating English to Propositional Logic
Translating English to Propositional Logic
Janet Stemwedel
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
allyn joy calcaben
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
harman kaur
 
Discrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional LogicDiscrete Mathematics - Propositional Logic
Discrete Mathematics - Propositional Logic
University of Potsdam
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
asad faraz
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
taimoor iftikhar
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
allyn joy calcaben
 
Theory of Computation
Theory of ComputationTheory of Computation
Theory of Computation
Shiraz316
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
allyn joy calcaben
 
Module - 1 Discrete Mathematics and Graph Theory
Module - 1 Discrete Mathematics and Graph TheoryModule - 1 Discrete Mathematics and Graph Theory
Module - 1 Discrete Mathematics and Graph Theory
Adhiyaman Manickam
 
language , grammar and automata
language , grammar and automatalanguage , grammar and automata
language , grammar and automata
ElakkiyaS11
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
nszakir
 

Viewers also liked (13)

The logic
The logicThe logic
The logic
Nittaya Noinan
 
Want to know about java
Want to know about javaWant to know about java
Want to know about java
adityamadgula
 
Discrete mathematics
Discrete mathematicsDiscrete mathematics
Discrete mathematics
University of Potsdam
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
Janet Stemwedel
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
IIUM
 
Truth tables complete and p1 of short method
Truth tables complete and p1 of short methodTruth tables complete and p1 of short method
Truth tables complete and p1 of short method
Nat Karablina
 
Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures
Drishti Bhalla
 
MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.
Bob Binder
 
Lec 02 logical eq (Discrete Mathematics)
Lec 02   logical eq (Discrete Mathematics)Lec 02   logical eq (Discrete Mathematics)
Lec 02 logical eq (Discrete Mathematics)
Naosher Md. Zakariyar
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
University of Potsdam
 
Introduction to parliamentary debate
Introduction to parliamentary debateIntroduction to parliamentary debate
Introduction to parliamentary debate
Abhinandan Ray
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
blaircomp2003
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
guestd166eb5
 
Want to know about java
Want to know about javaWant to know about java
Want to know about java
adityamadgula
 
Logic (slides)
Logic (slides)Logic (slides)
Logic (slides)
IIUM
 
Truth tables complete and p1 of short method
Truth tables complete and p1 of short methodTruth tables complete and p1 of short method
Truth tables complete and p1 of short method
Nat Karablina
 
Propositions - Discrete Structures
Propositions - Discrete Structures Propositions - Discrete Structures
Propositions - Discrete Structures
Drishti Bhalla
 
MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.
Bob Binder
 
Lec 02 logical eq (Discrete Mathematics)
Lec 02   logical eq (Discrete Mathematics)Lec 02   logical eq (Discrete Mathematics)
Lec 02 logical eq (Discrete Mathematics)
Naosher Md. Zakariyar
 
Introduction to parliamentary debate
Introduction to parliamentary debateIntroduction to parliamentary debate
Introduction to parliamentary debate
Abhinandan Ray
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
blaircomp2003
 
Chapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound StatementsChapter 1 Logic of Compound Statements
Chapter 1 Logic of Compound Statements
guestd166eb5
 
Ad

Similar to Discrete Structures lecture 2 (20)

DMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptxDMS UNIT-1 ppt.pptx
DMS UNIT-1 ppt.pptx
DrMadhavaReddyCh
 
Discrete mathematics with applications by Susanna notes
Discrete mathematics with applications by Susanna notesDiscrete mathematics with applications by Susanna notes
Discrete mathematics with applications by Susanna notes
RajaMaaz1
 
Dscrete structure
Dscrete  structureDscrete  structure
Dscrete structure
Abdur Rehman
 
3 Topics ii Valid & Invalid Arguments.pptx.ppt
3 Topics ii Valid & Invalid Arguments.pptx.ppt3 Topics ii Valid & Invalid Arguments.pptx.ppt
3 Topics ii Valid & Invalid Arguments.pptx.ppt
AssadLeo1
 
DS Lecture 2.ppt
DS Lecture 2.pptDS Lecture 2.ppt
DS Lecture 2.ppt
NomanMehboob4
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
jayarao21
 
DISCRETE MATHEMATICS for IT students.pptx
DISCRETE MATHEMATICS for IT students.pptxDISCRETE MATHEMATICS for IT students.pptx
DISCRETE MATHEMATICS for IT students.pptx
ReymartVillapea
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
Taymoor Nazmy
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
PriyalMayurManvar
 
Best presentation about discrete structure
Best presentation about discrete structureBest presentation about discrete structure
Best presentation about discrete structure
AssadLeo1
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
Omnia A. Abdullah
 
Let’s get started with with discrete math.pptx
Let’s get started with with discrete math.pptxLet’s get started with with discrete math.pptx
Let’s get started with with discrete math.pptx
JayLagman3
 
logic_lec4.ppt
logic_lec4.pptlogic_lec4.ppt
logic_lec4.ppt
noramohed732
 
dicrete math engineering all over presentation
dicrete math engineering all over presentationdicrete math engineering all over presentation
dicrete math engineering all over presentation
SakarSapkota1
 
Discrete Structure 2 for Bachelor of Science in Computer Science
Discrete Structure 2 for Bachelor of Science in Computer ScienceDiscrete Structure 2 for Bachelor of Science in Computer Science
Discrete Structure 2 for Bachelor of Science in Computer Science
glenwynnviernes
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
DakshBaveja
 
unit-3.pdf SRM MATHS DISCREATE MATHS 2024
unit-3.pdf SRM MATHS DISCREATE MATHS 2024unit-3.pdf SRM MATHS DISCREATE MATHS 2024
unit-3.pdf SRM MATHS DISCREATE MATHS 2024
bhuvaneshdp7
 
dma_ppt.pdf
dma_ppt.pdfdma_ppt.pdf
dma_ppt.pdf
BatoolKhan15
 
good teaching skills and other beautiful things
good teaching skills and other beautiful thingsgood teaching skills and other beautiful things
good teaching skills and other beautiful things
AssadLeo1
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
Amey Kerkar
 
Discrete mathematics with applications by Susanna notes
Discrete mathematics with applications by Susanna notesDiscrete mathematics with applications by Susanna notes
Discrete mathematics with applications by Susanna notes
RajaMaaz1
 
3 Topics ii Valid & Invalid Arguments.pptx.ppt
3 Topics ii Valid & Invalid Arguments.pptx.ppt3 Topics ii Valid & Invalid Arguments.pptx.ppt
3 Topics ii Valid & Invalid Arguments.pptx.ppt
AssadLeo1
 
MFCS PPT.pdf
MFCS PPT.pdfMFCS PPT.pdf
MFCS PPT.pdf
jayarao21
 
DISCRETE MATHEMATICS for IT students.pptx
DISCRETE MATHEMATICS for IT students.pptxDISCRETE MATHEMATICS for IT students.pptx
DISCRETE MATHEMATICS for IT students.pptx
ReymartVillapea
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
Taymoor Nazmy
 
Logic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptxLogic in Computer Science Unit 2 (1).pptx
Logic in Computer Science Unit 2 (1).pptx
PriyalMayurManvar
 
Best presentation about discrete structure
Best presentation about discrete structureBest presentation about discrete structure
Best presentation about discrete structure
AssadLeo1
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
Omnia A. Abdullah
 
Let’s get started with with discrete math.pptx
Let’s get started with with discrete math.pptxLet’s get started with with discrete math.pptx
Let’s get started with with discrete math.pptx
JayLagman3
 
dicrete math engineering all over presentation
dicrete math engineering all over presentationdicrete math engineering all over presentation
dicrete math engineering all over presentation
SakarSapkota1
 
Discrete Structure 2 for Bachelor of Science in Computer Science
Discrete Structure 2 for Bachelor of Science in Computer ScienceDiscrete Structure 2 for Bachelor of Science in Computer Science
Discrete Structure 2 for Bachelor of Science in Computer Science
glenwynnviernes
 
UNIT-III-PPT.pptx
UNIT-III-PPT.pptxUNIT-III-PPT.pptx
UNIT-III-PPT.pptx
DakshBaveja
 
unit-3.pdf SRM MATHS DISCREATE MATHS 2024
unit-3.pdf SRM MATHS DISCREATE MATHS 2024unit-3.pdf SRM MATHS DISCREATE MATHS 2024
unit-3.pdf SRM MATHS DISCREATE MATHS 2024
bhuvaneshdp7
 
good teaching skills and other beautiful things
good teaching skills and other beautiful thingsgood teaching skills and other beautiful things
good teaching skills and other beautiful things
AssadLeo1
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
Amey Kerkar
 
Ad

More from Ali Usman (20)

Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer Overview
Ali Usman
 
Islamic Arts and Architecture
Islamic Arts and  ArchitectureIslamic Arts and  Architecture
Islamic Arts and Architecture
Ali Usman
 
Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current Issues
Ali Usman
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 Web
Ali Usman
 
Database ,16 P2P
Database ,16 P2P Database ,16 P2P
Database ,16 P2P
Ali Usman
 
Database , 15 Object DBMS
Database , 15 Object DBMSDatabase , 15 Object DBMS
Database , 15 Object DBMS
Ali Usman
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMS
Ali Usman
 
Database , 13 Replication
Database , 13 ReplicationDatabase , 13 Replication
Database , 13 Replication
Ali Usman
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
 
Database ,11 Concurrency Control
Database ,11 Concurrency ControlDatabase ,11 Concurrency Control
Database ,11 Concurrency Control
Ali Usman
 
Database ,10 Transactions
Database ,10 TransactionsDatabase ,10 Transactions
Database ,10 Transactions
Ali Usman
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query Optimization
Ali Usman
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localization
Ali Usman
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction
Ali Usman
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 Semantic
Ali Usman
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
Ali Usman
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution Design
Ali Usman
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 Background
Ali Usman
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 Introduction
Ali Usman
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor Specifications
Ali Usman
 
Cisco Packet Tracer Overview
Cisco Packet Tracer OverviewCisco Packet Tracer Overview
Cisco Packet Tracer Overview
Ali Usman
 
Islamic Arts and Architecture
Islamic Arts and  ArchitectureIslamic Arts and  Architecture
Islamic Arts and Architecture
Ali Usman
 
Database ,18 Current Issues
Database ,18 Current IssuesDatabase ,18 Current Issues
Database ,18 Current Issues
Ali Usman
 
Database , 17 Web
Database , 17 WebDatabase , 17 Web
Database , 17 Web
Ali Usman
 
Database ,16 P2P
Database ,16 P2P Database ,16 P2P
Database ,16 P2P
Ali Usman
 
Database , 15 Object DBMS
Database , 15 Object DBMSDatabase , 15 Object DBMS
Database , 15 Object DBMS
Ali Usman
 
Database ,14 Parallel DBMS
Database ,14 Parallel DBMSDatabase ,14 Parallel DBMS
Database ,14 Parallel DBMS
Ali Usman
 
Database , 13 Replication
Database , 13 ReplicationDatabase , 13 Replication
Database , 13 Replication
Ali Usman
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
 
Database ,11 Concurrency Control
Database ,11 Concurrency ControlDatabase ,11 Concurrency Control
Database ,11 Concurrency Control
Ali Usman
 
Database ,10 Transactions
Database ,10 TransactionsDatabase ,10 Transactions
Database ,10 Transactions
Ali Usman
 
Database , 8 Query Optimization
Database , 8 Query OptimizationDatabase , 8 Query Optimization
Database , 8 Query Optimization
Ali Usman
 
Database ,7 query localization
Database ,7 query localizationDatabase ,7 query localization
Database ,7 query localization
Ali Usman
 
Database , 6 Query Introduction
Database , 6 Query Introduction Database , 6 Query Introduction
Database , 6 Query Introduction
Ali Usman
 
Database , 5 Semantic
Database , 5 SemanticDatabase , 5 Semantic
Database , 5 Semantic
Ali Usman
 
Database , 4 Data Integration
Database , 4 Data IntegrationDatabase , 4 Data Integration
Database , 4 Data Integration
Ali Usman
 
Database, 3 Distribution Design
Database, 3 Distribution DesignDatabase, 3 Distribution Design
Database, 3 Distribution Design
Ali Usman
 
Database ,2 Background
 Database ,2 Background Database ,2 Background
Database ,2 Background
Ali Usman
 
Database , 1 Introduction
 Database , 1 Introduction Database , 1 Introduction
Database , 1 Introduction
Ali Usman
 
Processor Specifications
Processor SpecificationsProcessor Specifications
Processor Specifications
Ali Usman
 

Recently uploaded (20)

machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and MLGyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
GyrusAI - Broadcasting & Streaming Applications Driven by AI and ML
Gyrus AI
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 

Discrete Structures lecture 2

  • 1. Discrete Structures (CS 335) Lecture 2 Mohsin Raza University Institute of Information Technology PMAS Arid Agriculture University Rawalpindi
  • 2. Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not  2. And ˄ 3. Or ˅ 4. Exclusive or  5. Implication  6. Biconditional  Discrete Structures(CS 335) 2
  • 3. Compound Propositions Negation of a proposition Let p be a proposition. The negation of p, denoted by  p (also denoted by ~p), is the statement “It is not the case that p”. The proposition  p is read as “not p”. The truth values of the negation of p,  p, is the opposite of the truth value of p. Discrete Structures(CS 335) 3
  • 4. Examples 1. Find the negation of the following proposition p : Today is Friday. The negation is  p : It is not the case that today is Friday. This negation can be more simply expressed by  p : Today is not Friday. Discrete Structures(CS 335) 4
  • 5. Examples 2. Write the negation of “6 is negative”. The negation is “It is not the case that 6 is negative”. or “6 is nonnegative”. Discrete Structures(CS 335) 5
  • 6. Truth Table (NOT) • Unary Operator, Symbol:  p p true false false true Discrete Structures(CS 335) 6
  • 7. Conjunction (AND) Definition 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 p and q are both true and is false otherwise. Discrete Structures(CS 335) 7
  • 8. Examples 1. Find the conjunction of the propositions p and q, where p : Today is Friday. q : It is raining today. The conjunction is p˄q : Today is Friday and it is raining today. Discrete Structures(CS 335) 8
  • 9. Truth Table (AND) • Binary Operator, Symbol:  p q pq true true true true false false false true false false false false Discrete Structures(CS 335) 9
  • 10. Disjunction (OR) Definition 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. Discrete Structures(CS 335) 10
  • 11. Examples 1. Find the disjunction of the propositions p and q, where p : Today is Friday. q : It is raining today. The disjunction is p˅q : Today is Friday or it is raining today. Discrete Structures(CS 335) 11
  • 12. Truth Table (OR) • Binary Operator, Symbol:  p q pq true true true true false true false true true false false false Discrete Structures(CS 335) 12
  • 13. Exclusive OR (XOR) Definition Let p and q be propositions. The exclusive or of p and q, denoted by pq, is the proposition “pq”. The exclusive or, p  q, is true when exactly one of p and q is true and is false otherwise. Discrete Structures(CS 335) 13
  • 14. Examples 1. Find the exclusive or of the propositions p and q, where p : Atif will pass the course CSC102. q : Atif will fail the course CSC102. The exclusive or is pq : Atif will pass or fail the course CSC102. Discrete Structures(CS 335) 14
  • 15. Truth Table (XOR) • Binary Operator, Symbol:  p q pq true true false true false true false true true false false false Discrete Structures(CS 335) 15
  • 16. Examples (OR vs XOR) The following proposition uses the (English) connective “or”. Determine from the context whether “or” is intended to be used in the inclusive or exclusive sense. 1. “Nabeel has one or two brothers”. A person cannot have both one and two brothers. Therefore, “or” is used in the exclusive sense. Discrete Structures(CS 335) 16
  • 17. Examples (OR vs XOR) 2. To register for BSC you must have passed the qualifying exam or be listed as an Math major. Presumably, if you have passed the qualifying exam and are also listed as an Math major, you can still register for BCS. Therefore, “or” is inclusive. Discrete Structures(CS 335) 17
  • 18. Composite Statements Statements and operators can be combined in any way to form new statements. p q p q (p)(q) true true false false false true false false true true false true true false true false false true true true Discrete Structures(CS 335) 18
  • 19. Translating English to Logic I did not buy a lottery ticket this week or I bought a lottery ticket and won the million dollar on Friday. Let p and q be two propositions p: I bought a lottery ticket this week. q: I won the million dollar on Friday. In logic form p(pq) Discrete Structures(CS 335) 19
  • 21. Conditional Statements Implication 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 is true otherwise. where p is called hypothesis, antecedent or premise. q is called conclusion or consequence Discrete Structures(CS 335) 21
  • 22. Implication (if - then) • Binary Operator, Symbol:  P Q PQ true true true true false false false true true false false true Discrete Structures(CS 335) 22
  • 23. Conditional Statements Biconditional Statements Definition: Let p and q be propositions. biconditional statement pq, is proposition “p if and only if q”. The the The biconditional (bi-implication) statement p  q is true when p and q have same truth values and is false otherwise. Discrete Structures(CS 335) 23
  • 24. Biconditional (if and only if) • Binary Operator, Symbol:  P Q PQ true true true true false false false true false false false true Discrete Structures(CS 335) 24
  • 25. Composite Statements • Statements and operators can be combined in any way to form new statements. P Q P Q (P)(Q) true true false false false true false false true true false true true false true false false true true true Discrete Structures(CS 335) 25
  • 26. Equivalent Statements P Q (PQ) (P)(Q) (PQ)(P)(Q) true true false false true true false true true true false true true true true false false true true true • Two statements are called logically equivalent if and only if (iff) they have identical truth tables • The statements (PQ) and (P)(Q) are logically equivalent, because (PQ)(P)(Q) is always true. Discrete Structures(CS 335) 26
  • 27. Tautologies and Contradictions • Tautology is a statement that is always true regardless of the truth values of the individual logical variables • Examples: • R(R) • (PQ)  (P)(Q) • If S  T is a tautology, we write S  T. • If S  T is a tautology, we write S  T. Discrete Structures(CS 335) 27
  • 28. Tautologies and Contradictions • A Contradiction is a statement that is always false regardless of the truth values of the individual logical variables Examples • R(R) • ((PQ)(P)(Q)) • The negation of any tautology is a contradiction, and the negation of any contradiction is a tautology. Discrete Structures(CS 335) 28
  • 29. Exercises •We already know the following tautology: •(PQ)  (P)(Q) •Nice home exercise: •Show that (PQ)  (P)(Q). •These two tautologies are known as De Morgan’s laws. Discrete Structures(CS 335) 29
  • 30. Logical Equivalence Definition Two proposition form are called logically equivalent if and only if they have identical truth values for each possible substitution of propositions for their proposition variable. The logical equivalence of proposition forms P and Q is written P≡Q Discrete Structures(CS 335) 30
  • 31. Equivalence of Two Compound Propositions P and Q 1. Construct the truth table for P. 2. Construct the truth table for Q using the same proposition variables for identical component propositions. 3. Check each combination of truth values of the proposition variables to see whether the truth value of P is the same as the truth value of Q. Discrete Structures(CS 335) 31
  • 32. Equivalence Check a. If in each row the truth value of P is the same as the truth value of Q, then P and Q are logically equivalent. b. If in some row P has a different truth value from Q, then P and Q are not logically equivalent. Discrete Structures(CS 335) 32
  • 33. Example • Prove that ¬ (¬p)≡ p Solution p T F ¬p F T ¬ (¬p) T F As you can see the corresponding truth values of p and ¬ (¬p) are same, hence equivalence is justified. Discrete Structures(CS 335) 33
  • 34. Example Show that the proposition forms ¬(pq) and ¬p  ¬q are NOT logically equivalent. p T T F F q T F T F ¬p F F T T ¬q F T F T (pq) ¬(pq) ¬p¬q T F F F F T T T F F F T Here the corresponding truth values differ and hence equivalence does not hold Discrete Structures(CS 335) 34
  • 35. De Morgan’s laws De Morgan’s laws state that: The negation of an and proposition is logically equivalent to the or proposition in which each component is negated. The negation of an or proposition is logically equivalent to the and proposition in which each component is negated. Discrete Structures(CS 335) 35
  • 36. Symbolically (De Morgan’s Laws) 1. ¬(pq) ≡ ¬p¬q 2. ¬(pq) ≡ ¬p¬q Discrete Structures(CS 335) 36
  • 37. Applying De-Morgan’s Law Question: Negate the following compound Propositions 1. John is six feet tall and he weights at least 200 pounds. 2. The bus was late or Tom’s watch was slow. Discrete Structures(CS 335) 37
  • 38. Solution a) John is not six feet tall or he weighs less than 200 pounds. b) The bus was not late and Tom’s watch was not slow. Discrete Structures(CS 335) 38
  • 39. Inequalities and De Morgan’s Laws Question Use De Morgan’s laws to write the negation of -1< x  4 Solution: The given proposition is equivalent to -1 < x and x  4, By De Morgan’s laws, the negation is -1 ≥ x or x > 4. Discrete Structures(CS 335) 39
  • 40. Tautology and Contradiction Definition A tautology is a proposition form that is always true regardless of the truth values of the individual propositions substituted for its proposition variables. A proposition whose form is a tautology is called a tautological proposition. Definition A contradiction is a proposition form that is always false regardless of the truth values of the individual propositions substituted for its proposition variables. A proposition whose form is a contradiction is called a contradictory proposition. Discrete Structures(CS 335) 40
  • 41. Example Show that the proposition form p¬p is a tautology and the proposition form p¬p is a contradiction. p ¬p p ¬p p ¬p T F T F F T T F Exercise: If t is a tautology and c contradiction, show that pt≡p and pc≡c? Discrete Structures(CS 335) is 41
  • 42. Laws of Logic 1. Commutative laws pq ≡ qp ; pq ≡ qp 2. Associative laws p  (q  r) ≡ (p q)  r ; p(q r) ≡ (pq)r 3. Distributive laws p  (q r ) ≡ (p  q)  (p  r) p  (q  r) ≡ (p  q)  (p  r) Discrete Structures(CS 335) 42
  • 43. Laws of Logic 4. Identity laws p  t ≡ p ; pc ≡ p 5. Negation laws p¬p ≡ t ; p  ¬p ≡ c 6. Double negation law ¬(¬p) ≡ p 7. Idempotent laws p  p ≡ p ; pp ≡ p Discrete Structures(CS 335) 43
  • 44. Laws of Logic 8. Universal bound laws pt≡t ;pc≡ c 9. Absorption laws p (pq) ≡ p ; p (p  q) ≡ p 10. Negation of t and c ¬t ≡ c ; ¬c ≡ t Discrete Structures(CS 335) 44
  • 45. Exercise Using laws of logic, show that ⌐(⌐p  q) (p  q) ≡ p. Solution Take ⌐(⌐p  q) (p  q) ≡ (⌐(⌐p)  ⌐q) (p  q), (by De Morgan’s laws) ≡ (p  ⌐q) (p  q), ≡ p (⌐q  q), (by double negative law) (by distributive law) Discrete Structures(CS 335) 45
  • 46. contd… ≡ p (q  ⌐q), (by the commutative law) ≡ p  c, (by the negation law) ≡ p, (by the identity law) Skill in simplifying proposition forms is useful in constructing logically efficient computer programs and in designing digital circuits. Discrete Structures(CS 335) 46
  • 47. Another Example Prove that ¬[r ∨ (q ∧ (¬r →¬p))] ≡ ¬r ∧ (p∨ ¬q) ¬[r ∨ (q ∧ (¬r → ¬p))] ≡ ¬r ∧ ¬(q ∧ (¬r → ¬p)), ≡ ¬r ∧ ¬(q ∧ (¬¬r ∨ ¬p)), ≡ ¬r ∧ ¬(q ∧ (r ∨¬p)), ≡ ¬r ∧ (¬q ∨ ¬(r ∨ ¬p)), ≡ ¬r ∧ (¬q ∨ (¬r ∧ p)), ≡ (¬r ∧¬q) ∨ (¬r ∧ (¬r ∧ p)), ≡ (¬r ∧¬q) ∨ ((¬r ∧ ¬r) ∧ p), ≡ (¬r ∧¬q) ∨ (¬r ∧ p), ≡ ¬r ∧ (¬q ∨ p), ≡ ¬r ∧ (p ∨¬q), De Morgan’s law Conditional rewritten as disjunction Double negation law De Morgan’s law De Morgan’s law, double negation Distributive law Associative law Idempotent law Distributive law Commutative law Discrete Structures(CS 335) 47
  • 48. Lecture Summery • Logical Connectives • Truth Tables • Compound propositions • Translating English to logic and logic to English. • Logical Equivalence • Equivalence Check • Tautologies and Contradictions • Laws of Logic • Simplification ofDiscrete Structures(CS 335) Compound Propositions 48
  翻译: