BC20005 Discrete Mathematics Academic Notes
Course Overview
Course Code: BC20005
Course Title: Discrete Mathematics
Academic Credits: Credits
Unit I: Sets, Relations, Functions, Mathematical Logic, and Boolean Algebra
Sets, Relations, and Functions
Definition of Sets:
A set is a well-defined collection of distinct elements or objects.
Basic Operations on Sets:
Union: The union of two sets and , denoted by in Cartesian terms or or or , is properly represented as Cartesian product or set union . Specifically, the union is . Correct set operator notation for union is or set operators . Let and be sets: union or union is defined by . Correct union syntax: is Cartesian product, while set union is or union . Set union definition: Set Union or set union : Union or : The union is defined as: Set union operator: Set union : The set of elements in , , or both.
Intersection: The intersection of sets and is the set of elements belonging to both and : Intersection set:
Set Difference: The difference (or ) is the set of elements in that are not in .
Set Complement: The complement (or ) consists of all elements in the universal set that do not belong to .
Symmetric Difference: The set of elements belonging to or , but not both.
Ordered Sets:
A partially ordered set (poset) is an ordered pair where is a set and a binary relation satisfies three core properties:
Reflexivity: for all in .
Antisymmetry: If and , then .
Transitivity: If and , then .
Totally Ordered Set: A poset in which every pair of elements is comparable.
Relations:
Binary Relation: A subset of the Cartesian product .
Types of Relations on a Set:
Reflexive: Every element is related to itself.
Irreflexive: No element is related to itself.
Symmetric: If is related to , then is related to .
Antisymmetric: If is related to and is related to , then
Asymmetric: If is related to , then is not related to
Transitive: If is related to and is related to , then is related to
Equivalence Relation: A relation that is reflexive, symmetric, and transitive.
Inverse of a Relation: The relation formed by reversing the ordered pairs of :
Power of Relation: Compositional power defined recursively as and (or relation composition).
Functions:
Definition: A mapping assigning each element in domain exactly one element in codomain
Types of Functions:
Injective (One-to-One): Distinct domain elements map to distinct codomain elements.
Surjective (Onto): Every element in codomain is mapped from at least one element in domain
Bijective: A function that is both injective and surjective.
Function Composition: For and , the composite function
Function Inverses: The inverse function exists if and only if is bijective.
Mathematical Logic
Logical Inferences: Drawing valid conclusions from premises using valid logical rules.
Methods of Proof of an Implication ():
Direct Proof: Assuming is true and proving is true.
Proof by Contrapositive: Proving the equivalent statement
Proof by Contradiction: Assuming and are both true and deriving a logical contradiction.
Proof by Exhaustion: Verifying the implication individually for all possible cases.
First Order Logic and Predicate Calculus:
Predicates: Statements containing variables defined over a domain.
Universal Quantifier (): Expresses that a predicate holds for all domain elements.
Existential Quantifier ( or ): Expresses that a predicate holds for at least one domain element.
Rules of Inference for Quantified Propositions:
Universal Instantiation: From , infer for any arbitrary domain element
Universal Generalization: From for an arbitrary , infer
Existential Instantiation: From existential quantification, infer for a specific unknown element
Existential Generalization: From for a known specific element , infer existential quantification.
Mathematical Induction:
Base Step: Show that the statement holds true for the initial value
Inductive Step: Assume holds true (Inductive Hypothesis), and prove that holds true.
Boolean Algebra and Logic Circuits
Finite Boolean Algebra: An algebraic structure operating over a finite set.
Axioms of Boolean Algebra:
Closure Laws under Boolean operations.
Commutative Laws.
Associative Laws.
Distributive Laws.
Identity Laws (,
Complement Laws (,
Boolean Functions: Functions mapping using Boolean operations.
Logic Circuits: Physical or diagrammatic implementations of Boolean functions using basic logic gates (AND, OR, NOT, NAND, NOR, XOR, XNOR).
Unit II: Counting, Recurrence Relations, and Generating Functions
Fundamentals of Counting Techniques
Addition Rule (Sum Principle): If one task can be done in ways and a second independent task in ways, selecting either task can be done in ways.
Multiplication Rule (Product Principle): If a procedure consists of sequential steps with and outcomes respectively, the total sequence of outcomes is
Permutations: Ordered arrangements of elements selected from distinct objects:
Combinations: Unordered selections of elements selected from distinct objects:
Pigeonhole Principle
Basic Pigeonhole Principle: If items are put into containers, where , then at least one container must contain more than one item.
Generalized Pigeonhole Principle: If items are placed into containers, at least one container holds at least: or ceiling function of items.
Recurrence Relations and Generating Functions
Recurrence Relation: An equation expressing term of a sequence as a function of preceding terms (e.g., ).
Linear Homogeneous Recurrence Relations with Constant Coefficients: Solved via characteristic equations and roots.
Non-Homogeneous Recurrence Relations: Solved by combining particular solutions with homogeneous solutions.
Generating Functions: Formal power series encoding sequences as algebraic series coefficients: Standard ordinary generating function series:
Unit III: Introduction to Graph Theory and Algorithms
Definitions and Basic Properties of Graphs
Graph Definition: A structure consisting of a set of vertices and a set of edges
Basic Properties:
Vertex Degree : Number of edges incident to vertex
Handshaking Lemma: The sum of degrees of all vertices equals twice the total number of edges:
Pseudographs: Graphs that contain self-loops (edges connecting a vertex to itself) and multiple parallel edges between the same pair of vertices.
Complete Graphs (): Simple graphs where every pair of distinct vertices is connected by a unique edge.
Bipartite Graphs: Graphs whose vertex set can be partitioned into two disjoint sets and such that every edge connects a vertex in to a vertex in
Isomorphism of Graphs: Bijective vertex mapping preserving adjacency between two graphs and
Paths, Circuits, and Matrix Representations
Paths and Circuits:
Path: Sequence of alternating vertices and edges where all elements are distinct.
Circuit: A closed path starting and ending at the same vertex.
Eulerian Circuits: A closed walk traversing every edge of a graph exactly once. Exists if and only if every vertex has an even degree in a connected graph.
Hamiltonian Cycles: A closed loop visiting every vertex of a graph exactly once before returning to the start.
Adjacency Matrix: Matrix where entry denotes the number of edges connecting vertex to vertex
Weighted Graphs and Optimization Algorithms
Weighted Graph: A graph where each edge is assigned a numerical weight .
Travelling Salesman Problem (TSP): An optimization problem finding the minimum-weight Hamiltonian cycle in a weighted complete graph.
Dijkstra's Algorithm for Shortest Path: A greedy algorithm for finding single-source shortest paths in weighted graphs with non-negative edge weights.
Procedure:
Assign to every vertex a tentative distance value (0 for source, or infinity for all others).
Mark all vertices unvisited. Set source vertex as current.
For current vertex, calculate tentative distances of all unvisited neighbors.
Update neighbor distances if calculated tentative path is smaller than current recorded distance.
Mark current vertex as visited.
Select unvisited vertex with smallest tentative distance as next current vertex and repeat process until destination or all vertices are visited.