ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalMATH2113Graphs Types
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    MATH2113

    Discrete Mathematics

    Progress0 / 25 done
    Topics25
    1Sets, Subsets, Algebra of Sets2Propositions and Compound Statements3Basic Logical Operations4Propositional Logic and its Applications with Statement Problems5Propositions and Truth Tables6Tautologies and Contradictions7Conditional and Bi-conditional Statements8Arguments in Propositional Logic9Propositional Functions10Quantifiers and Negation of Quantified Statements11Relations and Equivalence Relations12Partial Ordering Relations13Functions and Recursively Defined Functions
    14Basics of Counting Methods15Combinations and Permutations16Pigeonhole Principle17Graphs and its Types18Graph Isomorphism19Trees in Graph Theory20Connectivity in Graphs21Eulerian and Hamiltonian Paths22Spanning Trees and Shortest Path Problem
    23Power, Floor, Increasing, Decreasing24Big O, Little O and Omega Notations25Orders of the Polynomial Functions
    11 min read
    Topic 17 of 25
    Topic Study Note Illustration
    17

    Graphs and its Types

    Graphs and Their Types


    Graphs and Their Types


    A graph is a mathematical structure used to model pairwise relationships between objects. It consists of a set of vertices (also called nodes) and a set of edges that connect these vertices. Graphs are used in many areas, including computer science, social network analysis, transport systems, and more.

    1. Basic Definition of a Graph

    A graph GGG is defined as a pair G=(V,E)G = (V, E)G=(V,E), where:

    • VVV is the set of vertices (also called nodes).
    • EEE is the set of edges (also called arcs or links) that connect pairs of vertices.

    Example:

    If we have 3 vertices A,B,CA, B, CA,B,C, and 2 edges connecting AAA to BBB and BBB to CCC, the graph is represented as:

    G=({A,B,C},{(A,B),(B,C)})G = (\{A, B, C\}, \{(A, B), (B, C)\})G=({A,B,C},{(A,B),(B,C)})

    2. Types of Graphs

    Graphs can be classified into different types based on their properties. Some common types of graphs include:


    a) Simple Graph

    A simple graph is a graph that has:

    • No loops (edges that connect a vertex to itself).
    • No multiple edges (more than one edge between the same pair of vertices).

    In a simple graph, each pair of vertices is connected by at most one edge.

    • Example:
      Consider a graph with vertices A,B,CA, B, CA,B,C, and edges (A,B),(B,C),(C,A)(A, B), (B, C), (C, A)(A,B),(B,C),(C,A). This is a simple graph because it has no loops or multiple edges.

    b) Multigraph

    A multigraph allows multiple edges between the same pair of vertices. These are graphs where there can be more than one edge between two vertices (parallel edges). Multigraphs can also have loops.

    • Example:
      A graph with vertices A,B,CA, B, CA,B,C and edges (A,B),(A,B),(B,C)(A, B), (A, B), (B, C)(A,B),(A,B),(B,C) is a multigraph because the edge (A,B)(A, B)(A,B) appears twice.

    c) Directed Graph (Digraph)

    A directed graph (or digraph) is a graph in which edges have a direction. Each edge is represented as an ordered pair (u,v)(u, v)(u,v), meaning there is a directed edge from vertex uuu to vertex vvv.

    • Example:
      A directed graph with vertices A,B,CA, B, CA,B,C and edges (A,B),(B,C)(A, B), (B, C)(A,B),(B,C) indicates that there is an edge from AAA to BBB and from BBB to CCC, but not the reverse.

    d) Undirected Graph

    An undirected graph is a graph in which the edges have no direction. Each edge is simply a set of two vertices {u,v}\{u, v\}{u,v}, meaning the edge connects vertex uuu to vertex vvv, and there is no direction from one to the other.

    • Example:
      A graph with vertices A,B,CA, B, CA,B,C and edges {A,B},{B,C}\{A, B\}, \{B, C\}{A,B},{B,C} is undirected because there is no direction associated with the edges.

    e) Weighted Graph

    A weighted graph is a graph in which each edge has a weight (or cost) associated with it. The weight can represent anything like distance, time, or cost, and is typically represented by a number.

    • Example:
      A weighted graph with vertices A,B,CA, B, CA,B,C and edges (A,B,5),(B,C,3)(A, B, 5), (B, C, 3)(A,B,5),(B,C,3) means the edge between AAA and BBB has a weight of 5, and the edge between BBB and CCC has a weight of 3.

    f) Complete Graph

    A complete graph is a graph in which there is an edge between every pair of distinct vertices. In a complete graph with nnn vertices, there are n(n−1)2\frac{n(n-1)}{2}2n(n−1)​ edges in an undirected complete graph.

    • Example:
      A complete graph with 3 vertices A,B,CA, B, CA,B,C would have edges (A,B),(B,C),(A,C)(A, B), (B, C), (A, C)(A,B),(B,C),(A,C).

    g) Bipartite Graph

    A bipartite graph is a graph whose vertices can be divided into two disjoint sets such that every edge connects a vertex in one set to a vertex in the other set. In other words, there are no edges between vertices within the same set.

    • Example:
      A graph with sets U={A,B}U = \{A, B\}U={A,B} and V={C,D}V = \{C, D\}V={C,D}, and edges (A,C),(B,D)(A, C), (B, D)(A,C),(B,D), is bipartite because all edges connect vertices from set UUU to set VVV.

    h) Tree

    A tree is a connected graph with no cycles. It is a special type of graph that is acyclic and has exactly n−1n - 1n−1 edges if there are nnn vertices.

    • Example:
      A tree with 4 vertices A,B,C,DA, B, C, DA,B,C,D and edges (A,B),(B,C),(C,D)(A, B), (B, C), (C, D)(A,B),(B,C),(C,D) is a tree because there are no cycles, and it is connected.

    i) Forest

    A forest is a collection of disjoint trees. It is essentially a graph that is acyclic but not necessarily connected.

    • Example:
      A forest with two trees, one with vertices A,BA, BA,B and edge (A,B)(A, B)(A,B), and the other with vertices C,D,EC, D, EC,D,E and edges (C,D),(D,E)(C, D), (D, E)(C,D),(D,E), is a forest because it consists of multiple disjoint trees.

    j) Planar Graph

    A planar graph is a graph that can be drawn on a plane without any edges crossing. In other words, the graph can be embedded in the plane such that no edges intersect except at their endpoints.

    • Example:
      The graph representing a triangle is planar because it can be drawn in a plane without any edges crossing.

    k) Subgraph

    A subgraph is a graph formed by selecting a subset of the vertices and edges of another graph. If a graph GGG contains a graph HHH, then HHH is a subgraph of GGG.

    • Example:
      A subgraph of a complete graph with vertices A,B,CA, B, CA,B,C and edges (A,B),(B,C),(A,C)(A, B), (B, C), (A, C)(A,B),(B,C),(A,C) could be a graph with vertices AAA and BBB and the edge (A,B)(A, B)(A,B).

    3. Special Types of Graphs in Theory

    • Cyclic Graph: A graph that contains at least one cycle (a closed loop of edges and vertices).
    • Acyclic Graph: A graph that does not contain any cycles. A Directed Acyclic Graph (DAG) is one where edges have a direction, and there are no directed cycles.
    • Hamiltonian Graph: A graph that contains a Hamiltonian cycle (a cycle that visits every vertex exactly once and returns to the starting point).
    • Eulerian Graph: A graph that contains an Eulerian cycle (a cycle that uses every edge exactly once).

    4. Summary of Graph Types

    • Simple Graph: No loops or multiple edges.
    • Multigraph: Multiple edges between the same pair of vertices are allowed.
    • Directed Graph (Digraph): Edges have directions.
    • Undirected Graph: Edges do not have directions.
    • Weighted Graph: Each edge has a weight or cost associated with it.
    • Complete Graph: Every pair of vertices is connected by an edge.
    • Bipartite Graph: Vertices are divided into two sets, with edges only between the sets.
    • Tree: A connected, acyclic graph.
    • Forest: A collection of disjoint trees.
    • Planar Graph: A graph that can be drawn without edge crossings.

    Graphs are incredibly versatile structures and serve as the backbone for various problems in computer science, network theory, operations research, and many other fields. Understanding these different types of graphs and their properties allows for efficient problem-solving and algorithm development.

    ← Previous topic 16
    Pigeonhole Principle
    Next topic 18 →
    Graph Isomorphism

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    11mremaining
    1.8kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Discrete Mathematics