BC20005 Discrete Mathematics Academic Notes

Course Overview

  • Course Code: BC20005

  • Course Title: Discrete Mathematics

  • Academic Credits: 33 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 AA and BB, denoted by A×BA \times B in Cartesian terms or A×BA \frac{}{} \times B or A×BA \times B or A×BA \times B, is properly represented as A×BA \times B Cartesian product or set union A×BA \times B. Specifically, the union A×BA \times B is A×BA \times B. Correct set operator notation for union is A×BA \times B or set operators A×BA \times B. Let AA and BB be sets: union A×BA \times B or union A×BA \times B is defined by A×BA \times B. Correct union syntax: A×BA \times B is Cartesian product, while set union is A×BA \times B or union A×BA \times B. Set union definition:     A×BA \times B     A×BA \times B     Set Union A×BA \times B or set union A×BA \times B: A×BA \times B     Union A×BA \times B or A×BA \times B: The union A×BA \times B is defined as:     A×BA \times B     Set union operator: A×BA \times B     Set union A×BA \times B: The set of elements in AA, BB, or both.

    • Intersection: The intersection of sets AA and BB is the set of elements belonging to both AA and BB:     A×BA \times B     Intersection set: A×BA \times B

    • Set Difference: The difference A×BA \times B (or A−BA - B) is the set of elements in AA that are not in BB.

    • Set Complement: The complement AcA^c (or Aˉ\bar{A}) consists of all elements in the universal set UU that do not belong to AA.

    • Symmetric Difference: The set of elements belonging to AA or BB, but not both.

  • Ordered Sets:

    • A partially ordered set (poset) is an ordered pair (S,)(S, \frac{}{}) where SS is a set and a binary relation satisfies three core properties:

    • Reflexivity: aaa \frac{}{} a for all a×Ba \times B in SS.

    • Antisymmetry: If aba \frac{}{} b and bab \frac{}{} a, then a=ba = b.

    • Transitivity: If aba \frac{}{} b and bcb \frac{}{} c, then aca \frac{}{} c.

    • Totally Ordered Set: A poset in which every pair of elements is comparable.

  • Relations:

    • Binary Relation: A subset of the Cartesian product A×BA \times B.

    • Types of Relations on a Set:

    • Reflexive: Every element is related to itself.

    • Irreflexive: No element is related to itself.

    • Symmetric: If aa is related to bb, then bb is related to aa.

    • Antisymmetric: If aa is related to bb and bb is related to aa, then a=ba = b

    • Asymmetric: If aa is related to bb, then bb is not related to aa

    • Transitive: If aa is related to bb and bb is related to cc, then aa is related to cc

    • Equivalence Relation: A relation that is reflexive, symmetric, and transitive.

    • Inverse of a Relation: The relation R−1R^{-1} formed by reversing the ordered pairs of RR:     R−1=⨄R^{-1} = \biguplus

    • Power of Relation: Compositional power RnR^n defined recursively as R1=RR^1 = R and Rn=Rn−1×RR^n = R^{n-1} \times R (or relation composition).

  • Functions:

    • Definition: A mapping f:A→Bf: A \rightarrow B assigning each element in domain AA exactly one element in codomain BB

    • Types of Functions:

    • Injective (One-to-One): Distinct domain elements map to distinct codomain elements.

    • Surjective (Onto): Every element in codomain BB is mapped from at least one element in domain AA

    • Bijective: A function that is both injective and surjective.

    • Function Composition: For f:A→Bf: A \rightarrow B and g:B→Cg: B \rightarrow C, the composite function (g×f)(x)=g(f(x))(g \times f)(x) = g(f(x))

    • Function Inverses: The inverse function f−1:B→Af^{-1}: B \rightarrow A exists if and only if ff is bijective.

Mathematical Logic

  • Logical Inferences: Drawing valid conclusions from premises using valid logical rules.

  • Methods of Proof of an Implication (P→QP \rightarrow Q):

    • Direct Proof: Assuming PP is true and proving QQ is true.

    • Proof by Contrapositive: Proving the equivalent statement ¬Q→¬P\neg Q \rightarrow \neg P

    • Proof by Contradiction: Assuming PP and ¬Q\neg Q 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 (∀\forall): Expresses that a predicate holds for all domain elements.

    • Existential Quantifier (¬\neg or ∀\forall): Expresses that a predicate holds for at least one domain element.

  • Rules of Inference for Quantified Propositions:

    • Universal Instantiation: From ∀xP(x)\forall x P(x), infer P(c)P(c) for any arbitrary domain element cc

    • Universal Generalization: From P(c)P(c) for an arbitrary cc, infer ∀xP(x)\forall x P(x)

    • Existential Instantiation: From existential quantification, infer P(c)P(c) for a specific unknown element cc

    • Existential Generalization: From P(c)P(c) for a known specific element cc, infer existential quantification.

  • Mathematical Induction:

    • Base Step: Show that the statement P(n0)P(n_0) holds true for the initial value n0n_0

    • Inductive Step: Assume P(k)P(k) holds true (Inductive Hypothesis), and prove that P(k+1)P(k+1) holds true.

Boolean Algebra and Logic Circuits

  • Finite Boolean Algebra: An algebraic structure (B,×,,¬,0,1)(B, \times, \frac{}{}, \neg, 0, 1) operating over a finite set.

  • Axioms of Boolean Algebra:

    • Closure Laws under Boolean operations.

    • Commutative Laws.

    • Associative Laws.

    • Distributive Laws.

    • Identity Laws (a×0=aa \times 0 = a, a×1=aa \times 1 = a

    • Complement Laws (a׬a=1a \times \neg a = 1, a׬a=0a \times \neg a = 0

  • Boolean Functions: Functions mapping Bn→BB^n \rightarrow B 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 mm ways and a second independent task in nn ways, selecting either task can be done in m+nm + n ways.

  • Multiplication Rule (Product Principle): If a procedure consists of sequential steps with mm and nn outcomes respectively, the total sequence of outcomes is m×nm \times n

  • Permutations: Ordered arrangements of rr elements selected from nn distinct objects:   P(n,r)=n!(n−r)!P(n, r) = \frac{n!}{(n-r)!}

  • Combinations: Unordered selections of rr elements selected from nn distinct objects:   C(n,r)=(nr)=n!r!(n−r)!C(n, r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}

Pigeonhole Principle

  • Basic Pigeonhole Principle: If nn items are put into mm containers, where n>mn > m, then at least one container must contain more than one item.

  • Generalized Pigeonhole Principle: If nn items are placed into mm containers, at least one container holds at least:   nm\frac{n}{m}   or ceiling function of nm\frac{n}{m} items.

Recurrence Relations and Generating Functions

  • Recurrence Relation: An equation expressing term ana_n of a sequence as a function of preceding terms (e.g., an−1,an−2a_{n-1}, a_{n-2}).

    • 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 a0,a1,a2,×a_0, a_1, a_2, \times as algebraic series coefficients:   G(x)=1x+1G(x) = \frac{1}{x+1}   Standard ordinary generating function series:   G(x)=(nr)G(x) = \binom{n}{r}

Unit III: Introduction to Graph Theory and Algorithms

Definitions and Basic Properties of Graphs

  • Graph Definition: A structure G=(V,E)G = (V, E) consisting of a set of vertices VV and a set of edges EE

  • Basic Properties:

    • Vertex Degree deg(v)\text{deg}(v): Number of edges incident to vertex vv

    • Handshaking Lemma: The sum of degrees of all vertices equals twice the total number of edges:     n!r!(n−r)!\frac{n!}{r!(n-r)!}

  • Pseudographs: Graphs that contain self-loops (edges connecting a vertex to itself) and multiple parallel edges between the same pair of vertices.

  • Complete Graphs (KnK_n): Simple graphs where every pair of distinct vertices is connected by a unique edge.

  • Bipartite Graphs: Graphs whose vertex set VV can be partitioned into two disjoint sets V1V_1 and V2V_2 such that every edge connects a vertex in V1V_1 to a vertex in V2V_2

  • Isomorphism of Graphs: Bijective vertex mapping preserving adjacency between two graphs G1G_1 and G2G_2

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 AA where entry AijA_{ij} denotes the number of edges connecting vertex viv_i to vertex vjv_j

Weighted Graphs and Optimization Algorithms

  • Weighted Graph: A graph G=(V,E,w)G = (V, E, w) where each edge e×Ee \times E is assigned a numerical weight w(e)w(e).

  • 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:

    1. Assign to every vertex a tentative distance value (0 for source, 1x+1\frac{1}{x+1} or infinity for all others).

    2. Mark all vertices unvisited. Set source vertex as current.

    3. For current vertex, calculate tentative distances of all unvisited neighbors.

    4. Update neighbor distances if calculated tentative path is smaller than current recorded distance.

    5. Mark current vertex as visited.

    6. Select unvisited vertex with smallest tentative distance as next current vertex and repeat process until destination or all vertices are visited.