Discrete Structures
Week 1: Introduction, Logic of Compound Statements
Assoc. Prof. M. AbdelNasser
CCS1001:Discrete Structures
Grading Policy
5 marks for Quiz (1) in sections
[week 3]
5 marks for delivering tasks in sections
[week 5]
20 marks for 7th week midterm
[week 7]
5 marks for Quiz (2) in sections
[week 10]
5 marks for delivering tasks in sections
[week 11]
10 marks for 12th week exam
[week 12]
10 marks for a project/report to the teaching assistant [week 12]
40 marks final exam
https://highered.mheducation.com/sites/125967651x/student_view0/index.html
Course Description
• The course provides an introduction to mathematical structures
fundamentals of computer science.
• Topics discussed include logic of compound and quantified
statements, number theory and methods of proof, sequences and
mathematical induction, set theory, counting methods, and relations.
• The course lays down the mathematical formulation necessary for
success in the computer science field.
[Chapter 1] The Foundations: Logic and Proofs
qPropositional Logic is the logical system built around propositions. From such
propositions one can build logical arguments and implications.
qLogic has practical applications to the design of computing machines, to the
specification of systems, to artificial intelligence, to computer programming,
to programming languages, and to other areas of computer science, as well as
to many other fields of study.
qTo understand mathematics, we must understand what makes up a correct
mathematical argument, that is, a proof.
qIn discrete mathematics, an argument refers to a sequence of statements or
propositions intended to determine the validity of a particular conclusion.
qOnce we prove a mathematical statement is true, we call it a theorem.
• Proofs are used to verify that computer programs produce the correct output
for all possible input values,
• Proofs are used to show that algorithms always produce the correct result.
• Proofs are used to establish the security of a system.
• Proofs are used to create artificial intelligence.
• In this chapter, we will explain what makes up a correct mathematical
argument and introduce tools to construct these arguments.
• We will introduce different proof methods that will enable us to prove many
different types of results.
• We will introduce several strategies for constructing proofs.
Propositions
Compound Propositions
• Compound Propositions are constructed from logical connectives and
other propositions.
q These tools are used for propositions only.
q Negation tool is used for ONE proposition.
q Conjunction (and), disjunction (or),
implies (if-then), biconditional (if and only
if) are used to connect TWO propositions.
q All tools are Binary except Negation.
Negation (NOT)
Conjunction (AND)
Drill 1: ¬q∧p
Disjunction (OR)
Drill 2: ¬p∧q
Exclusive OR
Example: p⊕q
I am at home or it is raining, but not both.
Implication (IF-Then)
Ans:
P: 2+2 =4
q: x:=x+1
The proposition p is always True
The proposition q is always False
See the ground truth table of implies
T implies F = F
T -> F = F
Different ways of Expressing the Implication
If I am at home then it is raining
If I am at home, it is raining
It is raining unless I am not at home
Converse, Contrapositive, Inverse
Biconditional (If and only If)
Expressing Biconditional
Drill
Drills’ answers
Drill 1: It is not raining, and I am at home.
Drill 2: I am not at home or it is raining .
Drill 3: All implies
a) T ⇒ F
F
b) F ⇒ T
T
c) F ⇒ F
T
d) F ⇒ F
T