














































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In the subject of the Data Structures, the key concept and the main points, which are very important in the context of the data structures are listed below:Graphs and Sets, Data Structure, Vertices, Set of Edges, Vertices, Applications, Schedules, Computer Networks, Circuits, Hypertext
Typology: Slides
1 / 86
This page cannot be seen from the preview
Don't miss anything!















































































What is a graph?
nodes ( vertices ) and a set of edges between the vertices.
among the vertices.
1 2
3 4
Definitions
of nodes and a set of edges that relate the nodes to each other
connection between two nodes in a graph
have no direction
each edge is directed from one vertex to another (or the same) vertex
Formally
G = (V,E)
where
A directed graph
A graph in which each edge is directed from one vertex to another (or the same) vertex
A directed graph
Trees are special cases of graphs!
connects two nodes in a graph
edges in the path.
e.g., a path from 1 to 4
1 2
3 4
<1, 2, 3, 4>
Graph terminology
Graph terminology
Complete graph: A graph in which every vertex
is directly connected to every other vertex
complete directed graph with V vertices?
E=V * (V-1)
Graph terminology (cont.)
or O(V^2 )
A weighted graph
to node x?
from node x?
Adjacency Matrix for Flight Connections
Array-Based Implementation (cont.)
Adjacency List Representation of Graphs
to node x?
from node x?
Link-List-based Implementation (cont.)
O(V) for sparse graphs since E=O(V) O(V^2 ) for dense graphs since E=O(V 2 )