DS Lecture 1
DS Lecture 1
DS Lecture 1
Aleena Rehman
ZUFESTM - Ziauddin University Faculty of
Engineering & Management
Discrete vs Continuous
• Logic
• Elementary Number Theory and Methods of Proof
• Set Theory
• Relations
• Sequences and Recursion
• Mathematical Induction
• Counting
• Relations and Equivalence Relations
• Graphs
• Trees
Marks Distribution
Category Marks
Final Exam 40
Midterm Exam 20
Assignments (4) 10
Quizzes (4) 10
Presentation 20
Students must maintain at least 80% attendance to be eligible to sit for the
midterm and final exams.
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 Scientists
2nd Edition, Addison-Wesley, 1999,
John Truss.
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
Propositional Logic
Proposition: A proposition (or Statement) is a declarative
sentence (that is, a sentence that declares a
fact) that is either true or false, but not both.
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, and hence is a
proposition. The proposition is TRUE (T).
Examples (Propositions Cont.)
not a proposition.
Examples (Propositions Cont.)
x+ 4 > 9.
He is a college student.
1. Not
2. And ˄
3. Or ˅
4. Exclusive or
5. Implication
6. Biconditional
Compound Propositions
Negation of a proposition
Negates a proposition, meaning it changes True (T)
to False (F) and vice versa.
It is not the case that “p”.
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.
“6 is negative”.
The negation is
p p
true false
false true
Conjunction (AND)
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
p : Today is Friday.
q : It is raining today.
The conjunction is
p q pq
true true true
true false false
false true false
false false false
Disjunction (OR)
p : Today is Friday.
q : It is raining today.
The disjunction is
p q pq
true true true
true false true
false true true
false false false
Exclusive OR (XOR)
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
I did not buy a lottery ticket this week or I bought a lottery ticket and won
the million dollar on Friday.
Breakdown:
•"I did not buy a lottery ticket this week": This is a negation.
•If p represents "I bought a lottery ticket this week", then the negation of
this is ¬p (meaning "I did not buy a lottery ticket this week").
•"I bought a lottery ticket and won the million dollar on Friday": This
is a conjunction. If q represents "I bought a lottery ticket" and r
represents "I won the million dollar on Friday", the conjunction is q ∧ r
(meaning "I bought a lottery ticket and I won the million dollar on Friday").
Conditional Statements
P Q PQ
true true true
true false false
false true true
false false true
Conditional Statements
Biconditional Statements
Let p and q be propositions. The biconditional statement
pq, is the proposition “p if and only if q”.
The biconditional (bi-implication) statement p
q is true when p and q have same truth
values and is false otherwise.
Biconditional (if and only if)
• Examples:
• R(R)
(PQ) (P)(Q)
Contradictions
• A Contradiction is a statement that is always false regardless of
the truth values of the individual logical variables
Examples
• R(R)
((PQ)(P)(Q))