Comprehensive Discrete Mathematics Study Notes
SET THEORY, RELATIONS, AND FUNCTIONS
Fundamental Definitions and Representations of Sets:
A set is a well-defined collection of distinct and distinguishable objects. These objects are referred to as the elements or members of the set.
Alternative characterization: A group of items possessing one or more common characteristics.
Set Notations and Representations:
Tabular (Roster) Form: Each member of the set is explicitly listed individually inside curly braces , typically designated by capital letters such as , , or .
Example: The set of even integers from to is written as:
Symbolic (Set-Builder) Form: A representative variable is enclosed within curly braces representing each member, followed by a predicate specifying the essential properties possessed by .
Example: The set of odd integers up to is defined as:
Example: Writing the alternating signed sequence in set-builder notation:
Cardinality of a Set:
The total number of unique elements contained within a set is termed its cardinality, denoted or .
Example: For the vowel alphabet set , the total number of vowels is , hence .
Classification of Sets:
Singleton Set: A set containing exactly one element.
Example: Odd integers between and : .
Pair Set: A set containing exactly two distinct members, such as .
Finite Set: A set containing a countable, finite number of elements where the counting process terminates.
Example: or .
Infinite Set: A set containing infinitely many members where counting cannot be completed.
Example: The set of all natural numbers .
Null (Empty or Void) Set: A set containing no elements, denoted by or .
Example: .
Subset (): Set is a subset of set if every element belonging to also belongs to .
If and , then .
If and , then and .
Proper Subset (): Set is a proper subset of if all elements of lie within , and there exists at least one element in that does not belong to ( with ).
Example: If and , then .
Improper Subset: A subset of is improper if contains the exact same elements as (i.e., ).
Universal Set (): A comprehensive superset that contains all elements and all subsets under consideration.
Example: If , , , and , then a universal set is .
Power Set ( or ):
The family of all possible subsets of a set , including the empty set and the set itself: .
For any finite set containing elements, its power set contains precisely elements: .
Example: For : , where .
Example: For : , where .
Example: For : .
Complement of a Set ( or ): All elements belonging to the universal set that do not belong to : .
Example: If and , then .
Disjoint Sets: Two sets and are mutually exclusive or disjoint if they share no common elements, meaning .
Example: and .
Set Operations and Algebraic Identities:
Union (): Contains elements that are in , in , or in both: .
Intersection (): Contains elements common to both sets: .
Difference ( or ): Elements existing in the first set but absent from the second:
Condition for Equality of Differences: holds if and only if , resulting in .
Cartesian Product (): The collection of all ordered pairs such that the first coordinate is from and the second from :
If and , then .
Worked Example: If and , then .
Worked Example: If , , and :
Fundamental Laws of Set Theory:
Commutative Laws: and .
Proof of : Let . Hence . By symmetry, , therefore .
Idempotent Laws: and .
Associative Laws: and .
Distributive Laws:
De Morgan's Laws:
Detailed Proof of :
Let . Thus .
Conversely, let . Thus . * Combining both inclusions yields .
Complement Properties:
Difference Identities:
Demonstration: If and , then . Consequently, and , verifying equality.
Venn Diagrams:
Conceived around 1880 by John Venn, these diagrams represent classes or sets as closed planar regions (typically circles) situated within an enclosing bounding box representing the universal set .
Distinct from general Euler diagrams because Venn diagrams leave room for every theoretically possible intersection or logical relationship among the sets, allowing specific areas to be marked as null or non-null.
Area-Proportional (Scaled) Venn Diagram: A Venn diagram in which the geometric area of each shape is proportional to the number of elements (cardinality) it contains.

Set-Theoretic Counting (Inclusion-Exclusion Principle):
Application 1: Out of surveyed consumers, liked product and liked product . The minimum number who liked both products is:
Application 2: In a class of students, study mathematics, study history, and study both. The number studying neither subject is:
Binary Relations:
A binary relation from set to set is formally defined as any arbitrary subset of the Cartesian product (). If , it is written as (" is related to by ").
Counting Relations: For sets with and , . Since any subset of is a relation, the total number of distinct relations is .
Void / Null Relation: The empty set .
Universal Relation: The full Cartesian product .
Relation Matrix (Adjacency Matrix): For sets and , the relation matrix is defined by:
Example: For , , and , the relation matrix is:
Domain and Range of a Relation:
Properties of Relations on a Set :
Reflexive: For all , .
Symmetric: Whenever , then .
Asymmetric: Whenever , then .
Antisymmetric: Whenever and , then .
Transitive: Whenever and , then .
Identity Relation (): . Every identity relation is reflexive, but a reflexive relation may strictly contain other elements, meaning .
Equivalence Relation: A relation that is simultaneously reflexive, symmetric, and transitive.
Theorem: If is an equivalence relation on , its inverse relation is also an equivalence relation on .
Reflexivity: Since .
Symmetry: .
Transitivity: Let and and .
Concrete Equivalence Relation Examples:
Congruence modulo on : .
Congruence modulo produces disjoint equivalence classes:
Parity relation on integers: .
Equality of string length on words: .
Composite Relations:
Given and , the composition consists of all such that there exists some with and .
Reversal Law: .
Functions and Mappings:
A function is a special relation such that every element serves as the first coordinate in exactly one ordered pair .
Vertical Line Test: A vertical line passing through any point of the domain must intersect the graph of a function exactly once.
Key Distinction from Relations: A relation can be one-to-one, one-to-many, many-to-one, or many-to-many. A function can never be one-to-many.

Types of Functions:
Injective (One-to-One / Injection): For every , there exists at most one such that (). A horizontal line intersects the graph at most once.
Surjective (Onto / Surjection): For every , there exists at least one such that , meaning . A horizontal line intersects the graph at least once.
Bijective (One-to-One Onto / Bijection): Simultaneously injective and surjective. A horizontal line intersects the graph exactly once.
Invertibility of Functions:
A function possesses an inverse mapping if and only if is bijective.
If is one-to-one and onto, then is also one-to-one and onto.
For bijective functions and , the composite function is bijective, and its inverse satisfies:
Recursively Defined Functions:
A definition consisting of two core parts: a base case specifying the initial value (e.g., ) and a recursive step defining in terms of previously evaluated values (e.g., ).
Example: Recursive sequence , . Unrolling values gives , , , , matching the closed form for non-negative integers.
Example: Two-variable recursive function:
Evaluation of (since ).
Evaluation of .
Evaluation of .
Countable and Infinite Sets:
A set is countably infinite (denumerable) if there exists a bijective correspondence between and the set of natural numbers .
Theorem: The countable union of countably infinite sets is countably infinite.
POSETS, LATTICES, AND BOOLEAN ALGEBRA
Partially Ordered Sets (Posets):
A relation on a set is a partial ordering if it satisfies reflexivity, antisymmetry, and transitivity. The structure or is called a poset.
Linearly Ordered Set (Totally Ordered Set / Chain): A poset that satisfies the comparability (trichotomy) condition: for every pair , either or .
Product of Posets: If and are posets, then is a poset under the product partial order defined by .
Poset Bounds and Hasse Diagrams:
Covering Relation: An element covers an element () if and there is no intermediate element such that .
Hasse Diagram: A graphical representation of a finite poset where elements are vertices and an upward edge connects to whenever covers . Transitive and reflexive edges are omitted.
Poset Elements Terminology:
Maximal Element: An element such that no element satisfies .
Minimal Element: An element such that no element satisfies .
Greatest Element (Top / Last Element / ): An element such that for all .
Least Element (Bottom / First Element / ): An element such that for all .
Upper Bound / Lower Bound: For a subset , is an upper bound if for all ; is a lower bound if for all .
Least Upper Bound (LUB / Supremum / Join / ): An upper bound that is less than or equal to all other upper bounds.
Greatest Lower Bound (GLB / Infimum / Meet / ): A lower bound that is greater than or equal to all other lower bounds.


Lattices:
A poset is a lattice if every two-element subset possesses a unique least upper bound () and a unique greatest lower bound ().
Algebraic Properties of Lattices:
Idempotent: ,
Commutative: ,
Associative: ,
Absorption: ,
Distributive Inequality: For any elements in a lattice:
Duality Principle: Any true statement in lattice theory remains valid when is exchanged with , and (join) is exchanged with (meet).
Classes of Lattices:
Bounded Lattice: Contains a global least element and a global greatest element such that for all :
Distributive Lattice: The operations of join and meet distribute across one another:
Complemented Lattice: A bounded lattice where every element has at least one complement satisfying:
Uniquely Complemented Lattice: A lattice in which every element possesses exactly one unique complement. In every bounded distributive lattice, complements (if they exist) are unique.
Boolean Algebra:
A Boolean algebra is an algebraic structure consisting of a set , two binary operations (logical OR / join) and (logical AND / meet), a unary operation (complement), and two special elements (zero element) and (identity/unity element), satisfying the postulates of commutativity, distributivity, identity, and complementation.
Alternatively, a finite lattice is a Boolean algebra if and only if it is isomorphic to the hypercube lattice for some integer , possessing exactly elements.
Core Boolean Algebra Theorems:
Involution:
Bounds Complement: and
De Morgan's Laws:
Proof of : Show that and :
Equality Identity: In a Boolean algebra, if , then .
Boolean Functions, Canonical Forms, and Minimization:
Literal: A variable or its complement .
Minterm: A product (AND) of all literals in the function, where each variable appears exactly once either uncomplemented or complemented.
Maxterm: A sum (OR) of all literals in the function, where each variable appears exactly once either uncomplemented or complemented.
Disjunctive Normal Form (DNF / Sum of Products SOP): An expression formed by OR-ing minterms.
Conjunctive Normal Form (CNF / Product of Sums POS): An expression formed by AND-ing maxterms.
Karnaugh Map (K-map): A visual grid technique for Boolean function simplification based on Gray code adjacency ().
Total cells for variables: .
Rectangular groups of adjacent cells containing s (for SOP) or s (for POS) must be formed in powers of two ().
Wrap-around/folding across top-bottom and left-right borders is permitted.


Worked K-Map Reductions:
Four-variable function :
Group 1: Four corners cells simplify to .
Group 2: Cells simplify to .
Minimal Expression: .
Four-variable function :
Minimal SOP: .
Logic Gates and Switching Circuits:
Basic Gates:
OR Gate: Computes logical addition (). Outputs if one or more inputs are .
AND Gate: Computes logical multiplication (). Outputs if and only if all inputs are .
NOT Gate (Inverter): Computes complementation (). Outputs the opposite logical state of the input.
Universal Gate Implementations:
Any SOP expression can be implemented exclusively using NAND gates.
Any POS expression can be implemented exclusively using NOR gates.

PROPOSITIONAL AND PREDICATE LOGIC
Propositions and Connectives:
A proposition (or statement) is a declarative sentence that is either definitively True () or definitively False (), but never both simultaneously.
Non-propositions include imperatives, wishes, questions, or exclamations (e.g., "May God Bless you", "Please Wait").
Atomic vs. Molecular Statements: Atomic statements contain no logical connectives. Molecular (compound) statements are constructed by joining atomic statements using logical connectives.
Truth Tables of Core Connectives:
Negation ( or ): Inverts the truth value (, ).
Conjunction (): is True if and only if both and are True.
Disjunction (): is False if and only if both and are False.
Conditional (Implication / ): is False only when the antecedent is True and the consequent is False. In all other cases, it is True. Equivalent form:
Biconditional (): is True when both and possess identical truth values. Equivalent form:
Propositional Classifications:
Tautology: A statement formula that evaluates to True () for every possible combination of truth assignments to its constituent variables (final truth table column consists exclusively of s).
Example:
Example: is a tautology.
Example: is a tautology.
Contradiction: A statement formula that evaluates to False () for every truth assignment.
Example: .
Contingency: A formula whose truth table contains both True and False values.
Example:
Variations of Conditional Propositions:
Given the primary conditional proposition :
Converse:
Inverse:
Contrapositive:
Logical Equivalence Theorems:
An implication is logically equivalent to its contrapositive: .
The converse is logically equivalent to the inverse: .
Problem: Negation of a conditional statement:
Example: The negation of "If it is raining, then the game is cancelled" is "It is raining and the game is not cancelled".
Theory of Inference and Valid Arguments:
An argument is a sequence of propositions called premises followed by a conclusion , denoted .
An argument is valid if the conclusion is guaranteed to be True whenever all premises are simultaneously True.
Fundamental Rules of Inference:
Modus Ponens (Law of Detachment):
Modus Tollens:
Hypothetical Syllogism:
Disjunctive Syllogism:
Conjunctive Simplification:
Conjunctive Addition:
Disjunctive Addition:
Division into Cases:
Rule of Contradiction:
Predicate Logic and Quantifiers:
A predicate is a property or attribute assigned to subjects in an open statement, written . It becomes a proposition once its variables are bound or instantiated.
Quantifiers:
Universal Quantifier (): Denotes "for all" or "for every". Statement asserts that is true for every element in the domain of discourse.
Existential Quantifier (): Denotes "there exists" or "for at least one". Statement asserts that is true for at least one element in the domain.
Negation of Quantified Statements:
Example: The negation of "For all real , if then " is:
ALGEBRAIC STRUCTURES
Hierarchy of Algebraic Systems:
An algebraic structure consists of a non-empty carrier set equipped with one or more operational laws satisfying formal algebraic axioms.
Semi-Group: An algebraic system satisfying:
Closure: For all , .
Associativity: For all , .
Monoid: A semi-group that possesses an identity element such that for all :
Group: A monoid in which every element possesses an inverse element such that:
Abelian Group (Commutative Group): A group that satisfies the commutative law:
General Group Theorems and Properties:
Uniqueness of Identity Element: The identity element in a group is strictly unique.
Proof: Let and both be identities in . Then (viewing as identity) and (viewing as identity). Thus .
Uniqueness of Inverses: The inverse of each element in a group is strictly unique.
Proof: Let and both be inverses of . Then and . Consider . Alternatively, by associativity, . Therefore, .
Left and Right Inverses: A left inverse of an element is identical to its right inverse.
Reversal Law of Inverses:
Abelian Criterion: A group is abelian if and only if for all .
Proof: . If is abelian, .
Conversely, if . Applying left cancellation of and right cancellation of yields .
Self-Inverse Groups: If (meaning ) for every element in , then is an abelian group.
Orders, Subgroups, and Cyclic Groups:
Order of an Element ( or ): The least positive integer such that . If no such integer exists, the element has infinite order.
Subgroup: A subset is a subgroup () if forms a group under the operation inherited from .
Subgroup Criterion: A non-empty subset is a subgroup if and only if for all , .
Theorem: If and are subgroups of , their intersection is also a subgroup of .
Cyclic Groups: A group is cyclic if there exists a generator such that every element can be expressed as an integer power of , written .
If is finite of order , then and .
Generators of a Cyclic Group: An element serves as a generator of a cyclic group of order if and only if .
Example: A cyclic group of order , , has generators where . The values of are . Thus, there are precisely four generators: .
Cosets, Lagrange's Theorem, and Normal Subgroups:
Cosets: For a subgroup and an element :
Left coset:
Right coset:
Lagrange's Theorem: The order of any subgroup of a finite group divides the order of the group: .
Normal Subgroup: A subgroup is normal () if for every and , (or equivalently, ).
Quotient Group (Factor Group / ): The set of cosets of a normal subgroup forms a group under coset multiplication: .
Theorem: The quotient group of an abelian group is always abelian.
Homomorphisms, Isomorphisms, and Permutation Groups:
Group Homomorphism: A mapping preserving the algebraic operation: .
Kernel of a Homomorphism: .
Theorem: The kernel of any group homomorphism is a normal subgroup of .
Isomorphism: A homomorphism that is simultaneously injective and surjective ().
Cayley's Theorem: Every finite group of order is isomorphic to a permutation group of degree .
Rings and Fields:
Ring: An algebraic system satisfying:
is an abelian group.
is a semi-group.
The operation is distributive over .
Commutative Ring with Unity: A ring where multiplication is commutative () and there exists a multiplicative identity such that .
Field: An algebraic structure such that:
is an abelian group.
is an abelian group.
Multiplication distributes over addition.
Distinction: Every field is a commutative ring with unity, but not every ring is a field because elements in a general ring lack multiplicative inverses.
RECURRENCE RELATIONS AND COMBINATORICS
Natural Numbers and Mathematical Induction:
Natural Numbers (): Countable positive integers starting from to : .
Whole Numbers (): Natural numbers including zero: .
Peano's Axioms: Formal axiomatic foundation of natural numbers generated from via the successor function :
.
If , then .
If a subset contains and contains whenever it contains , then .
Principle of Mathematical Induction:
Base Case: Verify the proposition holds for the initial integer (e.g., or ).
Inductive Hypothesis: Assume holds for some arbitrary integer .
Inductive Step: Prove that necessarily follows as true.
Concrete Proof: Show is divisible by for all :
Base step (): , which is divisible by .
Inductive step: Assume . For : Factoring out proves divisibility for all .
Combinatorics and Counting Techniques:
Fundamental Principles of Counting: Product rule and sum rule.
Combinations (): Selection of distinct objects from items without regard to ordering:
Handshake Problem: In a room of persons, total handshakes equal .
Stars and Bars (Non-Negative Integer Solutions): The number of distinct non-negative integer solutions to is given by:
For : .
Pigeonhole Principle (Dirichlet Drawer Principle):
If pigeons are distributed into pigeonholes with , at least one pigeonhole must contain two or more pigeons.
Extended (Generalized) Pigeonhole Principle: Distributing items into containers guarantees at least one container receives at least:
Problem: Minimum boys born in the same minute out of boys on a single day ( minutes):
Pólya's Counting Theorem (PET):
Developed by John Howard Redfield (1927) and independently by George Pólya (1937), this theorem generalizes Burnside's Lemma to calculate the number of non-equivalent configurations under a symmetry permutation group .
Employs the cycle index polynomial to account for equivalence classes by weight when assigning colors to geometric configurations (e.g., colored vertices of a polygon).
Generating Functions:
The ordinary generating function for an infinite sequence is defined as the formal power series:
Standard Closed Forms:
Constant sequence :
Alternating sequence :
Geometric sequence :
Linear sequence :
Factorial sequence :
Recurrence Relations:
An equation that recursively defines a sequence where each term is a function of preceding terms.
Linear Homogeneous Recurrences with Constant Coefficients:
Solved via characteristic equation .
Distinct Roots : General solution is .
Repeated Roots : General solution is .
Linear Non-Homogeneous Recurrence Relations:
Complete solution equals homogeneous solution plus particular solution: .
Worked Problem: Solve with , using generating functions:
Form power series: .
Factorize denominator: .
Partial fraction decomposition:
Expanding into power series:
Worked Divide-and-Conquer Recurrence: Solve with :
By substitution across levels: