Mathematical Logic & Predicate Calculus
Propositional Equivalences, Normal Forms & Inference Rules
Open Full Lesson →Conditional Implication p -> q is logically equivalent to ~p v q, and its Contrapositive ~q -> ~p. It is FALSE only when p is True and q is False.
Must-Remember Principles:- —Implication Law: p -> q <=> ~p v q.
- —Contrapositive Law: p -> q <=> ~q -> ~p (Strictly Equivalent).
- —Converse: q -> p (NOT logically equivalent to p -> q).
- —Inverse: ~p -> ~q (NOT logically equivalent to p -> q).
- —De Morgan's Laws: ~(p ^ q) <=> ~p v ~q; ~(p v q) <=> ~p ^ ~q.
- —Modus Ponens: From p and p -> q, infer q.
- —Modus Tollens: From ~q and p -> q, infer ~p.
- —Resolution Rule: From (p v q) and (~p v r), infer (q v r).
Critical Pitfalls & Exam Traps:- ×The converse (q -> p) and inverse (~p -> ~q) are equivalent to each other, but NEITHER is equivalent to the original implication (p -> q).
- ×p <-> q is true when p and q share the same truth value. p <-> q <=> (p -> q) ^ (q -> p).
Mathematical Logic & Predicate Calculus
First-Order Predicate Logic, Nested Quantifiers & Translations
Open Full Lesson →Negation duality: ~(forall x P(x)) <=> exists x ~P(x), and ~(exists x P(x)) <=> forall x ~P(x). Swapping forall and exists changes truth value.
Must-Remember Principles:- —Universal Translation: 'All A are B' => forall x (A(x) -> B(x)). NEVER use ^ here.
- —Existential Translation: 'Some A are B' => exists x (A(x) ^ B(x)). NEVER use -> here.
- —Quantifier Order Non-Equivalence: forall x exists y P(x, y) is NOT equivalent to exists y forall x P(x, y).
- —Duality of Null Quantifiers: If x does not appear free in A, then forall x (A v B(x)) <=> A v forall x B(x).
Critical Pitfalls & Exam Traps:- ×'Every student passed' is forall x (Student(x) -> Passed(x)). If you write forall x (Student(x) ^ Passed(x)), it falsely claims every object in the universe is a student!
- ×exists y forall x P(x, y) strictly implies forall x exists y P(x, y), but the converse is FALSE.
Sets, Relations, POSETs & Lattices
Relations, Closures, Equivalence Partitions & Counting
Open Full Lesson →For a set of size n: Reflexive = 2^{n^2 - n}, Symmetric = 2^{n(n+1)/2}, Anti-symmetric = 2^n * 3^{n(n-1)/2}, Reflexive & Symmetric = 2^{n(n-1)/2}.
Must-Remember Principles:- —Total Relations on set of size n: 2^{n^2}.
- —Reflexive Relations: 2^{n^2 - n} (diagonal pairs must be included).
- —Irreflexive Relations: 2^{n^2 - n} (diagonal pairs must be excluded).
- —Symmetric Relations: 2^{n(n+1)/2} (diagonal pairs can be in/out, off-diagonal symmetric pairs chosen together).
- —Anti-Symmetric Relations: 2^n * 3^{n(n-1)/2} (diagonal in/out, off-diagonal can be (a,b), (b,a), or neither).
- —Asymmetric Relations: 3^{n(n-1)/2} (no diagonal allowed).
- —Equivalence Relation: Simultaneously Reflexive, Symmetric, and Transitive. Partitions set into disjoint equivalence classes.
Critical Pitfalls & Exam Traps:- ×Anti-symmetric is NOT the opposite of symmetric. A relation can be BOTH symmetric and anti-symmetric (e.g. Identity relation R = {(a, a)}).
- ×A relation can be NEITHER symmetric nor anti-symmetric.
Sets, Relations, POSETs & Lattices
POSETs, Hasse Diagrams, Lattices & Boolean Algebras
Open Full Lesson →A POSET is a Lattice iff EVERY pair of elements has a UNIQUE LUB (join v) and a UNIQUE GLB (meet ^). A complemented distributive lattice is a Boolean Algebra.
Must-Remember Principles:- —POSET Definition: Reflexive + Anti-Symmetric + Transitive.
- —Hasse Diagram: Visual DAG of a finite POSET with reflexive self-loops and transitive edges removed.
- —LUB (Least Upper Bound / Supremum): Smallest among all upper bounds. Must be unique.
- —GLB (Greatest Lower Bound / Infimum): Largest among all lower bounds. Must be unique.
- —Distributive Lattice: a ^ (b v c) = (a ^ b) v (a ^ c) for all a, b, c.
- —Complement of a in bounded lattice [0, 1]: An element b such that a v b = 1 and a ^ b = 0.
- —Boolean Algebra: Bounded + Distributive + Complemented lattice.
- —Divisibility Lattice D_n: Forms a Boolean Algebra iff n is a SQUARE-FREE integer (e.g. D_30 = {1, 2, 3, 5, 6, 10, 15, 30}).
Critical Pitfalls & Exam Traps:- ×If two elements share multiple upper bounds with no single unique least upper bound, the POSET is NOT a lattice.
- ×A lattice can have elements with NO complements or MULTIPLE complements, unless it is a Boolean algebra where complements are strictly unique.
Algebraic Structures & Group Theory
Algebraic Structures: Semigroups, Monoids, Groups & Subgroups
Open Full Lesson →Lagrange's Theorem: In any finite group G, the order (cardinality) of every subgroup H strictly divides the order of the group: |H| divides |G|.
Must-Remember Principles:- —Groupoid (Closure): a * b in G.
- —Semigroup: Closure + Associativity: (a * b) * c = a * (b * c).
- —Monoid: Semigroup + Identity element e (a * e = e * a = a).
- —Group: Monoid + Inverse element a^{-1} for every element.
- —Abelian Group: Group + Commutativity (a * b = b * a).
- —Subgroup Criterion: Non-empty subset H is a subgroup iff for all a, b in H, a * b^{-1} in H.
- —Inversion Formula: (a * b)^{-1} = b^{-1} * a^{-1}.
Critical Pitfalls & Exam Traps:- ×The converse of Lagrange's Theorem is FALSE: If d divides |G|, there is NOT necessarily a subgroup of order d (classic counterexample: Alternating group A4 of order 12 has no subgroup of order 6).
- ×Identity element and inverses in any group are strictly UNIQUE.
Algebraic Structures & Group Theory
Cyclic Groups, Generators, Element Orders & Coset Partitions
Open Full Lesson →A group G of order n is Cyclic iff it has an element a of order n. The number of generators of a finite cyclic group of order n is Euler's totient phi(n).
Must-Remember Principles:- —Order of an Element: Smallest positive integer k such that a^k = e. Denoted o(a).
- —Divisibility of Element Order: In any finite group G, o(a) divides |G| for all a in G.
- —Euler Totient Function phi(n): Number of integers 1 <= k <= n coprime to n. phi(p) = p - 1 for prime p.
- —Product Formula: phi(n) = n * prod_{p | n} (1 - 1/p).
- —Generator Condition in (Z_n, +): k is a generator of Z_n iff gcd(k, n) = 1.
- —Every Cyclic Group is ABELIAN (converse is false: Klein 4-group is abelian but not cyclic).
Critical Pitfalls & Exam Traps:- ×A group of prime order is ALWAYS cyclic, and every non-identity element is a generator.
- ×In a cyclic group of order n, for every divisor d of n, there is a UNIQUE subgroup of order d.
Combinatorics & Recurrence Relations
Combinatorics: Pigeonhole Principle, Stars & Bars & Derangements
Open Full Lesson →Non-negative integer solutions to x1 + ... + xn = r is binom(n + r - 1, r). Derangements of n items: D_n = n! * sum_{k=0}^n [(-1)^k / k!].
Must-Remember Principles:- —Pigeonhole Principle (Ceiling): If N objects placed in k boxes => at least one box contains ceil(N / k) objects.
- —Guaranteed Count: To guarantee at least m objects in same box => N = k*(m - 1) + 1 objects required.
- —Stars and Bars (x_i >= 0): binom(n + r - 1, r).
- —Stars and Bars (x_i >= 1): binom(r - 1, n - 1).
- —Derangements Count: D_0 = 1, D_1 = 0, D_2 = 1, D_3 = 2, D_4 = 9, D_5 = 44.
- —Recurrence for Derangements: D_n = (n - 1) * (D_{n-1} + D_{n-2}).
Critical Pitfalls & Exam Traps:- ×When lower bounds on variables differ (e.g. x1 >= 2, x2 >= 0), substitute x1' = x1 - 2 to shift all variables to non-negative.
- ×Probability of a random permutation being a derangement approaches 1/e approx 0.3678 as n -> inf.
Combinatorics & Recurrence Relations
Recurrence Relations & Ordinary Generating Functions
Open Full Lesson →For a_n + c1*a_{n-1} + c2*a_{n-2} = 0: Distinct roots r1, r2 => a_n = A*r1^n + B*r2^n. Repeated root r => a_n = (A + B*n)*r^n.
Must-Remember Principles:- —Characteristic Equation of degree 2: r^2 + c1*r + c2 = 0.
- —Repeated Roots (multiplicity m): a_n = (A0 + A1*n + ... + A_{m-1}*n^{m-1}) * r^n.
- —Non-Homogeneous Recurrence: a_n = a_n^{(h)} + a_n^{(p)} (Homogeneous + Particular solution).
- —Generating Function: G(x) = sum_{n=0}^inf a_n * x^n.
- —Standard OGF: 1 / (1 - ax) = sum_{n=0}^inf a^n * x^n.
- —Fibonacci Generating Function: F(x) = x / (1 - x - x^2).
Critical Pitfalls & Exam Traps:- ×If the non-homogeneous term f(n) = c * r^n coincides with a characteristic root of multiplicity m, the trial particular solution MUST be multiplied by n^m: a_n^{(p)} = C * n^m * r^n.
Graph Theory, Connectivity, Planarity & Coloring
Graph Theory Foundations, Handshaking Lemma & Connectivity
Open Full Lesson →Handshaking Lemma: sum_{v in V} deg(v) = 2|E|. The number of vertices of ODD degree in ANY graph is ALWAYS EVEN.
Must-Remember Principles:- —Handshaking Lemma: sum_{v in V} deg(v) = 2E.
- —Bipartite Graph Characterization: A graph is bipartite iff it contains NO ODD CYCLES.
- —Complete Bipartite Graph K_{m, n}: Edges E = m * n, Chromatic number chi = 2.
- —Complete Graph K_n: Edges E = n(n - 1) / 2, Chromatic number chi = n.
- —Whitney's Connectivity Inequality: kappa(G) <= kappa'(G) <= delta(G) (Vertex connectivity <= Edge connectivity <= Minimum degree).
Critical Pitfalls & Exam Traps:- ×A self-loop on vertex v contributes 2 to the degree of v in an undirected graph.
- ×A tree with n vertices has EXACTLY n - 1 edges and is ALWAYS bipartite (contains zero cycles).
Graph Theory, Connectivity, Planarity & Coloring
Eulerian Paths, Hamiltonian Cycles & Kuratowski Planarity
Open Full Lesson →Connected Planar Graphs: V - E + F = 2. For simple planar graphs with V >= 3: E <= 3V - 6 (or E <= 2V - 4 if triangle-free).
Must-Remember Principles:- —Eulerian Circuit: Exists iff graph is connected and EVERY vertex has EVEN degree.
- —Eulerian Path: Exists iff graph is connected and has EXACTLY 0 or 2 odd-degree vertices.
- —Euler's Formula: V - E + F = 2 (where F includes the infinite exterior face).
- —Planar Edge Bound: E <= 3V - 6 (for V >= 3).
- —Triangle-Free Planar Edge Bound: E <= 2V - 4 (applies to bipartite planar graphs).
- —Kuratowski's Theorem: G is planar iff it contains no subgraph homeomorphic to K_5 or K_{3,3}.
Critical Pitfalls & Exam Traps:- ×Euler's formula V - E + F = 2 requires the graph to be CONNECTED. For a disconnected planar graph with k components: V - E + F = 1 + k.
- ×K_5 is non-planar (10 > 3(5) - 6 = 9). K_{3,3} is non-planar (9 > 2(6) - 4 = 8).
Graph Theory, Connectivity, Planarity & Coloring
Graph Coloring, Chromatic Numbers & Bipartite Matching
Open Full Lesson →Chromatic number chi(G) is the minimum colors to color vertices such that no adjacent vertices share a color. Bipartite graphs have chi = 2. Planar graphs have chi <= 4.
Must-Remember Principles:- —Complete Graph K_n: chi(K_n) = n.
- —Cycle Graph C_n: chi(C_n) = 2 if n is even; chi(C_n) = 3 if n is odd.
- —Wheel Graph W_n (C_{n-1} + center hub): chi(W_n) = 3 if n is odd (even cycle); chi(W_n) = 4 if n is even (odd cycle).
- —Bipartite Graph: chi(G) <= 2.
- —Four Color Theorem (Appel & Haken): Every planar graph has chi(G) <= 4.
- —Hall's Marriage Theorem: Bipartite graph G = (X cup Y, E) has a matching that saturates X iff |N(S)| >= |S| for all subsets S subseteq X.
Critical Pitfalls & Exam Traps:- ×Greedy coloring with maximum degree Delta gives chi(G) <= Delta + 1. Brook's Theorem tightens this to chi(G) <= Delta (unless G is an odd cycle or complete graph).
- ×Hall's condition must hold for EVERY subset S of X, not just individual vertices.