Lecture 1_Discrete Structure_Logic and Proof_ Part 1
Lecture 1_Discrete Structure_Logic and Proof_ Part 1
Hany Elnashar
Beni Suef National University
1st. Level, Spring Semester 2024
2 Course
Week 1
Logic and Proofs
Week 2
Week 3
Basic Structures
Week 4
Week 8
Counting
Week 9
Week 10
Discrete Probability
Week 11
Quizzes (Average) 10
Assignments 10
Tutorial Exam 5
Attendance 5
Final Exam 50
Week Action
3nd Quiz 1
5th Quiz 2
7th Mid-Term
9th Quiz 3
Any Questions?!
The connection between Discrete Structures and Cybersecurity lies in
the foundational mathematical concepts that underpin both fields.
Discrete structures, particularly areas like logic and graph theory,
provide the theoretical framework for designing algorithms and
protocols used in cybersecurity. For example, graph theory may be
applied to model and analyze network structures, while logic is
fundamental to designing secure cryptographic systems.
Certainly! Discrete structures, particularly concepts from mathematics and computer science, play a crucial role in various aspects of
cybersecurity. Here are some examples:
1. Cryptography:
1. Number Theory: Many cryptographic algorithms, such as RSA (Rivest-Shamir-Adleman), rely on number theory concepts like modular arithmetic
and prime factorization.
2. Boolean Algebra: Cryptographic algorithms often involve logical operations, and Boolean algebra is fundamental in designing secure
cryptographic functions.
2. Network Security:
1. Graph Theory: Network topology and connectivity can be represented and analyzed using graph theory. Detecting anomalies, identifying critical
nodes, and optimizing security measures benefit from graph-based models.
2. Set Theory: Security policies and access control mechanisms often rely on set theory principles to define and manage permissions for users or
devices.
4. Digital Forensics:
1. Combinatorics: In digital forensics, the analysis of large datasets involves combinatorial methods to identify patterns, anomalies, or correlations
among various data points.
2. Probability and Statistics: Understanding the probability of certain events (e.g., the likelihood of a particular type of cyber attack) is crucial in
assessing risks and making informed decisions.
6. Secure Protocols:
1. Formal Languages: Formal languages, a topic in discrete structures, are used to define the syntax and semantics of secure communication
protocols. Ensuring a clear and unambiguous communication structure is crucial for preventing security vulnerabilities.
7. Cryptographic Protocols:
10
Propositional Logic
Logical Operators
Propositional Equivalences
Proofs
12 Propositional Logic
A proposition is a declarative statement that’s either true (T) or false (F),
but not both.
Propositions:
1+1=2 (T)
2+2=3 (F)
Not Propositions:
X+1=2
p ¬p
F T
T F
16 Propositional Logic
Logical Operators - Negation
“Today is Friday “
p q pлq
F F F
F T F
T F F
T T T
18 Propositional Logic
Logical Operators - Conjunction
False on days that are not Fridays when it also does not
rain.
Propositional Logic
21
Logical Operators - Disjunction
Exclusive OR
not both”. T T F
22 Propositional Logic
Logical Operators - Implication
Suppose p and q are propositions, the conditional statement
(implication) of p and q is written as p q.
p q p q
F F T
F T T
T F F
T T T
23 Propositional Logic
Logical Operators - Implication
p q p q
F F T
F T F
T F F
T T T
25 Propositional Logic
Logical Operators: BI-Implication
The p q is proposition:
“You can take the flight if and only if you buy a ticket”.
p q p q q p p qлq p p q
F F T T T T
F T T F F F
T F F T F F
T T T T T T
27 Propositional Logic
Truth Table of Compound Propositions
Class Work
Sol.
F F T T F F
F T F F F T
T F T T F F
T T F T T T
29 Propositional Logic
Truth table of compound propositions
Precedence of logical operators
Order of precedence of Logical Operators , , , ,
Operator Precedence
¬ 1
л 2
ν 3
4
5
30 Propositional Logic
Truth Table of Compound Propositions
F F T T F T T
F T T F F T T
T F F T F T T
T T F F T F F
31 Translating English Sentence into a Logical
Expression
Sol.
(q ν ¬r) p
33 Propositional Logic
Exercises
When you buy a new car from Ace Motor Company, you
get $2000 back in cash or a 2% car loan but not both.
34 Propositional Logic
Exercises
SOL.
p q⊕r
35 Propositional Logic
Exercises
If more than 2 feet of snow falls or if the wind chill is below
-100, then school will be closed
36 Propositional Logic
Exercises
SOL.
pνq r
37 Example Application
Boolean searches
The connective
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 1 1 0
39 Propositional Logic
Example of Use on Bit String
Logic and Bit operations
A bit string is a sequence of zero or more bits. The length of this string is
the number of bits in the string.
0110110110
1100011101
Bitwise (OR) 1110111111
Bitwise (AND) 0100010100
Bitwise XOR 1010101011
40
Thank You