What is Graph ?
What is Graph?
A linear graph or a graph G is equal to (V , E), consisting
of a set of objects called Vertices V={V1, V2, V3, … Vn} and another set called
Edges E={E1, E2, E3, … En}.
A graph, in the context of computer science and mathematics,
is a data structure that consists of a set of nodes (also called vertices) and
a set of edges connecting these nodes.
The most common representation of graph is by means of the
diagram, in which, the vertices are represented as points and each edge as a
line segment joining its ‘n’ vertices.
Components :
1.
Node (Vertex): Nodes are individual points or
entities within a graph. Each node can represent an object or a piece of data.
2.
Edge: Edges are the connections or relationships
between nodes in a graph. An edge connects two nodes and can be directed (with
a specific direction from one node to another) or undirected.
3.
Self-Loop:
a.
A self-loop is an edge in a graph that connects
a vertex to itself. In other words, it's an edge that starts and ends at the
same vertex.
b.
Self-loops are often used to represent a
relationship or connection of a vertex with itself, such as in situations where
self-referencing is meaningful.
4.
Parallel Edges:
a.
Parallel edges are multiple edges between the
same pair of vertices in a graph. In other words, there are multiple
connections or relationships between the same two nodes.
b.
Parallel edges are sometimes used to represent
multiple interactions or associations between two entities, each having its
distinct characteristics or weight.
Types of Graphs :
1.
Directed Graph (Digraph): In a directed graph,
the edges have a direction, indicating a one-way relationship from one node to
another. They are often represented with arrows.
2.
Undirected Graph: In an undirected graph, the edges
have no direction, indicating a mutual relationship between nodes. The
relationship is symmetric.
3.
Weighted Graph: In some graphs, each edge may
have a weight or a numerical value associated with it. Weighted graphs are used
to represent situations where there are costs, distances, or values associated
with the connections between nodes.
4.
Connected Graph: A graph is considered connected
if there is a path between every pair of nodes. In other words, there are no
isolated components.
5.
Simple Graph: A simple graph is a graph that
does not have self-loops or parallel edges. In a simple graph, each edge
connects two distinct vertices, and there is at most one edge between any pair
of vertices.
a.
Simple graphs are often used in basic graph
theory and are the most common type of graph.
6.
Zero-Simplex Graph: A zero-simplex graph is the
simplest type of graph possible in graph theory. It consists of a single vertex
(0-dimensional simplex) with no edges.
a.
mathematical terms, it is often represented as
G = (V, E), where V is the set of vertices (containing only one vertex) and E
is the set of edges (containing no edges).
7.
Linear Complex Graph: It's a graph with edges
that appear to intersect but do not create intersection points because they
exist in different planes.
Different Names
Vertices |
Edges |
Points |
Links |
Nodal Points |
Connections |
Junctions |
Arcs |
Stations |
Ties |
Cities |
Paths |
Hubs |
Lines |
Characters |
Roads |
Entities |
Transactions |
Nodes |
Friendships |