0% found this document useful (0 votes)
0 views34 pages

Material Unit v DMS Graph Structures Copy

Uploaded by

kishwaryarani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views34 pages

Material Unit v DMS Graph Structures Copy

Uploaded by

kishwaryarani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Unit-V-DMS- Graph Structures

Explain the properties and differences between (a) directed and undirected graphs (b) simple and
multiple graphs (c) connected and disconnected graphs with suitable examples.
Solution. Directed Graphs (Digraphs): A directed graph (digraph) is a graph where each edge has
a specified direction, represented as an ordered pair of vertices (𝑢, 𝑣), meaning there is an edge going
from vertex 𝑢 to vertex 𝑣.

Properties:
1. Each edge points from one vertex to another. The edge (𝑢, 𝑣) is distinct from (𝑣, 𝑢).
2. In-degree of a vertex is the number of edges coming into it. Out-degree of a vertex is the
number of edges going out of it.
3. Each vertex is associated with a list of vertices to which it points. Adjacency Matrix: A matrix
𝐴[𝑖][𝑗] = 1 if there is an edge from vertex 𝑖 to vertex 𝑗, otherwise 𝐴[𝑖][𝑗] = 0.
4. Traversal is restricted to follow the edge direction. A path from 𝑢 to 𝑣 must respect the edge
orientations.
5. A directed graph may have loops (edges where 𝑢 = 𝑣).

Undirected Graphs: An undirected graph is a graph in which edges have no direction. An edge
between two vertices 𝑢 and 𝑣 is represented as an unordered pair {𝑢, 𝑣}, meaning 𝑢 is connected to
𝑣 and vice versa.

Properties:
1. Edges are bidirectional. If there is an edge between 𝑢 and 𝑣, it connects both ways: 𝑢 ↔ 𝑣.
2. The degree of a vertex is the number of edges connected to it.
3. Adjacency List: Each vertex is associated with a list of its neighbouring vertices. Adjacency
Matrix: A symmetric matrix where 𝐴[𝑖][𝑗] = 1 if there is an edge between vertices 𝑖 and 𝑗, and
𝐴[𝑖][𝑗] = 0 otherwise.
4. Traversal does not depend on edge orientation; paths can be traversed in either direction.
5. A loop (an edge that connects a vertex to itself) may or may not be allowed, depending on the
type of graph.
Directed vs. Undirected Graphs

Aspect Directed Graph Undirected Graph


Edge Unordered pair {𝒖, 𝒗}: direction
Ordered pair (𝒖, 𝒗): direction matters.
Representation irrelevant.
Symmetry Not symmetric: (𝑢, 𝑣) ≠ (𝑣, 𝑢). Symmetric: {𝒖, 𝒗} = {𝒗, 𝒖}.
In-degree (edges into a vertex) and out- Only one degree per vertex (total
Degree
degree (edges out of a vertex) are distinct. number of incident edges).
Path Definition Follows edge direction for traversal. Traversal can go in either direction.
Social networks, undirected
Application Road networks with one-way streets,
communication links, or friendship
Examples flow charts, or dependency graphs.
graphs.
Asymmetric: Symmetric:
Adjacency Matrix entry (𝑖, 𝑗) = 1 if (𝒗 → 𝒗 ).
𝒊 𝒋 entry (𝒊, 𝒋) = 𝟏 if ((𝒗𝒊 — 𝑣𝑗 )).
Simple lines are used to show
Visualization Arrows are used to show direction.
connections.

Simple Graphs:

A simple graph is an undirected graph that satisfies the following conditions:

1. No Loops: An edge does not connect a vertex to itself (no {𝒗, 𝒗}).
2. No Multiple Edges: There is at most one edge between any pair of vertices {𝒖, 𝒗}.

Properties:
1. A simple graph is defined by a set of vertices (𝑉) and a set of edges (𝐸), where each edge is a
pair of distinct vertices {𝑢, 𝑣}, with 𝑢, 𝑣 ∈ 𝑉.
2. The degree of a vertex 𝑣 is the number of edges connected to it.
3. A simple graph can be connected (every vertex can be reached from any other vertex) or
disconnected.
4. A simple graph can be planar (can be drawn on a plane without edges crossing) or non-planar.
5. In any simple graph, all edges are symmetric and undirected.
Undirected Graphs:
A multigraph is a graph where:

1. Multiple Edges: There can be more than one edge (also called parallel edges) between the
same pair of vertices.
2. Loops: A multigraph may allow or disallow loops, depending on the specific context.
Properties:
1. An edge is represented as a multiset of vertex pairs: 𝐸 = {{𝑢, 𝑣}, {𝑢, 𝑣}, … }, allowing multiple
edges between the same vertices.
2. The degree of a vertex is the total number of edges (including multiple edges) connected to it.
Loops, if allowed, count twice toward the degree.
3. Adjacency List: Each vertex lists all its neighbours, including repetitions for multiple edges.
Adjacency Matrix: Entries 𝐴[𝑖][𝑗] represent the number of edges between vertices 𝑖 and 𝑗.
4. Multiple edges between the same pair of vertices distinguish a multigraph from a simple graph.
Simple Graphs vs. Multiple (Multigraphs)

Aspect Simple Graph Multigraph

At most one edge between any pair of Multiple edges (parallel edges) and
Definition
vertices, no loops. loops are allowed.

Each pair of vertices has at most one A pair of vertices can have multiple
Edges
connecting edge. connecting edges.

Allowed (edges starting and ending at


Loops Not allowed.
the same vertex).

More complex due to parallel edges and


Complexity Simpler to analyze and represent.
loops.

Application Electrical circuits, transportation


Network topologies, routing graphs.
Examples networks.

Entries can be integers indicating the


Adjacency Matrix Binary: entries are 0 or 1.
number of edges.

May look cluttered due to multiple


Visualization Cleaner with fewer edges.
edges and loops.

Connected and Disconnected Graphs

A path in a graph is a sequence of vertices in which each consecutive pair of vertices is connected by
an edge. It represents a traversal from one vertex to another, following the edges of the graph. So, a
path in a graph is a sequence of vertices 𝑣0 , 𝑣1 , 𝑣2 , ..., 𝑣𝑘 such that each pair (𝑣𝑖 , 𝑣𝑖+1 ) is an edge in the
graph. A closed path (or cycle) is a path that starts and ends at the same vertex, and no other vertex is
repeated except the starting/ending vertex.

A connected graph is an undirected graph in which there is a path between every pair of vertices. This
means that for any two vertices 𝑢 and 𝑣 in the graph, there is a sequence of edges that connects 𝑢 to 𝑣.
In other words, a graph is connected if it is possible to travel from any vertex to any other vertex in
the graph via the edges. Otherwise graph is called disconnected graph.

Properties:

1. A path in a graph is a sequence of vertices where each consecutive pair of vertices is connected
by an edge. In a connected graph, there must exist a path between every pair of vertices.
2. A connected graph always has a spanning tree (a subgraph that includes all the vertices and is
connected, with no cycles). A spanning tree contains exactly V−1V - 1V−1 edges if the graph
has VVV vertices.
3. A connected subgraph of a graph is a subgraph that is itself a connected graph. A disconnected
graph can be split into multiple connected subgraphs (also called components).
4. If you remove any edge from a connected graph and it causes the graph to break into separate
components, the graph was originally critical at that edge.
5. If a vertex is removed and the graph splits into separate components, the vertex is called a cut-
vertex.

A graph is disconnected if there exists at least one pair of vertices with no path between them. A
directed graph is strongly connected if there is a directed path from every vertex to every other vertex.
A directed graph is weakly connected if there is a path (ignoring direction) between any pair of vertices.

Connected vs. Disconnected Graphs

Aspect Connected Graph Disconnected Graph

Path Between Every pair of vertices is connected by a At least one pair of vertices is not
Vertices path. connected by any path.

Consists of two or more connected


Components Consists of one connected component.
components.

Can traverse all vertices from any Not all vertices can be reached from a
Traversal
starting point. single starting point.

Trees, cycles, and complete graphs are Forests (disjoint trees) and subgraphs of
Graph Types
always connected. connected graphs are disconnected.

Application Fully operational networks or Broken networks or isolated


Examples communication systems. subnetworks.

Adjacency No rows/columns of all zeros (every Rows/columns of all zeros exist for
Matrix vertex has at least one connection). isolated vertices.
Provide the details of the terms degree of a vertex, path, and cycle with suitable diagrams. Prove that
the sum of the degrees of all vertices in an undirected graph is twice the number of edges. Can a simple
graph exist with 15 vertices each of degree five?
Solution.

Degree of a Vertex

The degree of a vertex in a graph refers to the number of edges incident to the vertex. It represents the
number of edges that are connected to the vertex. In an undirected graph: Each edge contributes 1 to
the degree of both its endpoints.

In a directed graph: The degree is split into two types:

 In-degree: The number of edges directed towards the vertex.


 Out-degree: The number of edges directed away from the vertex.

Table of Degree Properties:

Property Explanation

The sum of the degrees of all vertices in an undirected


Sum of Degrees
graph is twice the number of edges.

The number of vertices with odd degrees in an


Odd Degree Vertices
undirected graph is always even.

Regular Graph A graph where all vertices have the same degree.

Isolated Vertex A vertex with degree 0, i.e., no incident edges.

A vertex with degree 1, connected to only one other


Pendant Vertex
vertex.

Degree Sequence The list of degrees of vertices in non-increasing order.

The sum of the degrees of all vertices in an undirected


Handshaking Lemma
graph is twice the number of edges.
Path in a Graph

A path in a graph is a sequence of vertices connected by edges. More specifically:

1. A path starts at one vertex and proceeds through a series of vertices, with each consecutive pair
of vertices being connected by an edge.
2. Paths can be categorized based on whether they repeat vertices or edges.

The length of a path is the number of edges in the path. For a path

𝑃𝑛 = 𝑣1 → 𝑣2 →. . . → 𝑣𝑛, the length is 𝑛 − 1,

where 𝑛 is the number of vertices in the path.

A simple path is a path that does not visit any vertex more than once. Each vertex in the path is distinct.
A walk is a sequence of vertices where each consecutive pair of vertices is connected by an edge, but a
walk may repeat vertices and edges. A walk does not require the vertices to be distinct. A closed path
(also called a cycle) starts and ends at the same vertex and does not repeat any vertex other than the
starting/ending vertex. Trail: A trail is a path in which no edge is repeated, but vertices may be repeated.
Circuit: A circuit is a closed trail, meaning a trail that starts and ends at the same vertex but does not
repeat any edges. Hamiltonian Path: A path in a graph that visits every vertex exactly once. Eulerian
Path: A path that uses every edge of a graph exactly once.

Example. In the following simple graph, we have

Properties of a Path

1. Simple Path: A simple path does not revisit any vertex. It only passes through each vertex
once.
2. Connectedness: A path is one way of showing that a graph is connected. If there is a path
between every pair of vertices, the graph is connected.
3. Cycle: A path that forms a loop where the first vertex is the same as the last vertex is a cycle.
4. Path in Directed Graphs: In a directed graph (digraph), a path is a sequence of directed edges
from one vertex to another. Each edge in the path must be directed in the direction from one
vertex to the next.

Cycle in Graphs

A cycle is a closed path in a graph, where:

1. The first and last vertices are the same.


2. All edges are distinct (no edge is repeated).
3. Except for the starting and ending vertex, no other vertex is revisited.
The length of a cycle 𝐶𝑛 is the number of edges (or equivalently, the number of vertices minus 1) in
the cycle. For a cycle 𝐴 → 𝐵 → 𝐶 → 𝐷 → 𝐴, the length is 4 (4 edges). Note that 𝑛 ≥ 3.

Closed Path: A cycle starts and ends at the same vertex. No Repeated Edges: Each edge in the cycle
is distinct. No Repeated Vertices (Except the Start/End): A cycle does not visit any vertex more than
once, except the starting vertex. In an undirected graph, a cycle is a set of vertices connected in such
a way that the path forms a loop. In a directed graph, a cycle is a directed path that starts and ends at
the same vertex, with all edges directed consistently. A simple cycle is a cycle that does not revisit any
vertex other than the starting vertex. A Hamiltonian cycle is a cycle that visits every vertex in the graph
exactly once (except for the starting/ending vertex). A Eulerian cycle is a cycle that uses every edge of
the graph exactly once.
Even or Odd Cycles: A cycle can have an even or odd number of vertices/edges. Cycles with an odd
number of vertices are called odd cycles, and those with an even number are called even cycles.
Relationship to Connectivity: The presence of a cycle in a graph does not necessarily imply
connectivity. A disconnected graph may still have cycles within its components. Network Design:
Cycles help in redundancy for fault-tolerant designs. Graph Traversal Algorithms: Detecting cycles
is crucial in graph algorithms like depth-first search (DFS) and detecting deadlocks. Scheduling: In
directed acyclic graphs (DAGs), the absence of cycles is essential for defining task precedence.
Theorem (Handshaking Theorem) Sum of the Degrees of All Vertices is Twice the Number of Edges.

Proof. Let 𝐺 = (𝑉, 𝐸) be an undirected graph where 𝑉 is the set of vertices and 𝐸 is the set of edges.

1. Degree of a vertex: The degree of a vertex 𝑣, denoted 𝑑𝑒𝑔(𝑣), is the number of edges incident
to 𝑣.
2. Counting the edges: Each edge in the graph connects two vertices. Therefore, when counting
the total degree of all vertices, we are counting each edge twice—once for each of its two
endpoints.

Thus, the sum of the degrees of all vertices is:

∑𝑑𝑒𝑔(𝑣) = 2 ∣ 𝐸 ∣

where |𝐸| is the number of edges in the graph.

This proves that the sum of the degrees of all vertices in an undirected graph is twice the number of
edges.

Can a Simple Graph Exist with 15 Vertices, Each of Degree 5?

The degree of each vertex is 5. Therefore, each vertex has 5 edges.

The total sum of the degrees of all vertices in the graph is 15 × 5 = 75.

Since the sum of the degrees of all vertices equals twice the number of edges, we have:
2|𝐸| = 75

This implies that:

75
|𝐸| = = it is not an integer.
2

But the number of edges |𝐸| must be an integer. Therefore, a simple graph with 15 vertices, each of
degree 5, cannot exist. It is impossible to create a simple graph with 15 vertices, each having a degree
of 5, because it leads to a fractional number of edges, which is not possible in a simple graph.

Describe adjacency matrix and incidence matrix for representing graphs, with examples. Discuss the
advantages and disadvantages of representing graphs using an adjacency matrix and an incidence
matrix. Construct the adjacency matrix and incidence matrix for the graph with vertices 𝑉 =
{𝐴, 𝐵, 𝐶, 𝐷} and edges 𝐸 = {(𝐴, 𝐵), (𝐴, 𝐶), (𝐵, 𝐷), (𝐶, 𝐷)}.
Solution.
Adjacency Matrix
An adjacency matrix is a square matrix used to represent a graph, where the rows and columns
represent the vertices. The entries in the matrix indicate whether a pair of vertices is connected by an
edge. Adjacency Matrix is more intuitive and ideal for dense graphs or when quick edge checks are
required.
For a graph 𝐺 = (𝑉, 𝐸) with 𝑛 vertices:

1. 𝐴[𝑖][𝑗] = 1 if there is an edge between vertices 𝑖 and 𝑗.


2. 𝐴[𝑖][𝑗] = 0 otherwise.
3. For a weighted graph, 𝐴[𝑖][𝑗] contains the weight of the edge.

Example Graph: Let 𝑮 = (𝑽, 𝑬) be a graph with

Vertices: 𝑽 = {𝑨, 𝑩, 𝑪, 𝑫},

Edges: 𝐸 = {(𝐴, 𝐶), (𝐴, 𝐷), (𝐴, 𝐸) (𝐵, 𝐸), (𝐶, 𝐴), (𝐶, 𝐵), (𝐶, 𝐷), (𝐷, 𝐶), (𝐸, 𝐷) }

Properties of Adjacency Matrices

1. Symmetry: For undirected graphs, 𝐴[𝑖][𝑗] = 𝐴[𝑗][𝑖].


2. Diagonal Entries: For simple graphs (no loops), diagonal entries are 0 since no vertex connects
to itself.
3. Sparsity: If the graph has far fewer edges than the maximum possible, the adjacency matrix
will have many 0 entries (sparse).

Advantages:

1. Efficient for checking if an edge exists between two vertices (𝑂(1)).


2. Easy to implement.
3. Suitable for dense graphs where the number of edges is close to the square of the
number of vertices.

Incidence Matrix

An incidence matrix is a rectangular matrix used to represent a graph, where rows correspond to
vertices, and columns correspond to edges. For a graph 𝐺 = (𝑉, 𝐸),
1. 𝐼[𝑖][𝑗] = 1 if vertex 𝑖 is incident to edge 𝑗.
2. 𝐼[𝑖][𝑗] = 0 otherwise.
3. For directed graphs, 𝐼[𝑖][𝑗] = −1 if 𝑖 is the tail of the edge 𝑗 and 𝐼[𝑖][𝑗] = 1 if 𝑖 is the head.
Incidence Matrix is compact for sparse graphs and particularly useful for algorithms involving edges
rather than direct vertex adjacency.

Properties of the Incidence Matrix

1. Rows Correspond to Vertices: Each row represents a vertex in the graph.


2. Columns Correspond to Edges: Each column represents an edge in the graph.
3. Sum of Entries in a Column: For undirected graphs, the sum of entries in any column is 2
(each edge connects two vertices). For directed graphs, the sum of entries in any column is 0
(one 1 and one −1).
4. Sparse Matrix: The incidence matrix is sparse for graphs with fewer edges than vertices.

Advantages
1. Edge-Centric Representation: Useful for algorithms where edges are the primary focus.
2. Compact for Sparse Graphs: Requires 𝑂(𝑉 × 𝐸) space, which is efficient for sparse graphs.
3. Clear Representation of Directed Graphs: Distinguishes between the head and tail of an
edge.

Differences Between Adjacency and Incidence Matrix of a graph

Aspect Adjacency Matrix Incidence Matrix


Rectangular matrix that represents
Square matrix that represents
Definition relationships between vertices and
connections between vertices.
edges.
𝑛 × 𝑛, where 𝑛 is the number of 𝑛 × 𝑚, where 𝑛 is the number of
Dimensions
vertices. vertices and 𝑚 is the number of edges.
Rows and columns represent Rows represent vertices, and columns
Row/Column Meaning
vertices. represent edges.
𝐴[𝑖][𝑗] = 1 if there is an edge 𝐼[𝑖][𝑗] = 1 if vertex 𝑖 is incident to
Entry Values
between 𝑖 and 𝑗; 0 otherwise. edge 𝑗; 0 otherwise.
In directed graphs, 𝐴[𝑖][𝑗] = 1 if In directed graphs, 𝐼[𝑖][𝑗] = −1 for the
Representation of
there is a directed edge from 𝑖 to tail and 𝐼[𝑖][𝑗] = 1 for the head of the
Direction
𝑗. edge.
For weighted graphs, 𝐴[𝑖][𝑗] Typically not used for weights;
Representation of Weight
stores the weight of the edge. separate storage may be required.
Symmetric for undirected
Symmetry Not necessarily symmetric.
graphs.
𝑂(𝑛2 ); efficient for dense
Space Complexity 𝑂(𝑛 × 𝑚); efficient for sparse graphs.
graphs.
Inefficient: Requires checking all
Edge Adjacency Check Efficient: 𝑂(1).
columns.
Complex: Iterate through all edge
Neighbour Enumeration Simple: Iterate through a row.
columns.
- Graph traversal algorithms like - Flow networks.
Applications Floyd-Warshall. - Edge-focused algorithms like
- Dense graphs with many edges. minimum spanning tree.
Easy to construct and More complex due to incident
Ease of Implementation
manipulate. relationships.

Discuss complete graphs, bipartite graphs, and complete bipartite graphs with suitable diagrams
and write their properties and differences.
Solution.
Complete Graphs

A complete graph, denoted by 𝐾𝑛 , is a type of graph in which every pair of distinct vertices is
connected by a unique edge. It represents the most connected form of a graph for a given number of
vertices.
Properties of Complete Graphs

𝑛 𝑛(𝑛−1)
1. For the complete graph 𝐾𝑛 , the order ( number of vertices) is 𝑛 and its size is ( ) = .
2 2
2. Every vertex has a degree of 𝑛 − 1, as it connects to all other vertices.
3. Graph 𝐾𝑛 is (𝑛 − 1)-regular graph.
4. Complete graphs are symmetric, meaning the structure looks the same from the perspective of
any vertex.
5. Contains multiple cycles of varying lengths, including all possible lengths from 3 to 𝑛.
6. 𝐾3 (Triangle); 𝐾4 (Tetrahedron); 𝐾5 (Pentagon).

Bipartite Graphs

A bipartite graph is a special type of graph in which the vertices can be divided into two distinct sets,
𝑉1 and 𝑉2 , such that every edge connects a vertex in 𝑉1 to a vertex in 𝑉2 . No edges exist between vertices
within the same set. These graphs are widely used in modeling real-world problems where relationships
exist between two distinct groups of entities.

A bipartite graph is a graph 𝐺 = (𝑉, 𝐸), where the vertex set 𝑉 can be partitioned into two disjoint
subsets 𝑉1 and 𝑉2 such that:

1. Partitioning of Vertices:

𝑉 = 𝑉1 ∪ 𝑉2 , and 𝑉1 ∩ 𝑉2 = ∅.

2. Edge Constraints:

Every edge 𝑒 ∈ 𝐸 connects a vertex from 𝑉1 to a vertex from 𝑉2 .

Formally, for every 𝑒 = (𝑢, 𝑣) ∈ 𝐸, either 𝑢 ∈ 𝑉1 and 𝑣 ∈ 𝑉2 , or 𝑢 ∈ 𝑉2 and 𝑣 ∈ 𝑉1 .

3. Cycle Condition:

𝐺 is bipartite if and only if it contains no cycles of odd length.

Figure 1
Figure 2

Properties of Bipartite Graphs


A bipartite graph has several distinctive properties that define its structure and behavior. These
properties are widely used in graph theory applications and algorithms.
1. The vertices of a bipartite graph 𝐺 = (𝑉, 𝐸) can be partitioned into two disjoint sets 𝑉1 and 𝑉2
, such that:
𝑉 = 𝑉1 ∪ 𝑉2 , and 𝑉1 ∩ 𝑉2 = ∅.
2. Every edge connects a vertex in 𝑉1 to a vertex in 𝑉2 .
3. A graph is bipartite if and only if it contains no cycles of odd length. This is equivalent to
stating that the graph is 2-colorable.
4. In a bipartite graph, vertices in one set 𝑉1 may have connections to multiple vertices in 𝑉2 , and
vice versa.
5. The sum of degrees of vertices in 𝑉1 equals the sum of degrees of vertices in 𝑉2 :
∑ 𝑑𝑒𝑔(𝑢) = ∑ 𝑑𝑒𝑔(𝑣)
𝑢∈𝑉1 𝑣∈𝑉2
6. A bipartite graph can be connected or disconnected. A connected bipartite graph that has an
equal number of vertices in 𝑉1 and 𝑉2 can form a perfect matching.
7. The adjacency matrix of a bipartite graph can be written in a block form:
0 𝐵
𝐴=( 𝑇 )
𝐵 0
Here, B is a ∣ 𝑉1 ∣×∣ 𝑉2 ∣ matrix representing edges between 𝑉1 and 𝑉2 .
8. If there is any subgraph in the bipartite graph, then that subgraph will also be itself bipartite.
9. If there is a case where |𝑉1 | ≠ |𝑉2 |, then the bipartite graph will not contain a perfect match
with the bipartition 𝑉1 and 𝑉2 .
Here are some examples of real-world uses for bipartite graphs:

 Bipartite graphs are used in cancer detection.


 Bipartite graphs are used in advertising and e-commerce for rankings.
 Bipartite graphs can be used to predict preferences (such as movies or food preferences).
 Bipartite graphs are used in matching problems (such as the Stable Marriage problem).
Complete Bipartite Graphs
A complete bipartite graph is a special type of bipartite graph in which every vertex in one set is
connected to every vertex in the other set, and there are no edges within each set. A complete bipartite
graph is denoted as 𝐾𝑚,𝑛 , where 𝑚 and 𝑛 represent the number of vertices in the two disjoint sets 𝑉1
and 𝑉2 , respectively. Complete bipartite graphs are a fundamental concept in graph theory. They provide
a rich structure for modeling relationships between two distinct sets and are widely applied in areas
such as matching theory, network flow, and combinatorial optimization.
A complete bipartite graph 𝐾𝑚,𝑛 is a bipartite graph with vertex set 𝑉 = 𝑉1 ∪ 𝑉2 , where

1. 𝑉1 contains mmm vertices.


2. 𝑉2 contains 𝑛 vertices.
3. Every vertex in 𝑉1 is connected to every vertex in 𝑉2 by an edge.
In other words, the edge set 𝐸 contains all possible edges between the vertices of 𝑉1 and 𝑉2 , but there
are no edges between vertices within the same set.

The following are some examples of Complete multipartite graphs:

Properties of Complete Bipartite Graphs


1. The number of edges in a complete bipartite graph 𝐾𝑚,𝑛 is given by
∣ 𝐸 ∣= 𝑚 × 𝑛
2. This is because each vertex in 𝑉1 is connected to every vertex in 𝑉2 .
3. In a complete bipartite graph 𝐾𝑚,𝑛 every vertex in 𝑉1 has degree 𝑛, and every vertex in 𝑉2 has
degree 𝑚. This means the graph is regular, with all vertices having the same degree within
each set.
4. The graph 𝐾𝑚,𝑛 contains no odd-length cycles, which makes it 2-colorable.
5. The chromatic number of a complete bipartite graph is 2, because the graph is 2-colorable (since
it is bipartite).
6. A complete bipartite graph can be used to construct subgraphs by removing edges or vertices,
often leading to smaller complete bipartite graphs.
Therefore, Complete bipartite graphs are a fundamental concept in graph theory. They provide a rich
structure for modeling relationships between two distinct sets and are widely applied in areas such as
matching theory, network flow, and combinatorial optimization.
Differences Between Complete, Bipartite, and Complete Bipartite Graphs
Complete Bipartite
Aspect Complete Graphs Bipartite Graphs
Graphs

Every pair of Vertex set can be divided into two Bipartite graph where all
Definition vertices is disjoint subsets with no intra-set possible edges between
connected. edges. subsets exist.

Varies; depends on the


Edges 𝑛(𝑛 − 1)/2. 𝑚 × 𝑛.
connections.

Chromatic
𝑛. At most 2. At most 2.
Number

Contains cycles of
Cycles No odd-length cycles. No odd-length cycles.
any length ≥ 3.

Each vertex
Vertex Each vertex in 𝑉1 connects
connects to 𝑛 − 1 Only vertices in 𝑉1 connect to 𝑉2 .
Connections to all in 𝑉2
others.

Explain the concept of a degree sequence of a graph and discuss its importance. What is the degree
sequence of 𝐾𝑛 and 𝐾𝑚,𝑛 . How many edges does a graph have if its degree sequence is 4, 3, 3, 2, 2?
Draw such a graph.
Solution.
Degree Sequence of a Graph
The degree sequence of a graph is the list of degrees of all its vertices, typically written in non-
increasing order. For a graph 𝐺 = (𝑉, 𝐸) , if 𝑑𝑒𝑔(𝑣1 ), 𝑑𝑒𝑔(𝑣2 ),…, 𝑑𝑒𝑔(𝑣𝑛 ) are the degrees of the
vertices 𝑣1 , 𝑣2 ,…,𝑣𝑛 , the degree sequence is
Degree sequence= (𝑑𝑒𝑔(𝑣1 ), 𝑑𝑒𝑔(𝑣2 ),…, 𝑑𝑒𝑔(𝑣𝑛 )),
sorted as (𝑑𝑒𝑔(𝑣1 ) ≥ 𝑑𝑒𝑔(𝑣2 ) ≥ ⋯ ≥ 𝑑𝑒𝑔(𝑣𝑛 )).
Example. In a complete graph 𝐾𝑛 , every vertex is connected to every other vertex. Degree of each
vertex: 𝑛 − 1, and
Degree sequence: (𝑛 − 1, 𝑛 − 1, … , 𝑛 − 1)(repeated 𝑛 times).
Example. In a complete bipartite graph 𝐾𝑚,𝑛 , we have

Degree sequence: (𝑛, 𝑛,…, 𝑛, 𝑚, 𝑚,…,𝑚)(with 𝑚 repeated n times and 𝑛 repeated m times).

Properties
1. The degree sequence provides important structural information about the graph. However, it
does not uniquely determine the graph, as non-isomorphic graphs can share the same degree
sequence.
2. The degree sequence helps determine whether a sequence of integers can represent the degrees
of a simple graph, known as the graph realization problem.
3. From the degree sequence, one can infer whether the graph is connected, bipartite, or regular.
Number of Edges from the given Degree Sequence
The total number of edges in a graph can be computed from its degree sequence using the handshaking
lemma, which states:
Sum of degrees of all vertices=2×Number of edges.
For the degree sequence (4,3,3,2,2):
Sum of degrees= 4 + 3 + 3 + 2 + 2 = 14.
Number of edges= 14/2 = 7.

Drawing a Graph with the Degree Sequence (𝟒, 𝟑, 𝟑, 𝟐, 𝟐)


To construct the graph:

1. Create vertices 𝐴, 𝐵, 𝐶, 𝐷, 𝐸 with degrees 4, 3, 3, 2, and 2, respectively.


2. Start connecting vertices, ensuring the degree constraints are satisfied:
o Connect 𝐴 to 𝐵, 𝐶, 𝐷, 𝐸 (Degree of 𝐴 becomes 4).
o Connect 𝐵 to 𝐶 and 𝐷 (Degree of 𝐵 becomes 3, 𝐶 becomes 2, 𝐷 becomes 2).
o 𝐶 and 𝐷 already have their degree satisfied.
o Connect 𝐸 to 𝐵 (Degree of 𝐸 becomes 2).

Adjacency List:

 𝐴: {𝐵, 𝐶, 𝐷, 𝐸},
 𝐵: {𝐴, 𝐶, 𝐸},
 𝐶: {𝐴, 𝐵},
 𝐷: {𝐴, 𝐵},
 𝐸: {𝐴, 𝐵}.

Define graph isomorphism. Explain the necessary and sufficient conditions for two graphs to be
isomorphic. List and explain at least three invariants (graph properties) that must hold for isomorphic
graphs. Determine whether the following graphs G and H are isomorphic.

Solution.
Graph Isomorphism

Graph isomorphism is a fundamental concept in graph theory that establishes whether two graphs are
essentially the same, differing only in the labelling of their vertices or edges. It provides a way to
identify structural equivalence between graphs without being concerned about the specific names or
labels of vertices and edges.
In practical terms, if two graphs are isomorphic, they have the same shape or structure, even though the
way they are drawn or labelled may differ. This concept is widely used in various fields, including
chemistry (for comparing molecular structures), computer science (network analysis), and mathematics
(graph classification).

Definition. Two graphs 𝐺1 = (𝑉1, 𝐸1) and 𝐺2 = (𝑉2, 𝐸2) are said to be isomorphic if there exists a
function 𝑓: 𝑉1 → 𝑉2 such that

1. 𝑓 is one to one map,


2. 𝑓 is onto map,
3. (𝑢, 𝑣) ∈ 𝐸1 ⟺ (𝑓(𝑢), 𝑓(𝑣)) ∈ 𝐸2.

This means the connectivity (adjacency) between vertices in 𝐺1 is preserved under the mapping 𝑓 in
𝐺2, and this can be written as 𝐺1 ≅ 𝐺2. Otherwise, 𝐺1 ≇ 𝐺2.

Example. The following graphs isomorphic.

The following graphs are non-isomorphic.

Necessary and Sufficient Conditions for Isomorphism

To determine whether two graphs 𝐺1 and 𝐺2 are isomorphic(𝐺1 ≅ 𝐺2), several conditions must be
checked. These conditions are both necessary (must be true for isomorphism) and sufficient (if true,
ensure isomorphism). Here's a detailed explanation:

Step 1. Order of 𝐺1 is equal to order of 𝐺2, and size of 𝐺1 is equal to size of 𝐺2.

Step 2. The degree sequence (list of vertex degrees sorted in non-increasing order) of 𝐺1 must match
the degree sequence of 𝐺2. The degree of a vertex is preserved under isomorphism. A mismatch in
degree sequences disqualifies isomorphism, that is,

Degree sequence of 𝑮𝟏=Degree sequence of 𝑮𝟐.

Step 3. Adjacency relationships between vertices in 𝐺1 must correspond to adjacency relationships in


𝐺2. If 𝑢 and 𝑣 are adjacent in 𝐺1, then their mapped vertices 𝑓(𝑢) and 𝑓(𝑣) in 𝐺2 must also be adjacent,
that is,

𝑨(𝑮𝟏) = 𝑨(𝑮𝟐)
Step 4. Subgraphs (smaller graphs derived from removing vertices and edges) in 𝐺1 must correspond
to equivalent subgraphs in 𝐺2 under isomorphism, that is

subgroups are structural features preserved under isomorphism.

Step 5. The number of cycles and their respective lengths must match in both graphs. For instance, if
one graph has a cycle of length 3 (triangle), the other must have an equivalent cycle under isomorphism,
that is,

Cycles are structural features preserved under isomorphism.

Graph Invariants for Isomorphic Graphs

Graph invariants are properties that remain unchanged under isomorphism. The following three
invariants must hold for two isomorphic graphs:

1. Number of Vertices: The total number of vertices in 𝐺1 and 𝐺2 must be equal.


2. Degree Sequence: The degree sequences of the graphs must be identical (sorted in non-
increasing order).
3. Number of Edges: The total number of edges must match.

Other Invariants of isomorphic graphs

Graph invariants are properties that do not change under isomorphism. Checking these invariants helps
further verify isomorphism:

1. Connectedness: If 𝐺1 is connected, 𝐺2 must also be connected.


2. Number of Components: The number of connected components in 𝐺1 must equal that in 𝐺2.
3. Planarity: If 𝐺1 is planar (can be drawn without edge crossings), 𝐺2 must also be planar.

(a) Now to verify the following graphs are isomorphic or not?

Solution. To verify whether the given graphs 𝐺 and 𝐻 (depicted in the image) are isomorphic, we follow
a systematic approach:
Step 1: Count the Vertices and Edges
Graph 𝑮: Vertices: 𝑢1, 𝑢2, 𝑢3, 𝑢4, 𝑢5, 𝑢6 (|𝑉(𝐺)| = 6).
Edges: |𝐸(𝐺)| = 7 (count all edges shown in 𝐺).
Graph 𝑯: Vertices: 𝑣1, 𝑣2, 𝑣3, 𝑣4, 𝑣5, 𝑣6 (|𝑉(𝐻)| = 6).
Edges: |𝐸(𝐻)| = 7.
Therefore, |𝑉(𝐺)| = |𝑉(𝐻)| and |𝐸(𝐺)| = |𝐸(𝐻)|, so the graphs could potentially be isomorphic.
Proceed to the next step.
Step 2: Compare Degree Sequences
Degree sequence of 𝐺: {3,3,2,2,2,2} (sorted non-increasing).
Degree sequence of 𝐻: {3,3,2,2,2,2} (sorted non-increasing).
Therefore, the degree sequences match, proceed to the next step.
Step 3: Check Adjacency Structure
We need to verify whether the adjacency relationships in 𝐺 can be mapped to those in 𝐻.

Adjacency List of 𝑮:

 𝑢1: {𝑢2, 𝑢4}.


 𝑢2: {𝑢1, 𝑢3, 𝑢5}.
 𝑢3: {𝑢2, 𝑢6}.
 𝑢4: {𝑢1, 𝑢5}.
 {𝑢2, 𝑢4, 𝑢6}.
 𝑢6: {𝑢3, 𝑢5}.

Adjacency List of 𝑯:

 𝑣1: {𝑣2, 𝑣4}.


 𝑣2: {𝑣1, 𝑣3, 𝑣5}.
 𝑣3: {𝑣2, 𝑣6}.
 𝑣4: {𝑣1, 𝑣5}.
 𝑣5: {𝑣2, 𝑣4, 𝑣6}.
 𝑣6: {𝑣3, 𝑣5}.

The adjacency structure of 𝐺 and 𝐻 matches, indicating that they may be isomorphic.

Step 4: Explicit Mapping

Construct a bijective mapping 𝒇: 𝑽(𝑮) → 𝑽(𝑯) that preserves adjacency:

1. Map 𝒖𝟏 → 𝒗𝟏, 𝒖𝟐 → 𝒗𝟐, 𝒖𝟑 → 𝒗𝟑, 𝒖𝟒 → 𝒗𝟒, 𝒖𝟓 → 𝒗𝟓, 𝒖𝟔 → 𝒗𝟔.


2. Check adjacency preservation:
o 𝒖𝟏 ∼ 𝒖𝟐, 𝒖𝟒 maps to 𝒗𝟏 ∼ 𝒗𝟐, 𝒗𝟒.
o 𝒖𝟐 ∼ 𝒖𝟏, 𝒖𝟑, 𝒖𝟓 maps to 𝒗𝟐 ∼ 𝒗𝟏, 𝒗𝟑, 𝒗𝟓.
o 𝒖𝟑 ∼ 𝒖𝟐, 𝒖𝟔 maps to 𝒗𝟑 ∼ 𝒗𝟐, 𝒗𝟔.
o 𝒖𝟒 ∼ 𝒖𝟏, 𝒖𝟓 maps to 𝒗𝟒 ∼ 𝒗𝟏, 𝒗𝟓.
o 𝒖𝟓 ∼ 𝒖𝟐, 𝒖𝟒, 𝒖𝟔 maps to 𝒗𝟓 ∼ 𝒗𝟐, 𝒗𝟒, 𝒗𝟔.
o 𝒖𝟔 ∼ 𝒖𝟑, 𝒖𝟓 maps to 𝒗𝟔 ∼ 𝒗𝟑, 𝒗𝟓.

Since adjacency is preserved under this mapping, the graphs 𝑮 and 𝑯 are isomorphic.

Step 5: Invariants for Verification

Three key invariants that hold:

1. Degree Sequence: Both graphs have the same degree sequence.


2. Number of Vertices and Edges: Both graphs have 6 vertices and 7 edges.
3. Adjacency Relationships: All adjacency relationships in 𝐺 are preserved in 𝐻.

Thus the given two graphs 𝐺 and 𝐻 are isomorphic.


(b) Now to verify the following graphs are isomorphic or not?

Solution.
Step 1. Both graphs have the same number of vertices and edges, so they could be isomorphic. We will
continue to the next steps.
Step 2. Both graphs have the same degree sequence: 3, 3, 3, 3, 3, 3. This is a necessary condition for
isomorphism.
Step 3: Check Adjacency Structure

Now, let's compare the adjacency list for both graphs:

 Graph 1:
o 𝑢1 is adjacent to 𝑢2, 𝑢5, 𝑢6
o 𝑢2 is adjacent to 𝑢1, 𝑢3, 𝑢5
o 𝑢3 is adjacent to 𝑢2, 𝑢4, 𝑢6
o 𝑢4 is adjacent to 𝑢3, 𝑢5, 𝑢6
o 𝑢5 is adjacent to 𝑢1, 𝑢2, 𝑢4
o 𝑢6 is adjacent to 𝑢1, 𝑢3, 𝑢4
 Graph 2:
o 𝑣1 is adjacent to 𝑣2, 𝑣5, 𝑣6
o 𝑣2 is adjacent to 𝑣1, 𝑣3, 𝑣5
o 𝑣3 is adjacent to 𝑣2, 𝑣4, 𝑣6
o 𝑣4 is adjacent to 𝑣3, 𝑣5, 𝑣6
o 𝑣5 is adjacent to 𝑣1, 𝑣2, 𝑣4
o 𝑣6 is adjacent to 𝑣1, 𝑣3, 𝑣4

The adjacency structures are identical, confirming that the graphs are likely isomorphic.

Step 4: Structural Features

Both graphs have similar features:

 They each have 6 vertices and 9 edges.


 Both graphs are connected, meaning there is a path between every pair of vertices.
 They both have the same degree sequence (all vertices have degree 3).

Step 5: Try a Bijection

We can attempt a mapping between the vertices of Graph 1 and Graph 2. One possible mapping that
preserves adjacency might look like:

 𝑢1 maps to 𝑣1
 𝑢2 maps to 𝑣2
 𝑢3 maps to 𝑣3
 𝑢4 maps to 𝑣4
 𝑢5 maps to 𝑣5
 𝑢6 maps to 𝑣6

This mapping preserves the adjacency relationships between vertices.

The two graphs are isomorphic since they satisfy the necessary conditions for isomorphism:

 Same number of vertices and edges.


 Same degree sequence.
 Identical adjacency structures.
 A bijection that preserves the adjacency relations.

Thus, Graph 1 and Graph 2 are isomorphic.

Distinguish between isomorphic and non-isomorphic graphs with detailed examples. Verify whether
the given graphs are isomorphic or non-isomorphic, providing a thorough explanation for your
reasoning.

Solution.

Isomorphic vs. Non-Isomorphic Graphs

Isomorphic Graphs: Two graphs are said to be isomorphic if there is a one-to-one correspondence
between their vertices and edges such that the adjacency structure (connections between vertices) is
preserved. In other words, one graph can be transformed into the other by simply renaming the vertices
while preserving the edge connections. Mathematical Definition: Two graphs 𝑮 = (𝑽𝑮 , 𝑬𝑮 ) and 𝑯 =
(𝑽𝑯 , 𝑬𝑯 ) are isomorphic if there is a bijection 𝒇: 𝑽𝑮 → 𝑽𝑯 such that for any two vertices 𝒖, 𝒗 ∈ 𝑽𝑮 ,
there exists the corresponding edge {𝒖, 𝒗} ∈ 𝑬𝑮 if and only if {𝒇(𝒖), 𝒇(𝒗)} ∈ 𝑬𝑯 .

Non-Isomorphic Graphs: Two graphs are non-isomorphic if no such one-to-one correspondence


exists between their vertices and edges that preserves the adjacency structure. In other words, the graphs
are structurally different, and no amount of renaming vertices can make one graph identical to the other.

Properties of Isomorphic Graphs

 Same number of vertices and edges.


 Same degree sequence (i.e., each vertex in one graph has the same degree as the corresponding
vertex in the other graph).
 Same number of connected components (if the graph is connected or disconnected).
 Same adjacency structure, meaning the vertex connectivity is preserved.

Isomorphic Graphs Example


Thus, the graphs are isomorphic, as the adjacency structure is preserved with this mapping.

Non-Isomorphic Graphs Example

Here is a detailed differences table that distinguishes between isomorphic and non-isomorphic
graphs:

Aspect Isomorphic Graphs Non-Isomorphic Graphs


Two graphs are isomorphic if there exists a Two graphs are non-isomorphic if no
Definition one-to-one mapping between their vertices such mapping exists, meaning their
such that adjacency is preserved. structures differ in some way.
Same number of vertices, but may differ
Number of
Same number of vertices in both graphs. in structural properties or edge
Vertices
connections.
Number of Different number of edges, making the
Same number of edges in both graphs.
Edges graphs non-isomorphic.
Degree
Same degree sequence for both graphs. Degree sequences may be different.
Sequence
There exists a one-to-one correspondence
Adjacency No such correspondence exists;
between vertices that preserves edge
Structure adjacency relationships differ.
connections.
Graph Invariant properties (such as connectivity, Properties like cycles, connectivity, and
Properties cycles, etc.) are preserved. components may differ.

This table outlines the key differences between isomorphic and non-isomorphic graphs based on
structural, edge, and vertex properties.

Describe how the degree sequence can help determine if two graphs are not isomorphic. Using this
method, verify whether the following graphs are isomorphic:

Graph 1: 𝑉 = {𝑎, 𝑏, 𝑐, 𝑑}, 𝐸 = {(𝑎, 𝑏), (𝑏, 𝑐), (𝑐, 𝑑), (𝑑, 𝑎)}

Graph 2: 𝑉 = {1,2,3,4}, 𝐸 = {(1,2), (2,3), (3,4), (4,1)}.

Solution.

Degree Sequence of a Graph

In graph theory, the degree sequence of a graph is a sequence of the degrees of its vertices, arranged
in a non-increasing order. The degree of a vertex is defined as the number of edges incident to it. The
degree sequence provides essential information about the overall structure of the graph and serves as a
tool for analyzing and characterizing graphs.

The degree sequence is crucial in many areas of graph theory, as it allows us to understand the
relationships between the vertices in a graph, make inferences about graph properties, and even
determine if two graphs are isomorphic. It is also an important factor in determining the feasibility of
constructing a graph with a given degree sequence.

The degree of a vertex reflects how connected the vertex is to the rest of the graph, and by analyzing
the degree sequence, one can gain insights into various graph properties such as whether the graph is
connected, regular, bipartite, or complete.

Definition. The degree sequence of a graph 𝐺 is defined as the list of the degrees of all vertices in the
graph.

Let 𝐺 = (𝑉, 𝐸) be a graph, where 𝑉 = {𝑣1, 𝑣2, … , 𝑣𝑛} is the set of vertices and 𝐸 is the set of edges.
For each vertex 𝑣𝑖 ∈ 𝑉, let 𝑑𝑒𝑔(𝑣𝑖) denote the degree of vertex 𝑣𝑖, which is the number of edges
incident to 𝑣𝑖. The degree sequence 𝐷(𝐺) of a graph 𝐺 is the list of degrees of all vertices in 𝐺, denoted
as:

𝐷(𝐺) = (𝑑𝑒𝑔(𝑣1), 𝑑𝑒𝑔(𝑣2), … , 𝑑𝑒𝑔(𝑣𝑛))

where the degree sequence is typically ordered in non-increasing order, meaning that

𝑑𝑒𝑔(𝑣1) ≥ 𝑑𝑒𝑔(𝑣2) ≥ ⋯ ≥ 𝑑𝑒𝑔(𝑣𝑛)

Example: Consider a graph 𝐺 with 4 vertices 𝑉 = {𝑎, 𝑏, 𝑐, 𝑑} and edges 𝐸=


{(𝑎, 𝑏), (𝑏, 𝑐), (𝑐, 𝑑), (𝑑, 𝑎)}. Then the degree sequence of graph 𝐺 is

𝐷(𝐺) = (2,2,2,2)

This sequence tells us that all vertices in this graph have the same degree, which in this case is 2.

A degree sequence is graphical if there exists a simple graph whose degree sequence is exactly the
same. There are various algorithms (e.g., the Havel-Hakimi algorithm) for checking if a degree
sequence is graphical.

The degree sequence of a graph is a list of the degrees of the vertices in the graph, sorted in non-
increasing order. It provides important information about the structure of the graph and plays a
significant role in graph theory, especially in determining graph properties and graph isomorphism.

Properties of the Degree Sequence:

1. Non-Increasing Order:
o The degree sequence is typically written in non-increasing order, i.e., 𝒅𝟏 ≥ 𝒅𝟐 ≥ ⋯ ≥
𝒅𝒏, where 𝒅𝒊 represents the degree of the 𝒊-th vertex. For example, the degree sequence
of a graph might be [𝟒, 𝟑, 𝟑, 𝟐], indicating that the graph has four vertices with degrees
4, 3, 3, and 2, respectively.
2. Sum of Degrees and Number of Edges:
o
The sum of the degrees of all vertices in a graph is always equal to twice the number
of edges. This is a direct consequence of the Handshaking Lemma, which states:
o ∑𝑛 𝑖=1 𝑑𝑒𝑔(𝒗𝒊) = 𝟐|𝑬|
o where |𝐸| is the number of edges in the graph, and 𝑑𝑒𝑔(𝒗𝒊) is the degree of vertex 𝒗𝒊.
3. Parity of the Degree Sequence: The degree sequence of any graph must have an even sum,
since each edge contributes 2 to the total degree count. Therefore, the sum of the degrees of the
vertices must always be an even number. This is an important check to verify if a degree
sequence is valid for some graph.
4. Implications for Graph Type:
o Connected Graph: If the degree sequence has large degrees compared to the smaller
ones, the graph is more likely to be connected.
o Regular Graph: If the degree sequence has all identical values, the graph is said to be
regular. A 𝑘-regular graph has all vertices with degree 𝒌.
o Tree: A tree with 𝒏 vertices always has a degree sequence where the sum of the degrees
equals 𝟐(𝒏 − 𝟏) (since a tree has 𝒏 − 𝟏 edges). Also, one vertex will often have degree
1 (leaf nodes).
o Complete Graph: The degree sequence of a complete graph 𝐾𝑛 is [𝒏 − 𝟏, 𝒏 −
𝟏, . . . , 𝒏 − 𝟏], where each vertex is connected to every other vertex, and the degree of
every vertex is 𝒏 − 𝟏.
5. Unique Graphs: For some degree sequences, there may be a unique graph structure that
satisfies that sequence, while for others, there could be multiple graphs with the same degree
sequence. For example, two graphs with the same degree sequence could still be non-
isomorphic, as their structures might differ.

Example: Consider the degree sequence [𝟒, 𝟑, 𝟑, 𝟐].

This degree sequence can be realized by a graph with 4 vertices and 4 edges, and it suggests that the
vertex with degree 4 is connected to the other vertices, one vertex with degree 3 is connected to three
vertices, and the other vertex with degree 3 is connected to three vertices as well, and the vertex with
degree 2 is connected to two vertices.

Therefore, the degree sequence is a fundamental concept in graph theory that helps characterize the
structure of a graph. It is used to determine properties of the graph, verify if a sequence can form a valid
graph, and in the analysis of graph isomorphism. Understanding the degree sequence can provide
insights into the overall structure and behavior of the graph.

Importance:

1. The degree sequence provides key information about the structure of the graph, such as whether
it is regular (all vertices have the same degree).
2. The degree sequence can be used to test whether two graphs are isomorphic (by comparing
their degree sequences).
3. The degree sequence plays a role in determining whether a given degree sequence is graphical,
meaning it can represent the degree sequence of some graph. This is crucial in constructing
specific types of graphs.

How the Degree Sequence Helps in Determining Non-Isomorphism:

1. Matching Degree Sequences: If two graphs are isomorphic, their degree sequences must be
identical. This is a necessary (but not sufficient) condition.
2. Degree Sequence Differences: If the degree sequences of two graphs differ, the graphs are not
isomorphic.

Verifying if Graphs Are Isomorphic Using Degree Sequences:

Graph 1: 𝑉 = {𝑎, 𝑏, 𝑐, 𝑑}, 𝐸 = {(𝑎, 𝑏), (𝑏, 𝑐), (𝑐, 𝑑), (𝑑, 𝑎)}. Here, all vertices are connected in a cyclic
manner.

Degree Sequence:

1. 𝑎 is connected to 𝑏 and 𝑑 → degree of 𝑎 is 2.


2. 𝑏 is connected to 𝑎 and 𝑐 → degree of 𝑏 is 2.
3. 𝑐 is connected to 𝑏 and 𝑑 → degree of 𝑐 is 2.
4. 𝑑 is connected to 𝑐 and 𝑎 → degree of 𝑑 is 2.

Therefore, Degree Sequence: {2,2,2,2}.

Graph 2: 𝑉 = {1,2,3,4}, 𝐸 = {(1,2), (2,3), (3,4), (4,1)}. Here, all vertices are connected in a cyclic
manner, just like Graph 1. Therefore, Degree Sequence: {2,2,2,2}.

Both graphs have the same degree sequence {2,2,2,2}, and since they have identical degree sequences,
the graphs can be isomorphic. However, since both graphs are just simple cycles C4C_4C4, they are
isomorphic by the structure of the cycle, meaning the degree sequence alone is sufficient to suggest that
they could be isomorphic. Thus, Graph 1 and Graph 2 are isomorphic.

Define subgraph, induced subgraph, and spanning subgraph, and explain each with suitable examples.
Highlight the key differences between subgraph, induced subgraph, spanning subgraph, and the original
graph. Draw all possible subgraphs of the given graphs, explaining your approach.

Solution.

Subgraph of a Graph

In graph theory, a subgraph is an important concept that allows us to explore parts of a larger graph by
selecting specific vertices and edges. Understanding subgraphs is fundamental in various areas of
mathematics, computer science, and network analysis, as they help break down complex systems into
smaller, manageable components for analysis.

Definition. A subgraph of a graph 𝐺 is another graph formed by selecting a subset of the vertices and
edges from 𝐺.

The key idea is that a subgraph must preserve the connectivity of the selected vertices, meaning that if
there is an edge between two vertices in the original graph, this edge must appear in the subgraph if
both vertices are included. In simpler terms, a subgraph is formed by choosing a set of vertices from
the original graph and including all edges that connect the selected vertices.

Mathematically, it can be defined as follows:

A subgraph of a graph 𝐺 = (𝑉𝐺 , 𝐸𝐺 ) is a graph 𝐻 = (𝑉𝐻 , 𝐸𝐻 ) such that

1. 𝑉𝐻 ⊆ 𝑉𝐺 (the set of vertices 𝑉𝐻 is a subset of the set of vertices 𝑉𝐺 of 𝐺)


2. 𝐸𝐻 ⊆ 𝐸𝐺 (the set of edges 𝐸𝐻 is a subset of the set of edges 𝐸𝐺 of 𝐺, and each edge in 𝐸𝐻 must
connect vertices that are in 𝑉𝐻 )

Example. Graph 𝐺 and its some subgraphs 𝐻1 , 𝐻2 , 𝐻3 and 𝐻4 .


Properties of Subgraph

Subgraphs play a key role in understanding the structure and relationships within a graph, and they are
a foundational concept for more advanced topics such as graph isomorphism, connectivity, and
optimization problems. A subgraph is a graph formed from a subset of vertices and edges of a given
graph 𝐺 = (𝑉, 𝐸). Below are its key properties:

1. The vertex set of a subgraph 𝐺′ is a subset of the vertex set of the original graph 𝐺, i.e., 𝑉(𝐺′) ⊆
𝑉(𝐺).
2. The edge set of a subgraph 𝐺′ is a subset of the edge set of the original graph 𝐺, i.e., 𝐸(𝐺′) ⊆
𝐸(𝐺).
3. An edge in the subgraph 𝐺′ must connect vertices that are in the vertex set 𝑉(𝐺′).
4. A subgraph does not necessarily need to include all edges between the vertices in 𝑉(𝐺′). It may
include only a partial set of edges.
5. A subgraph can be disconnected, even if the original graph is connected.
6. A graph can have multiple subgraphs, depending on the choice of subsets of vertices and edges.

Induced Subgraph

An induced subgraph 𝐺[𝑉′] of a graph 𝐺 = (𝑉, 𝐸) is the subgraph that is formed by selecting a subset
of the vertices 𝑉′ ⊆ 𝑉, and then including all edges from 𝐺 that have both endpoints in 𝑉′. It is the
subgraph induced by the set of vertices 𝑉′, where the edges are taken as those present in the original
graph between the selected vertices.

Formally, the induced subgraph 𝐺[𝑉′] is

1. 𝑉′ ⊆ 𝑉
2. 𝐸′ = {(𝑢, 𝑣) ∈ 𝐸: 𝑢, 𝑣 ∈ 𝑉′}.

Example. Graph

Induced subgraphs
Properties of Induced Subgraphs

An induced subgraph is a special type of subgraph that is formed by a subset of vertices 𝑉′ of the
original graph 𝐺 = (𝑉, 𝐸) and all edges from 𝑮 that exist between the vertices in 𝑉′. Below are its key
properties:

1. The vertex set of the induced subgraph 𝐺′ is a subset of the vertex set of the original graph 𝐺,
i.e., 𝑉(𝐺′) ⊆ 𝑉(𝐺).
2. The induced subgraph 𝐺′ contains all edges from 𝑮 that connect pairs of vertices in 𝑉(𝐺′). No
edges are omitted between the vertices in 𝑉(𝐺′).
3. For a given vertex subset 𝑉′ ⊆ 𝑉(𝐺), there is exactly one induced subgraph. It is uniquely
determined by 𝑉′.
4. If two vertices in 𝑉′ are adjacent in 𝐺, then they are also adjacent in the induced subgraph 𝐺′.
5. An induced subgraph is defined solely by the vertex subset 𝑉′. The edges are determined
automatically based on 𝑉′.
6. Among all subgraphs with vertex set 𝑉′, the induced subgraph contains the maximum possible
number of edges.

Spanning Subgraph

A spanning subgraph is a concept in graph theory where a subgraph retains all the vertices of the
original graph but includes only a subset of its edges. In simple terms, it is a subgraph that "spans" the
entire vertex set of the original graph. The spanning subgraph provides a way to simplify or analyze the
structure of a graph by focusing on specific connections (edges) while ensuring that all nodes (vertices)
are preserved.

Spanning subgraphs are useful for applications in networking, optimization, and combinatorics, where
maintaining node integrity is essential while exploring edge reductions or specific substructures.

Definition. Let 𝐺 = (𝑉, 𝐸) be a graph where 𝑉 is the set of vertices and 𝐸 is the set of edges. A
subgraph 𝐺′ = (𝑉′, 𝐸′) is a spanning subgraph of GGG if:

1. 𝑉′ = 𝑉 (all vertices are retained).


2. 𝐸′ ⊆ 𝐸 (some or all edges are retained).

Example.

Properties of Spanning Subgraph

A spanning subgraph of a graph 𝐺 = (𝑉, 𝐸) is a subgraph that includes all the vertices of 𝐺 but may
include only a subset of its edges. Below are the key properties of spanning subgraphs:

1. A spanning subgraph contains all vertices of the original graph 𝐺, i.e., 𝑉(𝐺′) = 𝑉(𝐺).
2. The edge set of a spanning subgraph 𝐺′ is a subset of the edge set of the original graph 𝐺, i.e.,
𝐸(𝐺′) ⊆ 𝐸(𝐺).
3. A spanning subgraph can have fewer edges than the original graph, but it cannot add edges that
are not present in 𝐺.
4. A spanning subgraph may retain the type of the original graph (e.g., connected, disconnected,
weighted, etc.), depending on the edges it retains.
5. If 𝐺 is connected, a spanning subgraph that is also a tree is called a spanning tree. A spanning
tree is an acyclic, connected subgraph.
6. The number of possible spanning subgraphs depends on the number of edges in 𝐺. For every
edge in 𝐺, it can either be included or excluded in a spanning subgraph.
7. The original graph 𝐺 is itself a spanning subgraph, and the subgraph containing all vertices and
no edges is a trivial spanning subgraph (in disconnected graphs).
8. Spanning subgraphs are used in applications such as network design, transportation systems,
and electrical circuits where certain connections need to be preserved.

Key Differences

Feature Subgraph Induced Subgraph Spanning Subgraph


A subset of vertices that is Must include all the
Vertices Any subset of vertices. selected, with all edges among vertices of the original
them. graph.
Any subset of edges that All edges from the original A subset of the edges of the
Edges respect the selected graph whose both endpoints are original graph, but must
vertices. in the selected subset. have all the vertices.
Can include edges not Only includes edges that are Can include any subset of
Edge
connecting the selected present in the original graph and edges from the original
Inclusion
vertices. connect the selected vertices. graph.
May or may not have all Contains exactly the edges Contains all the vertices
Graph
the edges between between the selected vertices and some edges of the
Relationship
selected vertices. from the original graph. original graph.

Differentiate between Eulerian paths and Hamiltonian paths with appropriate examples. State the
necessary and sufficient conditions for the existence of a Eulerian path in a graph. Explain why graphs
with Hamiltonian paths may not necessarily have Hamiltonian cycles, supporting your explanation with
examples. Demonstrate that the given graphs do not possess Hamiltonian cycles, providing detailed
reasoning.

Solution.

Eulerian Paths and Eulerian Cycles

A Eulerian Path is a fundamental concept in graph theory, named after the Swiss mathematician
Leonhard Euler, who first studied it in 1736 while solving the famous Königsberg Bridge Problem.
The problem asked whether it was possible to walk through the city of Königsberg in such a way that
one crossed each of its seven bridges exactly once. Euler’s solution laid the foundation for graph theory.

Definition: An Eulerian path is a path in a graph that visits every edge exactly once, without repeating
any edge.

Let 𝐺 = (𝑉, 𝐸) be a graph where 𝑉 is the set of vertices and 𝐸 is the set of edges. An Eulerian Path is
a sequence of edges (𝑒1, 𝑒2, … , 𝑒𝑘) such that
1. Each edge in 𝐸 is included exactly once in the sequence.
2. The path may visit vertices multiple times, but it does not repeat any edge.
3. The path may start and end at different vertices.

A Eulerian Cycle (or Eulerian Circuit) is a fundamental concept in graph theory, named after the
mathematician Leonhard Euler, who introduced it in 1736 while solving the famous Königsberg
Bridge Problem. Eulerian cycles highlight the traversal of all edges in a graph while respecting specific
connectivity and degree properties.

Definition. A Eulerian cycle is a closed path in a graph where:

1. Every edge of the graph is visited exactly once.


2. The path starts and ends at the same vertex.

A Eulerian Circuit is a special case of a Eulerian path where:

1. The path starts and ends at the same vertex.


2. The sequence of edges (𝑒1, 𝑒2, … , 𝑒𝑘) forms a closed loop.

Unlike other types of graph traversals, a Eulerian cycle focuses solely on edges, ensuring no edge is
repeated, though vertices can be revisited.

Importance of Eulerian Cycles: Eulerian cycles have practical applications in real-world problems
such as:

1. Designing efficient postal or delivery routes.


2. Network design, where all connections (edges) need to be utilized without redundancy.
3. Solving problems in circuit design and DNA sequencing.

Characteristics of Eulerian Cycles: A graph can contain a Eulerian cycle if:

1. It is connected (in undirected graphs, every vertex is reachable; for directed graphs, it is
strongly connected).
2. Every vertex has an even degree (undirected graph) or in-degree equals out-degree (directed
graph).

Necessary and Sufficient Conditions for Eulerian Paths

For an undirected graph:

1. Eulerian Circuit: A graph has a Eulerian circuit if and only if:


 The graph is connected, and
 Every vertex has an even degree.
2. Eulerian Path: A graph has a Eulerian path if and only if:
 The graph is connected, and
 Exactly 0 or 2 vertices have an odd degree.

Hamiltonian Paths and Hamilton Cycles

A Hamiltonian Path is a key concept in graph theory, named after the mathematician Sir William
Rowan Hamilton, who studied such paths in the 19th century. These paths are concerned with visiting
all vertices of a graph exactly once, focusing on vertex traversal rather than edge traversal like in
Eulerian paths.
Definition. A Hamiltonian Path is a path in a graph that:

1. Visits every vertex in the graph exactly once.


2. Does not necessarily return to the starting vertex.

If the Hamiltonian Path is also a cycle (i.e., it starts and ends at the same vertex), it is called a
Hamiltonian Cycle.

Applications of Hamiltonian Paths: Hamiltonian paths have various practical applications, such
as:

1. Traveling Salesperson Problem (TSP): Finding the shortest route to visit a set of cities and
return to the starting point.
2. DNA sequencing: Assembling genetic sequences by visiting all fragments exactly once.
3. Scheduling: Solving problems where tasks must be executed in a specific sequence without
repetition.

Hamiltonian paths are significant because they:

1. Provide insight into the structure of graphs.


2. Help in solving optimization problems where visiting all nodes in a network (or graph) without
repetition is critical.

Unlike Eulerian paths, finding Hamiltonian paths is a more complex problem. In fact, determining
whether a Hamiltonian Path exists in a general graph is an NP-complete problem. This complexity
makes the study of Hamiltonian paths both challenging and valuable for theoretical and applied
research.

Understanding Hamiltonian paths is crucial for solving problems in transportation networks, circuit
design, bioinformatics, and many other fields.

Verifying Hamiltonian Cycles for a Given Graph: To demonstrate that the provided graph lacks
Hamiltonian cycles:

Steps to Verify:

1. Check Vertex Connectivity:


o Ensure every vertex is reachable.
o If vertices lack sufficient connections, a Hamiltonian cycle is impossible.
2. Inspect Potential Cycles:
o Trace paths starting from each vertex, attempting to visit all vertices exactly once and
return to the starting vertex.
3. Analyze Degree of Vertices:
o Low-degree vertices (degree 1 or 2 in large graphs) often indicate the absence of
Hamiltonian cycles.

Key Differences Between Eulerian and Hamiltonian Path

Feature Eulerian Path Hamiltonian Path


Focus Traverses each edge exactly once. Visits each vertex exactly once.
Cycle/Path May form a circuit (Eulerian cycle). May form a cycle (Hamiltonian cycle).
Feature Eulerian Path Hamiltonian Path
Depends on the degrees of vertices No simple necessary and sufficient
Conditions (necessary and sufficient conditions conditions; determined by specific graph
exist). structure.
Example Complete graph 𝐾3 has an Eulerian The complete graph 𝐾𝑛 (for 𝑛 ≥ 2) has a
Graph cycle if all vertices have even degree. Hamiltonian cycle.

Differences Between Eulerian and Hamiltonian Cycles

Eulerian and Hamiltonian cycles are two fundamental concepts in graph theory that describe distinct
ways to traverse a graph. Below is a detailed comparison:

Aspect Eulerian Cycle Hamiltonian Cycle

A closed path that traverses each edge A closed path that visits each vertex of the
Definition of the graph exactly once and returns graph exactly once and returns to the starting
to the starting vertex. vertex.

Focus Focuses on traversing edges. Focuses on visiting vertices.

Every vertex must have an even The graph must contain a Hamiltonian path
Requirements degree, and the graph must be that forms a cycle, but no specific degree
connected. condition applies.

Existence Necessary and sufficient conditions No general sufficient conditions exist;


Condition exist (e.g., Euler's Theorem). determining its existence is NP-complete.

Relatively easy to determine using Computationally difficult; finding


Complexity
degree and connectivity properties. Hamiltonian cycles is NP-complete.

Used in problems involving edge Used in problems involving vertex traversal,


Applicability traversal, such as postal route such as the Traveling Salesman Problem
planning or network connectivity. (TSP).

Vertices can be revisited, but edges


Repetition Vertices cannot be revisited.
cannot.

Graphs representing roads or utility Graphs representing routes where all


Examples networks where all edges are covered destinations (vertices) are visited exactly
without duplication. once.

A graph where each vertex has an A graph forming a closed loop that visits
Illustrative
even degree (e.g., a complete graph every vertex exactly once (e.g., K4K_4K4
Example
K4K_4K4 with all edges used once). with vertices connected in sequence).

Fleury’s Algorithm or Hierholzer’s No efficient algorithm exists for general


Algorithm Algorithm can find Eulerian cycles graphs; heuristic or exhaustive search is
efficiently. often used.
Aspect Eulerian Cycle Hamiltonian Cycle

Works with undirected and directed


Relation to Works with undirected or directed graphs,
graphs, provided edge traversal
Graph Type focusing on vertex traversal.
conditions are met.

Example. Eulerian cycle VS Hamilton cycles

Describe colouring of the graph and its corresponding chromatic number. Determine a proper coloring
for the graph with 𝑉 = {𝑎, 𝑏, 𝑐, 𝑑}, 𝐸 = {(𝑎, 𝑏), (𝑏, 𝑑), (𝑏, 𝑐), (𝑐, 𝑑), (𝑑, 𝑎), (𝑎, 𝑐)}, and compute its
chromatic number. Provide a step-by-step explanation of your approach.
Solution.
Graph Coloring

Graph coloring is a fundamental concept in graph theory that involves assigning colors to the elements
of a graph, typically its vertices, edges, or regions, under certain constraints. The most common form
of graph coloring is vertex coloring, where the goal is to assign colors to the vertices of a graph such
that no two adjacent vertices (connected by an edge) share the same color. This type of coloring is
known as a proper coloring.

Graph coloring is widely used in various fields, including scheduling, register allocation in compilers,
frequency assignment in telecommunications, and solving Sudoku puzzles. The minimum number of
colors required for a proper vertex coloring of a graph is called the chromatic number of the graph,
denoted as 𝜒(𝐺).

Different types of graph coloring include:

1. Vertex Coloring: Coloring the vertices of a graph.


2. Edge Coloring: Assigning colors to edges such that no two adjacent edges share the same
color.
3. Face Coloring: Coloring the regions (faces) of a planar graph.

Graph coloring problems are challenging and often require creative strategies to determine the
chromatic number or to find a proper coloring.

Definition. Let 𝐺 = (𝑉, 𝐸) be a graph, where 𝑉 is the set of vertices and 𝐸 is the set of edges.
Vertex Coloring: A vertex coloring of a graph 𝐺 is a function 𝑓: 𝑉 → 𝐶, where 𝐶 is a set of colors,
such that for every edge (𝑢, 𝑣) ∈ 𝐸, 𝑓(𝑢) ≠ 𝑓(𝑣). In other words, adjacent vertices must have different
colors.

The chromatic number of the graph, denoted by 𝜒(𝐺), is the minimum number of colors required to
achieve a proper vertex coloring.

Edge Coloring: An edge coloring of a graph 𝐺 is a function 𝑔: 𝐸 → 𝐶, where 𝐶 is a set of colors, such
that for any two adjacent edges 𝑒1, 𝑒2 ∈ 𝐸, 𝑔(𝑒1) ≠ 𝑔(𝑒2).

The edge chromatic number, denoted by 𝜒′(𝐺), is the minimum number of colors needed for a proper
edge coloring.

Example.

Properties of Graph Colouring

Graph coloring has several important properties that are useful for analyzing graphs and solving
coloring problems. Here are some of the key properties:

1. Chromatic Number 𝜒(𝐺)): The chromatic number of a graph 𝐺 is the minimum number of
colors required for a proper vertex coloring.

Complete Graph: For a complete graph 𝐾𝑛 , 𝜒(𝐾𝑛 ) = 𝑛, because each vertex is adjacent to all
other vertices.

Bipartite Graph: For a bipartite graph 𝐺, 𝜒(𝐺) = 2, if it contains at least one edge.

2. Cycle Graph:
o If the cycle has an even number of vertices, 𝜒(𝐺) = 2.
o If the cycle has an odd number of vertices, 𝜒(𝐺) = 3.
3. Subgraph Property: If 𝐻 is a subgraph of 𝐺, then 𝜒(𝐻) ≤ 𝜒(𝐺).
This means that the chromatic number of a subgraph cannot exceed that of the original graph.
4. Relation to Maximum Degree (𝛥(𝐺)): For a graph 𝐺, the chromatic number satisfies:

𝜒(𝐺) ≤ 𝛥(𝐺) + 1

5. Acyclic Graphs (Trees): For a tree 𝑇 with 𝑛 vertices, we have the chromatic number is 𝜒(𝑇) =
2 if 𝑛 > 1, and this is because a tree is a bipartite graph.
6. Uniqueness of Coloring: The number of ways to color a graph depends on the graph's structure
and the number of colors available, and for some graphs, the coloring is unique (up to
permutation of colors), while for others, multiple valid coloring may exist.
7. Chromatic Polynomial: The chromatic polynomial 𝑃(𝐺, 𝑘) counts the number of ways to
properly color a graph 𝐺 using 𝑘 colors. It is a polynomial in 𝑘 and provides insights into the
graph's structure.
Example. Graph Description

Vertices: 𝑽 = {𝒂, 𝒃, 𝒄, 𝒅} and Edges: 𝑬 = {(𝒂, 𝒃), (𝒃, 𝒅), (𝒃, 𝒄), (𝒄, 𝒅), (𝒅, 𝒂), (𝒂, 𝒄)}.

This graph represents a complete graph 𝑲𝟒 , meaning every pair of vertices is connected by an
edge.

Step-by-Step Solution

Step 1: Represent the Graph

The graph 𝑮 can be visualized as a triangle with diagonals (a fully connected graph on 4 vertices). Each
vertex is connected to all others:

 Vertex 𝒂 is adjacent to 𝑏, 𝑐, 𝑑
 Vertex 𝒃 is adjacent to 𝑎, 𝑐, 𝑑
 Vertex 𝒄 is adjacent to 𝑎, 𝑏, 𝑑
 Vertex 𝒅 is adjacent to 𝑎, 𝑏, 𝑐

Step 2: Determine the Proper Coloring

We assign colors step by step, ensuring no two adjacent vertices share the same color.

1. Assign color 1 to vertex 𝒂:

𝑪𝒐𝒍𝒐𝒓(𝒂) = 𝟏

2. Assign color 2 to vertex 𝑏: Since 𝒃 is adjacent to 𝒂, it must have a different color:

𝑪𝒐𝒍𝒐𝒓(𝒃) = 𝟐

3. Assign color 3 to vertex 𝑐: Vertex ccc is adjacent to both 𝒂 and 𝒃, so it needs a third color:

𝑪𝒐𝒍𝒐𝒓(𝒄) = 𝟑

4. Assign color 4 to vertex 𝑑: Vertex 𝒅 is adjacent to 𝒂, 𝒃, and 𝒄, requiring a fourth color:

𝑪𝒐𝒍𝒐𝒓(𝒅) = 𝟒

Step 3: Chromatic Number

The chromatic number of the graph is the minimum number of colors used in a proper coloring. Since
all four vertices are mutually connected, the chromatic number is:

𝝌(𝑮) = 𝟒
Explanation of Approach

1. Graph Representation: By visualizing or listing adjacency relations, it is clear that the graph
is complete (𝐾4 ).
2. Color Assignment: Colors were assigned iteratively, ensuring no two adjacent vertices share
the same color.
3. Chromatic Number: Since all vertices are connected to each other, each vertex requires a
unique color.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy