Graph Theory in Data Structures
Graph Theory in Data Structures
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.
24CS201 Data Structures
Date :20.01.2025
Table of Contents
Contents
Course Objectives
Lecture Plan ([Link], Topic, No. of Periods, Proposed date, Actual Lecture
Date, pertaining CO, Taxonomy level, Mode of Delivery)
Lecture Notes ( with Links to Videos, e-book reference, PPTs, Quiz and any
other learning materials )
Course Objectives:
To understand the concepts of List ADT.
To learn linear data structures – stacks and queues ADTs.
To understand and apply Tree data structures.
To understand and apply Graph structures.
To analyze sorting, searching and hashing algorithms.
Pre Requisites (Course Names with Code)
List of Exercise/Experiments:
1. Array implementation of List ADTs.
2. Linked list implementation of List ADTs.
UNIT II - LINEAR DATA STRUCTURES – STACKS, QUEUES 9+9
Stack ADT – Stack Model - Implementations: Array and Linked list – Applications
Balancing symbols - Evaluating arithmetic expressions - Conversion of Infix to postfix
expression- Queue ADT – Queue Model - Implementations: Array and Linked list -
applications of queues - Priority Queues – Binary Heap – Applications of Priority
Queues.
List of Exercise/Experiments:
1. Applications of Stack – Infix to postfix conversion and expression evaluation.
2. Linked list implementation of Stack and Queue ADTs.
3. Application of List – Polynomial Manipulation
Application of Stack – Infix to postfix conversion and expression evaluation
List of Exercise/Experiments:
10
Course Outcomes
C203.1 K3 3 2 1
C203.2 K3 3 2 1
C203.3 K3 3 2 1
C203.4 K3 3 2 1
C203.5 K3 3 2 1
12
Lecture Plan
Unit IV
Unit IV
15
8. ACTIVITY BASED LEARNING : UNIT – IV
Across
3. representation of graph
6. shortest path
7. path from one vertex to another
8. uses queue
[Link] spanning tree
[Link] in a graph
Down
1. no cycles
2. vertices and edges
4. an ordering of vertices
5. visit a vertex exactly once
6. uses stack
16
Lecture Notes
4.1 INTRODUCTION
9. LECTURE NOTES : UNIT – IV
GRAPHS
Definition
A graph G=(V,E) consists of a set of vertices V and a set of edges, E.
Each edge is a pair(u,v) where u,v ε V
• Edges are sometimes referred to as arcs
• Vertices are referred as nodes
Fig 4:1
Types of graphs
Fig 4:2
9. LECTURE NOTES : UNIT – IV
Undirected Graph
Fig 4:3
Weighted Graph
• There is another component that is associated with edge, which is known as
weight or cost.
• A graph is said to be weighted graph if every edge in the graph is assigned a
weight or cost. The weight can be assigned both the directed and undirected
graph.
20
9. LECTURE NOTES : UNIT – IV
Path
Fig 4:6
Length
Length of the path is the number of edges on the path, which is equal to
N-1,where N is the number of vertices.
Fig 4:7
When there is a path from a vertex to itself and if the path contains no edge, then
the path length is ‘0’.
21
9. LECTURE NOTES : UNIT – IV
Loop
If the graph contains an edge (u,v) from a vertex to itself, then the path
u,v is referred to as a loop. In Fig 4.7.1 Vertices a has the loop to itself.
Fig 4:7:1
Simple Path
Simple path is a path such that all vertices are distinct, expect that the
first and last could be same.
Cycle
A cycle in a directed graph is a path in which first and last vertex are the
same.
Cyclic Graph
A graph which has cycles is referred to as cyclic graph.
Fig 4:8
22
9. LECTURE NOTES : UNIT – IV
Acyclic Graph
A directed graph is acyclic if it has no cycles. A directed acyclic graph is
sometimes referred as DAG
Fig 4:9
Complete Graph
A complete graph is a graph in which there is an edge between every pair
of vertices. A complete graph with n vertices will have n(n-1)/2 edges.
Fig 4:10
23
9. LECTURE NOTES : UNIT – IV
Fig 4:11
Fig 4:12
24
9. LECTURE NOTES : UNIT – IV
Degree
The number of edges incident on a vertex determines its degree.
Indegree
Indegree of the vertex ‘V’ is the number of edges entering into the vertex
V.
Outdegree
Outdegree of the vertex ‘V’ is the number of edges exiting from that
vertex V.
Indegree(V)=1
Outdegree(V)=2
Fig 4:13
Sink Node
A node that does not have any outgoing edges (i.e.) only indegree and
outdegree will be 0.
Source Node
A node that does not have any incoming edges (i.e.) only outdegree and
indegree will be 0.
25
9. LECTURE NOTES : UNIT – IV
Representation of Graph
Graph can be represented in two ways
1. Adjacency Matrix
2. Adjacency List
Adjacency Matrix
• One simple way to represent a graph is to use a 2-D array. This is Known as
adjacency matrix representation.
• The adjacency matrix A for a graph G=(V,E) with n vertices is a nxn matrix,such
that Aij=1 if there is an edge between Vi and Vj
Aij=0 if there is no edge.
Example : Adjacency matrix for directed graph.
V1 V2
V3 V4 V5
V6 V7 Fig 4:14
20
9. LECTURE NOTES : UNIT – IV
• If the edge has a weight associated with it, then we can set Aij equal to the
weight.
27
9. LECTURE NOTES : UNIT – IV
• DFS works by selecting one vertex V of G as a start vertex, process V and then
recursively traverse all vertices adjacent to V.
the stack.
Example :
Fig 4:16
28
9. LECTURE NOTES : UNIT – IV
DFS O/P :A
Adjacent vertex to ‘A’ are ‘B’ and ‘C’
2. Consider the next unvisited vertex which is B and visit it.
DFS O/P:AB
Adjacent vertex to ‘B’ are ‘A’,’D’ and ‘E’
3. But the next unvisited vertex is ‘D’ so visit it
DFS O/P:ABD
Adjacent vertex to ‘D’ are ‘B’,’E’ AND ‘F’
29
9. LECTURE NOTES : UNIT – IV
DFS O/P: A B D E
Adjacent vertex to ‘E’ are ‘B’,’C’,’D’ AND ‘F’
5. But the next unvisited vertex is ‘C’ so visit it
DFS O/P A B D E C
Adjacent vertex to ‘C’ are ‘A’, and ‘E’
6. But both the vertex are already visited, so pop the vertices from the stack to find
a vertex which has an unvisited vertex. Pop ‘C’-All adjacent vertex visited.
Pop ‘E’-Adjacent vertex ‘F’ not visited so visit it
DFS O/P A B D E C F
30
9. LECTURE NOTES : UNIT – IV
Void DFS(Vertex V)
{
visited[ v ]=True;
for each w adjacent to v
if(! Visited[ w ])
DFS(w);
}
Rule 1:
Visit the adjacent unvisited vertex. Mark it as visited. Display it. Insert it in a
Queue.
Rule 2:
If no adjacent vertex is found, remove the first vertex from the Queue.
Rule 3:
31
9. LECTURE NOTES : UNIT – IV
Fig 4:17
32
9. LECTURE NOTES : UNIT – IV
BFS O/P : A
Adjacent vertex to ‘A’ are ‘B’ and ‘C’
2. Remove ‘A’ from queue. Visit the adjacent vertex ‘B’ and ‘C’ and insert in the
queue.
3. The unvisited vertex are ‘D’ and ‘E’ ,Visit it and insert in the queue.
33
9. LECTURE NOTES : UNIT – IV
4. ‘A’ and ‘E’ are already visited. So remove ‘D’ from Queue.
BFS O/P : A B C D
Adjacent vertex to ‘D’ are ‘B’,’E’ and ‘F’.
5. ‘B’ and ‘E’ are already visited. Visit F and insert to Queue.
BFS O/P : A B C D E F
34
9. LECTURE NOTES : UNIT – IV
A Breadth First traversal visits all successors of visited node before visiting
any successors of it.
void bfs(vertex V)
{
vertex w , v;
Enqueue(v);
while(!isempty(Queue))
{
v=Dequeue();
if(!visited[v])
cout<<v;
visited[v]=TRUE;
for each w adjacent to v
if(visited[w]==FALSE)
{
cout<<w;
visited[w]=TRUE
Enqueue(w);
}
}
}
35
9. LECTURE NOTES : UNIT – IV
Topological Sort
In computer science, a topological sort or topological ordering of a directed
graph is a linear ordering of its vertices such that for every directed edge (u,v)
from vertex u to vertex v, u comes before v in the ordering. For instance, the
vertices of the graph may represent tasks to be performed, and the edges may
represent constraints that one task must be performed before another.
Topological sorting of vertices of a Directed Acyclic Graph is an ordering of
the vertices v1,v2,v3….vn in such a way that if there is an edge directed towards
vertex vj , from vertex vi then vi comes before vj. For example consider the graph
given below:
In order to have a topological sorting the graph must not contain any cycles.
Topological sorting can be achieved for only directed and acyclic graphs.
36
Algorithm :
Then all the vertices of indegree 0 are placed on an initially empty queue.
While the queue is not empty, a vertex ‘v’ have the indegrees decremented.
The topological ordering then is the order in which the vertices dequeued.
Another Example:
Fig 4:18
39
9. LECTURE NOTES : UNIT – IV
BICONNECTIVITY :
A connected undirected graph is biconnective if there are no vertices whose
removal disconnects the rest of the graph. A biconnected undirected graph is
a connected graph that is not broken into disconnected pieces by deleting
any single vertex (and its incident edges). A biconnected directed graph is
one such that for any two vertices v and w there are two directed paths from
v to w which have no vertices in common other than v and w. If a is not bi-
connected, the vertices whose removal would disconnect the graph is called
articulation points.
ALGORITHM
void AssignNum(Vertex V)
{
Vertex W;
int counter = 0;
Num[V] = ++counter;
visited[V] = True;
for each W adjacent to V if(!visited[W])
{
parent[W] = V;
AssignNum(W);
}
}
9. LECTURE NOTES : UNIT – IV
EULER CIRCUIT
EULERIAN PATH
An Eulerian path in an undirected graph is a path that uses each edge exactly
once. If such a path exists, the graph is called traversable or semi- eulerian.
EULERIAN CIRCUIT
An Eulerian circuit or Euler tour in an undirected graph is a cycle that
uses each edge exactly once. If such a cycle exists, the graph is called Unicursal
or Eulerian While such graphs are Eulerian graphs, not every Eulerian graph
possesses an Eulerian cycle.
EULER'S THEOREM
Euler's theorem 1
If a graph has any vertex of odd degree then it cannot have an Euler circuit. If a
graph is connected and every vertex is of even degree, then it at least
has one Euler circuit.
Euler's theorem 2
If a graph has more than two vertices of odd degree then it cannot have an Euler
path.
If a graph is connected and has just two vertices of odd degree, then it at
least has one Euler path. Any such path must start at one of the odd- vertices and
end at the other odd vertex.
ALGORITHM
Fleury's Algorithm for finding an Euler Circuit
[Link] to make sure that the graph is connected and all vertices
are of even degree
[Link] at any vertex
[Link] through an edge: 0 If it is not a bridge for the untraveled part,
or 0 there is no other alternative
4. Label the edges in the order in which you travel them.
5. When you cannot travel any more, stop.
9. LECTURE NOTES : UNIT – IV
Fleury's Algorithm
pick any vertex to start.
From that vertex pick an edge to traverse.
Darken that edge, as a reminder that you can't traverse it again.
Travel that edge, coming to the next vertex.
Repeat 2-4 until all edges have been traversed, and you are back at the starting
vertex . At each stage of the algorithm: the original graph minus the darkened
(already used) edges = reduced graph
important rule: never cross a bridge of the reduced graph unless there
is no other choice
Note:
The same algorithm works for Euler paths
before starting, use Euler's theorems to check that the graph has an
Euler path and/or circuit to find.
APPLICATION
Eulerian paths are being used in bioinformatics to reconstruct the DNA
SEQUENCE from its fragments.
9. LECTURE NOTES : UNIT – IV
Application of Graphs
The weight of a spanning tree is the sum of weights given to each edge of
the spanning tree. How many edges does a minimum spanning tree has?
The graph contains 9 vertices and 14 edges. So, the minimum spanning tree formed
will be having (9
– 1) = 8 edges.
After sorting: Weight Src Dest
1 7 6
2 8 2
2 6 5
4 0 1
4 2 5
6 8 6
7 2 3
7 7 8
8 0 7
8 1 2
9 3 4
10 5 4
11 1 7
14 3 5
9. LECTURE NOTES : UNIT – IV
Now pick all edges one by one from sorted list of edges
Pick edge 7-6: No cycle is formed, include it.
Pick edge 8-6: Since including this edge results in cycle, discard it.
Pick edge 2-3: No cycle is formed, include it.
Pick edge 7-8: Since including this edge results in cycle, discard it.
Pick edge 0-7: No cycle is formed, include it
9. LECTURE NOTES : UNIT – IV
Pick edge 1-2: Since including this edge results in cycle, discard it.
Pick edge 3-4: No cycle is formed, include it.
Since the number of edges included equals (V – 1), the algorithm stops here.
Prim’s Algorithm:
The idea behind Prim’s algorithm is simple, a spanning tree means all vertices must
be connected. So the two disjoint subsets (discussed above) of vertices must be
connected to make a Spanning Tree. And they must be connected with the
minimum weight edge to make it a Minimum Spanning Tree
Algorithm
1) Create a set mstSet that keeps track of vertices already included in MST.
2)Assign a key value to all vertices in the input graph. Initialize all key values as
INFINITE. Assign key value as 0 for the first vertex so that it is picked first.
3) While mstSet doesn’t include all vertices
….a) Pick a vertex u which is not there in mstSet and has minimum key value.
….b) Include u to mstSet.
….c) Update key value of all adjacent vertices of u.
9. LECTURE NOTES : UNIT – IV
To update the key values, iterate through all adjacent vertices. For every adjacent
vertex v, if weight of edge u-v is less than the previous key value of v, update the
key value as weight of u-v The idea of using key values is to pick the minimum
weight edge from cut. The key values are used only for vertices which are not yet
included in MST, the key value for these vertices indicate the minimum weight
edges connecting them to the set of vertices included in MST.
Let us understand with the following example:
The set mstSet is initially empty and keys assigned to vertices are {0, INF, INF, INF,
INF, INF, INF, INF} where INF indicates infinite. Now pick the vertex with the
minimum key value. The vertex 0 is picked , include it in mstSet. So mstSet
becomes {0}. After including to mstSet, update key values of adjacent vertices.
Adjacent vertices of 0 are 1 and 7. The key values of 1 and 7 are updated as 4
and 8. Following subgraph shows vertices and their key values, only the vertices
with finite key values are shown.
The vertices included in MST are shown in green color.
9. LECTURE NOTES : UNIT – IV
Pick the vertex with minimum key value and not already included in MST (not in
mstSET). The vertex 1 is picked and added to mstSet. So mstSet now becomes
{0, 1}. Update the key values of adjacent vertices of 1. The key value of vertex 2
becomes 8.
Pick the vertex with minimum key value and not already included in MST (not in
mstSET). We can either pick vertex 7 or vertex 2, let vertex 7 is picked. So mstSet
now becomes {0, 1, 7}. Update the key values of adjacent vertices of 7. The key
value of vertex 6 and 8 becomes finite (1 and 7 respectively).
Pick the vertex with minimum key value and not already included in MST (not in
mstSET). Vertex 6 is picked. So mstSet now becomes {0, 1, 7, 6}. Update the key
values of adjacent vertices of 6. The key value of vertex 5 and 8 are updated.
9. LECTURE NOTES : UNIT – IV
We repeat the above steps until mstSet includes all vertices of given graph.
Finally, we get the following graph.
The following table shows the step by step procedure of finding the
minimum spanning tree.
STEP 1 STEP 2
Vertex Visit Cost Path Vertex Visit Cost Path
0 ** T 0 - 0 T 0 -
1 F INF - 1 ** T 4 0
2 F INF - 2 F INF -
3 F INF - 3 F INF -
4 F INF - 4 F INF -
5 F INF - 5 F INF -
6 F INF - 6 F INF -
7 F INF - 7 F 8 -
8 F INF - 8 F INF -
9. LECTURE NOTES : UNIT – IV
STEP 3 STEP 4
Vertex Visit Cost Path Vertex Visit Cost Path
0 T 0 - 0 T 0 -
1 T 4 0 1 T 4 0
2 F 8 1 2 F 8 1
3 F INF - 3 F INF -
4 F INF - 4 F INF -
5 F INF - 5 F INF -
6 F INF - 6 ** T 1 7
7 ** T 8 0 7 T 8 0
8 F INF - 8 F 7 7
STEP 5 STEP 6
Vertex Visit Cost Path Vertex Visit Cost Path
0 T 0 - 0 T 0 -
1 T 4 0 1 T 4 0
2 F 8 1 2 ** T 4 5
3 F INF - 3 F 14 5
4 F INF - 4 F 10 5
5 ** T 2 6 5 T 2 6
6 T 1 7 6 T 1 7
7 T 8 0 7 T 8 0
8 F 6 6 8 F 6 6
9. LECTURE NOTES : UNIT – IV
STEP 7 STEP 8
Vertex Visit Cost Path Vertex Visit Cost Path
0 T 0 - 0 T 0 -
1 T 4 0 1 T 4 0
2 T 4 5 2 T 4 5
3 F 7 2 3 ** T 7 2
4 F 10 5 4 F 10 5
5 T 2 6 5 T 2 6
6 T 1 7 6 T 1 7
7 T 8 0 7 T 8 0
8 ** T 2 2 8 T 2 2
STEP 9
Animation Videos
Graph Traversal
Minimum Spanning Tree Shortest path Algorithms
Topological Sort Topological DFS
Quiz Link
Graph Quiz
10. ASSIGNMENTS : UNIT – IV
1. Graph Representation
You are given an undirected graph with the following edges:
(A, B), (A, C), (B, D), (C, D), (C, E)
Represent the graph using:
• Adjacency Matrix
• Adjacency List
Perform a topological sort on the graph using Kahn’s Algorithm (BFS-based approach)
or DFS-based approach.
Show the order of vertices as produced by the topological sort
Part A
Question & Answer
11. PART A : Q & A : UNIT – IV
52
11. PART A : Q & A : UNIT – IV
61
11. PART A : Q & A : UNIT – IV
62
11. PART A : Q & A : UNIT – IV
63
12. PART B QUESTIONS : UNIT – IV
(CO3, K2 / K3)
1. Apply an appropriate algorithm to find the shortest path from the node ‘A’ to
every other nodes in the given graph. (13)
4. Distinguish between breadth first search and depth first search with suitable
example. (13)
5. State and explain topological sorting with an example. (10)
6. With necessary diagram discuss the different ways of representing a graph. (7)
7. Explain how to find the articulation points? Give example. List out the
articulation points in the example using appropriate algorithm.
8. List out the methods to calculate minimum spanning tree. Explain any one
method with example.
9. Apply prim’s algorithm for the following graph and find out the minimum
spanning tree and its cost.
57
13. SUPPORTIVE ONLINE CERTIFICATION COURSES
UNITS : I TO V
COURSERA
DATA STRUCTURES
DATA STRUCTURES AND ALGORITHMS
DATA STRUCTURES AND PERFORMANCE
PYTHON DATA STRUCTURES
UDEMY
LEARNING DATA STRUCTURES IN C PROGRAMMING LANGUAGE
DATA STRUCTURES IN C LANGUAGE
NPTEL
PROGRAMMING, DATA STRUCTURES AND ALGORITHM USING PYTHON
65
14. REAL TIME APPLICATIONS : UNIT - IV
1. Facebook: Each user is represented as a vertex and two people are friends when
there is an edge between two vertices. Similarly friend suggestion also uses
graph theory concept.
2. Google Maps: Various locations are represented as vertices and the roads are
represented as edges and graph theory is used to find shortest path between
two nodes.
3. Recommendations on e-commerce websites: The “Recommendations for you”
section on various e-commerce websites uses graph theory to recommend items
of similar type to user’s choice.
4. Graph theory is also used to study molecules in chemistry and physics.
5. Lots of people look at stock market graphs on a daily basis, for one example. A
weather 'map' can graph of temperature data (or precipitation data), where
colors represent certain levels of the data
6. Graph is powerful and versatile data structure that easily allow to you represent
real life relationships between different type of data nodes.
66
14. REAL TIME APPLICATIONS : UNIT - IV
Social Graphs
Social graphs draw edges between you and the people, places and things you
interact with online
Facebook's Graph API is perhaps the best example of application of graphs to real
life problems. The Graph API is a revolution in large-scale data provision
On The Graph API, everything is a vertice or node. This are entities such as
Users, Pages, Places, Groups, Comments, Photos, Photo Albums, Stories, Videos,
Notes, Events and so forth. Anything that has properties that store data is a
vertice.
67
14. REAL TIME APPLICATIONS : UNIT - IV
The Graph API uses this collections of vertices and edges (essentially graph data
structures) to store its data. The Graph API is also a GraphQL API. This is the
language it uses to build and query the schema.
The Graph API has come into some problems because of it's ability to obtain
unusually rich info about user's friends.
Knowledge Graphs
Google's Knowledge Graph
A knowledge graph has something to do with linking data and graphs...some kind
of graph-based representation of knowledge. It still isn't what is can and can't do
yet.
[Link]
Recommendation Engines
Yelp's Local Graph
Yelps has been slowly phasing out their old Fusion API for a GraphQL API.
The Local Graph API promises to make it easier for developers to integrate Yelp's
data and share great local businesses through their apps
68
14. REAL TIME APPLICATIONS : UNIT - IV
69
14. REAL TIME APPLICATIONS : UNIT - IV
Google Maps and Routes APIs are classic Shortest Path APIs. This a graph
problem that's very easy to solve with edge-weighted directed graphs (digraphs).
The idea of a Map API is to find the shortest path from one vertex to every
other as in a single source shortest path variant, from your current location to
every other destination you might be interested in going to on the map.
The idea of by contrast Routing API to find the shortest path from one
vertex to another as in a source sink shortest path variant, from s to t.
Shortest Path APIs are typically directed graphs. The underlying data structures
and graphy too.
Flight Networks
For flight networks, efficient route optimizations perfectly fit graph data
strutures. Using graph models, airport procedures can be modeled and
optimized efficiently.
Computing best connections in flight networks is a key application of algorithm
engineering.
In flight network, graph data strutures are used to compute shortest paths and
fuel usage in route planning, often in a multi-modal context.
The vertices in flight networks are places of departure and destination,
airports, aircrafts, cargo weights.
The flight trajectories between airports are the edges. Turns out it's very
feasible to fit graph data strutures in route optimizations because of precompiled
full distance tables between all airports.
Entities such as flights can have properties such as fuel usage, crew pairing which
can themselves be more graphs.
GPS Navigations Systems
70
14. REAL TIME APPLICATIONS : UNIT - IV
The origin of graph theory was in the times of Euler. He first used graph theory as
a method to solve the koinsberg bridge problem.
The problem is given seven bridges, is it possible to cross through all the bridges
such that you cross through a bridge only once.
He solved the problem by modelling each ladmass as a vertex and a bridge between
them as an edge. He noted that while crossing a bridge you leave one land mass
and come on to another and therefore if you have to enter and exit a landmass such
that you don't repeat the bridge then the number of bridges connecting that
landmass should be even.
In the above problem every vertex had odd number of edges therefore it was
impossible to have a walk such that every bridge is touched upon only once.
71
14. REAL TIME APPLICATIONS : UNIT - IV
72
15. CONTENTS BEYOND SYLLABUS : UNIT – IV
• The all pair shortest path algorithm is also known as Floyd-Warshall algorithm is
used to find all pair shortest path problem from a given weighted graph. As a
result of this algorithm, it will generate a matrix, which will represent the
minimum distance from any node to all other nodes in the graph.
• At first the output matrix is same as given cost matrix of the graph. After that the
output matrix will be updated with all vertices k as the intermediate vertex.
• The time complexity of this algorithm is O(V3), here V is the number of vertices in
the graph.
73
16. ASSESSMENT SCHEDULE
Name of the
[Link] Start Date End Date Portion
Assessment
UNIT 5 , 1 &
5 Revision 1
2
74
Supportive Online
Certification
Unit IV
Certification Courses
1. Coursera Courses:
[Link]
gl5Ni?utm_source=gg&utm_medium=sem&utm_campaign=B2C_INDIA_google-it-
automation_FTCOF_professional-certificates_arte-re-PMAX_non-
nrl_after14D&utm_content=B2C&campaignid=19201532531&adgroupid=&device
=c&keyword=&matchtype=&network=x&devicemodel=&adpostion=&creativeid=
&hide_mobile_promo&gclid=EAIaIQobChMIpbrK3NHs_gIVmbKWCh1DGwynEAAYA
iAAEgJLKPD_BwE
2. Udemy Courses:
[Link]
[Link]
5139210584/
Prescribed Text book &
References
Unit IV
Text books & References
TEXT BOOKS:
Mark Allen Weiss, “Data Structures and Algorithm Analysis in C++”, 4th Edition,
Pearson Education, 2014.
Sartaj Sahni, “Data Structures, Algorithms and Applications in C++”, Silicon paper
publications, 2004.
REFERENCES:
Rajesh K. Shukla, “Data Structures using C and C++”, Wiley India Publications, 2009.
Narasimha Karumanchi, “Data Structure and Algorithmic Thinking with Python: Data
Structure and Algorithmic Puzzles”, CareerMonk Publications, 2020.
Jean-Paul Tremblay and Paul Sorenson, “An Introduction to Data Structures with
Application”, McGraw-Hill, 2017.
Mark Allen Weiss, “Data Structures and Algorithm Analysis in Java”, Third Edition,
Pearson Education, 2012.
Ellis Horowitz, Sartaj Sahni, Susan Anderson-Freed, “Fundamentals of Data Structures
in C”, Second Edition, University Press, 2008.
Ellis Horowitz, Sartaj Sahni, Dinesh P Mehta, “Fundamentals of Data Structures
in C++”, Second Edition, Silicon Press, 2007.
[Link]
toc/lex_auth_01350157816505139210584/overview
Mini Project Suggestions
Unit IV
Mini Project Suggestions
1. Graph Coloring Problem
Implement a solution to the graph coloring problem where the objective is to color the
graph in such a way that no two adjacent nodes have the same color, often used in
scheduling problems.
• Represent a graph and its edges
• Implement a graph coloring algorithm (e.g., greedy coloring).
• Display the graph with the assigned colors.
• Handle edge cases such as large graphs or complex connections.
Disclaimer:
This document is confidential and intended solely for the educational purpose of RMK Group of
Educational Institutions. If you have received this document through email in error, please notify the
system manager. This document contains proprietary information and is intended only to the
respective group / learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender immediately by e-mail if you
have received this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.