Professional Documents
Culture Documents
Lec 1 DM
Lec 1 DM
Lec 1 DM
Discrete vs Continuous
• Examples of discrete Data
• Logic
• Elementary Number Theory and Methods of Proof
• Set Theory
• Relations
• Sequences and Recursion
• Mathematical Induction
• Counting
• Relations and Equivalence Relations
• Graphs
• Trees
Reference Books
• Discrete Mathematics and its Applications
(with Combinatorics and Graph Theory)
6th Edition, The McGraw-Hill Companies, 2007,
Kenneth H. Rosen.
• Discrete Mathematics with Applications
2nd Edition, Thomson Learning, 1995,
Susanna S. Epp.
• Discrete Mathematics for Computer
Edition, Addison-Wesley, 1999,
Scientists John
Truss.
2nd
Logic
• Propositional Logic
• Logic of Compound Statements
• Propositional Equivalences
• Conditional Statements
• Logical Equivalences
• Valid and Invalid Arguments
• Applications: Digital Logic Circuits
• Predicates and Quantifiers
• Logic of Quantified Statements
What is Logic?
Logic: A science that deals with the principles and criteria
of validity of statements.
Examples
1. Is the following sentence a proposition? If it is a proposition,
determine whether it is true or false.
Paris is the capital of France.
This makes a declarative statement, which is
decidable. The proposition is TRUE (T).
Examples (Propositions Cont.)
x+ 4 > 9.
He is a college student.
EXAMPLES:
“6 is negative”.
The negation is
The truth table identifies all possible input combinations and the
output for each.
true false
false true
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.
Examples
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.
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.
Truth Table (OR)
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.
Or
When both inputs are same, the output is
false, and when both inputs are different, the
output is true
Examples
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
Translating English to Logic
In logic form
¬p∨(p∧q)
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.
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
Equivalent Statements
P Q ¬(P∧Q) (¬P)∨(¬Q) ¬(P∧Q)↔(¬P)∨(¬Q)
EXAMPLE:
• If S → T is a tautology, we write S ⇒ T.
• If S ↔ T is a tautology, we write S ⇔ T.
Tautologies and Contradictions
• A Contradiction is a statement that is always false regardless of
the truth values of the individual logical variables
• Exercise ¬(¬(P∧Q)↔(¬P)∨(¬Q))
• The negation of any tautology is a contradiction, and
the negation of any contradiction is a tautology.
DE MORGAN’S LAWS:
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
•¬(P∧Q) ⇔ (¬P)∨(¬Q)
•Show that ¬(P∨Q) ⇔ (¬P)∧(¬Q).
•These two tautologies are known as De Morgan’s laws.