DISCRETE MATHEMATICS – COMPLETE
OVERVIEW
1. 🔗 Logic and Propositional Calculus
➤ Propositions
● A proposition is a statement that is either true or false.
● Examples: “2 is even” (True), “5 > 10” (False)
➤ Logical Connectives
Symbol Name Meaning
¬p NOT Negation
p∧q AND True if both p and q are true
p∨q OR True if at least one is true
p→q IMPLICATION "If p then q"
p↔q BICONDITIONAL True if both p and q have the same truth
value
➤ Truth Tables
Use truth tables to analyze logical expressions.
➤ Logical Equivalences
Identity Example
Double Negation ¬(¬p) ≡ p
DeMorgan's Laws ¬(p ∧ q) ≡ ¬p ∨
¬q
Implication p → q ≡ ¬p ∨ q
2. 🔢 Set Theory
➤ Basic Definitions
● Set: A collection of distinct elements.
● Notation: A = {1, 2, 3}
➤ Set Operations
Operation Symbol Example
Union A∪B Elements in A or B
Intersection A∩B Elements in both A and B
Difference A−B In A but not in B
Complement A′ Not in A (within a universal set)
Power Set ℘(A) All subsets of A
3. 📶 Functions and Relations
➤ Functions
● A function f from A to B: f: A → B
● Types:
○ One-to-one (Injective): No duplicates in range
○ Onto (Surjective): All elements in codomain are mapped
○ Bijective: Both one-to-one and onto
➤ Relations
● A relation R on set A is a subset of A × A.
● Properties:
○ Reflexive: aRa
○ Symmetric: aRb → bRa
○ Transitive: aRb and bRc → aRc
○ Antisymmetric: aRb and bRa → a = b
➤ Equivalence Relation: Reflexive, symmetric, and transitive
➤ Partial Order: Reflexive, antisymmetric, and transitive
4. 📐 Algorithms and Complexity
➤ Big-O Notation
Describes upper bound of an algorithm’s runtime:
● O(1): Constant time
● O(log n): Logarithmic
● O(n): Linear
● O(n log n): Linearithmic
● O(n²): Quadratic
5. 📊 Counting and Combinatorics
➤ Basic Counting Rules
● Addition Rule: If A and B are disjoint, |A ∪ B| = |A| + |B|
● Multiplication Rule: For k independent choices, total = n₁ × n₂ × … × n
➤ Permutations
● Order matters:
nPr = n! / (n − r)!
➤ Combinations
● Order doesn’t matter:
nCr = n! / [r!(n − r)!]
➤ Binomial Theorem
(a+b)n=∑k=0n(nk)an−kbk(a + b)^n = \sum_{k=0}^{n} \binom{n}{k} a^{n-k}
b^k(a+b)n=k=0∑n(kn)an−kbk
6. 🎲 Probability
➤ Basic Probability
P(E)=Number of favorable outcomesTotal outcomesP(E) = \frac{\text{Number of favorable
outcomes}}{\text{Total outcomes}}P(E)=Total outcomesNumber of favorable outcomes
➤ Conditional Probability
P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A ∩ B)}{P(B)}P(A∣B)=P(B)P(A∩B)
➤ Bayes’ Theorem
P(A∣B)=P(B∣A)⋅P(A)P(B)P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}P(A∣B)=P(B)P(B∣A)⋅P(A)
7. 📉 Graphs and Trees
➤ Graph Basics
● G = (V, E): V = vertices, E = edges
● Undirected / Directed
● Weighted / Unweighted
➤ Graph Types
● Simple Graph: No loops or multiple edges
● Complete Graph: Every pair of vertices is connected (Kn)
● Bipartite Graph: Vertices can be split into two sets with no internal edges
➤ Graph Terminology
Term Description
Degree Number of edges incident to a vertex
Path Sequence of edges
Cycle Path that starts and ends at the same
vertex
Connecte Every pair of vertices is reachable
d
➤ Trees
● Acyclic, connected graph
● Tree with n vertices has (n − 1) edges
● Binary Tree: Each node has ≤2 children
● DFS / BFS: Depth-first & breadth-first traversal
8. 📉 Number Theory
➤ Divisibility & GCD
● a | b means a divides b
● GCD(a, b): Greatest common divisor (via Euclidean algorithm)
➤ Modular Arithmetic
● a ≡ b (mod n) ↔ n divides (a − b)
● Properties:
○ (a + b) mod n = [(a mod n) + (b mod n)] mod n
○ (a × b) mod n = [(a mod n) × (b mod n)] mod n
➤ Prime Numbers
● Only divisible by 1 and itself
● Fundamental Theorem: Every integer > 1 is a product of primes
9. 🔁 Recurrence Relations
➤ Recurrence
● Recursive formula:
E.g., Fibonacci:
F(n) = F(n−1) + F(n−2)
➤ Solving Recurrences
● Iteration
● Characteristic equations (linear recurrences)
● Master Theorem (for divide & conquer algorithms)
10. 🔣 Boolean Algebra
Operation Symbol Description
AND · A · B = 1 if both A and B = 1
OR + A + B = 1 if either A or B = 1
NOT ¬ ¬A = 1 if A = 0
➤ Laws
● Identity: A + 0 = A, A · 1 = A
● Domination: A + 1 = 1, A · 0 = 0
● Idempotent: A + A = A, A · A = A
● Complement: A + ¬A = 1, A · ¬A = 0
🧠 Bonus: Mathematical Induction
To prove statement P(n) is true for all n ≥ base:
1. Base Case: Prove P(1) is true
2. Inductive Hypothesis: Assume P(k) is true
3. Inductive Step: Prove P(k+1) follows from P(k)