01 Logic1
01 Logic1
01 Logic1
2
Why Discrete Structures
• Rational Thinking
• To verify the validity of an argument
• Digital information is basically the manipulation of discrete objects in
computer memory
• In computer science the concepts of discrete structures are used in
• Analysis of Algorithms
• Theory of Automata
• Cryptography
• Networks and Operating Systems
• Database and Computer Architecture
• Apart from that, Discrete structures has its applications in
engineering, mathematics and science
3
Major Topics in Discrete Structures
• Propositions • Relations
• Predicates • Graphs
• Proofs • Trees
• Sets • Boolean Functions
• Functions
• Automata
• Algorithms
• Summation and Sequences
• Combinatorics
• Probability
4
Propositional Logic
• Logic
• Study of reasoning
• Not confined to mathematics or science only
• We use logic in our everyday conversation
• Presents a framework for reasoning for validating arguments
• Propositional Logic
• Logic concerned with statements or compound statements connected with
Boolean connectors
• Statement is often called a proposition (definition appears shortly)
5
Proposition
6
Proposition
7
Logical Operators or Connectors
8
Negation Operator
p ¬p
T F
F T
9
Conjunction Operator
10
Conjunction Operator: Truth Table
p q pq
T T T
T F F
F T F
F F F
11
The Disjunction Operator
12
Disjunction Operator: Truth Table
p q pq
T T T
T F T
F T T
F F F
13
Exclusive OR Operator
14
Exclusive OR: Truth Table
p q p q
T T F
T F T
F T T
F F F
15
Ambiguity of Natural Language
16
The implication Operator
17
The Implication Operator: Truth Table
p q p q
T T T
T F F
F T T
F F T
18