Discrete Mathematics
Discrete Mathematics
Proposition
A proposition is a declarative statement that is either true (T) or false (F),
but not both.
Examples:
- "2 + 3 = 5" (True)
- "The Sum is a planet" (False)
- "x > 5 ( Not a proposition, as its truth value depends on x)
Logical Operators
Logical operators (also called connectives) are used to combine
propositions to form compound statements.
- Negation ( ¬ )
□ The negation of a proposition P is written as ¬ P.
□ It reverses the truth value of P.
□ Example: If P is "It is raining", then ¬ P is "It is not
raining".
P ¬P
T F
F T
- Conjunction (AND, ^)
□ The conjunction of P and Q, written as P ^ Q, is true only if
both P and Q are true.
□ Example: "It is raining and it is cold."
P Q P^Q
T T T
T F F
F T F
F F F
- Disjunction (OR, v)
□ The disjunction of P and Q, written as P v Q, is true if at
least one of P or Q is true.
□ Example: "I will go to the park or I will stay at home."
P Q PvQ
T T T
T F T
F T T
F F F
- Implication (→, "if… then")
□ The implication P → Q means "if P, then Q."
□ It is false only if P is true and Q is false.
Discrete Mathematics Page 1
□ It is false only if P is true and Q is false.
□ Example:
- If "It is raining" (P), then "The road is wet" (Q).
- If it rains and the road is not wet, the statement is false.
P Q P→Q
T T T
T F F
F T T
F F T
- Biconditional (↔," if and only if ")
□ The biconditional P ↔ Q is true if both propositions have
the same truth value.
□ Example: "You are enter if and only if you have a ticket."
P Q P↔Q
T T T
T F F
F T F
F F T
2. Domination Laws
- P ^ False = False
- P v True = True
3. Idempotent Law
- P^P=P
- PvP=P
4. Complement Laws
- P v ¬ P = T (True)
- P ^ ¬ P = F (False)
6. Commutative Law
- PvQ=QvP
- P^Q=Q^P
7. Associative Law
- P v (Q v R) = (P v Q) v R
8. Distributive Laws
- P ^ (Q v R) = (P ^ Q) v (P ^ R)
- P v (Q ^ R) = (P v Q) ^ (P v R)
9. Absortition Law
- P v (P ^ Q) = P
- P ^ ( P v Q) = P
Example:
Construct a Truth Table for (P v Q) → R
P Q R PvQ PvQ→R
T T T T T
T T F T F
T F T T T
T F F T F
F T T T T
F T F T F
F F T F T
F F F F T
Propositional Function
A propositional function is a expression the contains one or more variable
and becomes a proposition when the variables are assigned specific values.
- It is generally represented as P(x), where x is a variable.
- Unlike a proposition, a propositional function does not have a
definite truth value until the variable is substituted.
Example:
Discrete Mathematics Page 3
Example:
Statement: "x is greater than 5"
• Represented as: P(x): x > 5
• If x = 6, then P(6) is true
• If x = 4, then P(4) is false
Contradiction
A contradiction is a statement that is always false, regardless of the truth
values of its components. It is the opposite of a tautology (which is always
true).
- A contradiction occurs when a proposition and its negation are both
true in the same logical expression.
- Mathematically, a contradiction is represented as P ^ ¬ P (where P =
"It is raining").
Example:
- Statement: "It is raining and it is not raining at the same time."
- Logically: P ^ ¬P (where P = "It is raining")
- This statement is always false.
Truth Table
P ¬P P ^ ¬P
T F F
F T F
Since the result is always false, P ^ ¬P is a contradiction.
Tautology
A tautology is a logical statement that is always true, regardless of the truth
values of its components.
- It is the opposite of a contradiction (which is always false).
- Mathematically, a tautology is represented as P v ¬P (Laws of the
Excluded Middle).
Example
- Statement: "It is either raining or not raining."
- Logically: P v ¬P, where P = "It is raining"
- This statement is always true, no matter what.
Truth Table
Discrete Mathematics Page 4
Truth Table
P ¬P P v ¬P
T F T
F T T
Since the result is always true, P v ¬P is a tautology.
Implication
An implication is a logical statement that connects two propositions in the
form:
P→Q
This is read as "If P, then Q" (P implies Q).
- Here, P is called the hypothesis, and Q is called the conclusion
- The implication is false only when P is true and Q is false; otherwise,
it is always true.
Truth Table
P Q P→Q
T T T
T F F
F T T
F F T
Mathematical Induction
Mathematical Induction is a proof technique used to prove statements that
are defined for natural numbers (N). It is particularly useful for providing
formulas, inequalities, and properties of sequence or sums.
Quantifiers
Quantifiers are symbols used in logic and mathematics to specify the
quantity of elements in a set that satisfy a given property. They helps
express logical statements concisely and are essential in predicate logic.
Types of Quantifiers
There are two main types of quantifiers:
1. Universal Quantifier ( ∀ )
The universal quantifier (∀) expresses that a statement is true
for all elements in a given domain.
Notation:
∀x p(x)
This means "for all x, the statement P(x) is true."
Example:
1. Mathematical Statement
∀ x ∈ N, x + 0 = x
"for all natural number x, adding zero does not
change x."
2. Real-World Example
- "all human are mortal"
- Let P(x) be "x is mortal"
Algebraic Structure
An algebraic structure is not-empty set S with a binary operation * that
satisfies the closure property.
if (a * b) ∈ S
∀ (a , b) ∈ S
Here, * is a binary operation on S, meaning that performing the
operation on any two elements in S results in another element within S.
Example
- Consider the set S = {0, 1, 2, 3, 4, 5} with operation + .
- If we take any two elements, say 2 + 3 = 5 , the result is still in S.
- Thus, (S, +) forms an algebraic structure.
Semi-Group
An algebraic structure (S, *) is called a semigroup if it follows
associative property.
i.e. (a * b)* c = a*(b * c) ∀ a, b, c ∈ S
Key properties of a Semigroup:
- Binary Operation: The operation * is defined for all elements in
S.
- Associativity: Grouping of operations does not affect the result.
- No Identity Required: Unlike monoids, semigroups do not require
an identity element.
Example:
Set S Operation * Semigroup?
N (Natural Number) + (Addition) Yes
N X (Multiplication) Yes
Strings Concatenation Yes
2 * 2 Matrices Matrix Multiplication Yes
Set of all even numbers + (Addition) Yes
Set Z+ (Positive Integer) - (Subtraction) No
Monoids
A semigroup (S, *) is called Monoid if there exists an element 'e' ∈ S
such that
(a * e) = (e * a) = a ,∀ a ∈ S
Key properties of a Monoid
- Associativity: (a*b)*c = a*(b*c)
- Identity Element e: There exists an element e ∈ S such as a * e =
e*a=a
- Inverse in Not Required: Unlike groups, a monoid does not
require an inverse for every element.
Example
Group
A group is a monoid (S, *) with identity element e, where every
element has an inverse
∀ a ∈ S, ∃ b ∈ S such that (a*b) = (b*a) = e
Here, b is called inverse of a, denoted by a-1.
Key Features of a Group:
1. Closure: a*b ∈ S, ∀ a, b ∈ S
2. Associativity: (a * b)*c = a*(b*c), ∀ a, b, c ∈ S.
3. Identity Element: There exists an element e such that a * e = e * a
= a, ∀ a ∈ S
4. Inverse Element: For every a ∈ S, there exists a-1∈ S such that a *
a-1 = a-1 * a = e.
Example
Set S Operation Associa Identity Inverse Group
* tive? Exists? Exists? ?
Z (Integer) + Yes Yes (0) Yes (-a) Yes
(Addition)
Q* (Non-zero X Yes Yes (1) Yes Yes
Abelian Group
A Group (G, *) is said to be abelian group (or commutative group) if it
satisfies the commutative property:
(a * b) = (b * a), ∀ a, b ∈ G
Key Features of an Abelian Group
1. Closure: a * b ∈ G, ∀ a, b ∈ G
2. Associativity: (a * b)*c = a*(b * c), ∀ a, b, c ∈ G
3. Identity Element: There exists an element e such that a * e = e * a
= a, ∀ a ∈ G
4. Inverse Element: For every a ∈ G there exists a-1 ∈ G such that a *
a-1 = a-1 * a = e.
5. Commutativity: a * b = b * a, ∀ a, b ∈ G.
Example
Set G Operat Closu Associ Identit Invers Comm Abelian
ion * re ? ative ? y ? e? utative Group
? ?
Z + Yes Yes 0 Yes (- Yes Yes
(Integer (Additi a)
s) on)
Q* X Yes Yes 1 Yes Yes Yes
(Non- (Multip
Zero lication
Rational )
Number
)
2*2 Matrix Yes Yes Identit Invers Invers No (AB
Discrete Mathematics Page 10
2*2 Matrix Yes Yes Identit Invers Invers No (AB
Matrice Multipl y e Exists BA
s ication Matrix Exists in
general
)
Rn (Real + Yes Yes 0 Yes (- Yes Yes
Number a)
s Under
Addition
)
Introduction
Graph Theory is a branch of discreate mathematics that deals with graphs,
which are mathematical structures used to model pairwise relationships
between objects.
Types of Graphs
1. Undirected Graph: Edges have no direction
2. Directed Graph: Edges have direction
3. Weighted Graph: Edges have weights or costs
4. Simple Graph: No loops or multiple edges
5. Multigraph: Can have multiple edges between the same vertices
6. Complete Graph: Every pair of vertices is connected by an edge
7. Null Graph: No edges at all.
Connectivity
To measure the connectedness of a graph G we consider the minimum
number of vertices and edges to be removed from the graph in order to
disconnect it.
• Edge Connectivity
- The edge connectivity is the minimum number of edges that need
to be removed to disconnect the graph
- Denoted by
• Vertex Connectivity
- The vertex connectivity of a graph is the minimum number of
vertices that need to be removed to disconnect the graph or make
Discrete Mathematics Page 12
vertices that need to be removed to disconnect the graph or make
it trivial (one vertex).
- Denoted by
Traversals
Graph Traversal means visiting all the vertices of a graph in a specific
order. It's essential for searching, analyzing, and solving problems on
graphs (like shortest paths, connectivity, etc.)
There are two primary types of graph traversals:
How it Works:
• Use a Queue (FIFO) to track the next vertex to visit
• Mark visited vertices to avoid repetition.
Applications:
• Shortest path in unweighted graphs
• Web crawling
• Social network analysis
How it works:
• Use a stack (LIFO) or recursion
• Mark visited vertices to prevent cycles
Applications:
• Solving puzzles like mazes
• Detecting cycles in a graph
• Topological sorting
Lattices
A Lattice is a special type of partially ordered set (POSET) in which every
pair of elements has a unique least upper bound and greatest lower bound.
Application of Lattices
• Logic and Boolean algebra
Discrete Mathematics Page 13
• Logic and Boolean algebra
• Switching circuits and digital design
• Database query optimization
• Cryptography and security models
• Formal concept analysis
Semi-Lattices
A Semi-Lattice is a special kind of partially ordered set (poset) that
supports only one of the two lattice operations - either join (v) or meet (^) -
but not necessarily both.
Types of semi-Lattices
a) Join Semi-Lattices
• Operation: Join (v) = Least Upper Bound (LUB)
• For any two elements a, b, their join a v b exists in the set.
b) Meet Semi-Lattices
• Operation: Meet (^) = Greatest Lower Bound (GLB)
• For any two elements a, b, their meet a ^ b exists in the set
Sub Lattices
A sub lattice is exactly what it sounds like: a subset of a lattice that itself
forms a lattice under the same meet and join operations.
Boolean Lattices
A Boolean Lattice is a special kind of distributive lattice that models the
structure of Boolean algebra - the foundation of digital logic and set theory.
Geometric Lattice
A geometric lattice is a finite, atomistic, semi modular lattice that often
arises in geometry, combinatorics and matroid theory.
Finite Fields
A finite fields is a field that contains a finite number of elements, where
all field properties (like addition, multiplication, inverses) hold.
A finite field (or Galois Field) is a field that contains a finite number of
elements, denoted by GF(q), where:
▪ p = a prime number
▪ q = a positive integer
The number of elements in any finite field is always a power of a prime.
Integral Domain
An integral domain is a commutative ring with unity ( 1 0 ) that also
satisfies the no zero divisors property.
Formally:
1. R is commutative under multiplication:
a.b=b.a
2. R has multiplicative identity ( 1 0 )
3. There are no zero divisors:
if a . b = 0, then either a = 0 or b = 0
Field
A field is a set F equipped with two operations:
○ Addition ( + )
○ Multiplication ( X )
Field Extension
A field extension is a bigger field that contains as a subfield.
Notation:
E/F
Means:
• E is a field extension of F
• F E
This means all operations of F are valid inside E, and E includes new
elements not in F.
Existence Theorem
The existence Theorem states that for every boolean function, there
exists a boolean expression (in terms of boolean variables and
operations like AND, OR, and NOT) that represents it.
We can construct:
▪ A sum of products (SOP) expression
▪ A product of sum (POS) expression
Boolean Algebra
Boolean Function
A Boolean function is a function that takes binary inputs (0 or 1) and
gives a binary output (0 or 1)
Formally: