A Simple Graph with vertices and edges consists of a vertex set (or a node set) and an edge set where each edge is an unordered pair of vertices
An edge is also denoted by or
graph LR;
u((u))---|e|v((v))
The vertices contained in an edge are its endpoints (or endnodes or endvertices), and is said to connect and . An edge is said to be incident to its endpoints and . Two vertices that are endpoints of the same edge are said to be adjacent vertices, and two edges that are incident to the same vertex are said to be adjacent edges. Two adjacent vertices are also called neighbouring vertices.
Example
graph LR
v1((v1))
v2((v2))
v3((v3))
v4((v4))
v5((v5))
subgraph 1;
direction LR;
v2---v4
v4---v5
v1---v2
v2---v3
v3---v4
v1---v4
end
V1((v1))
V2((v2))
V3((v3))
V4((v4))
V5((v5))
subgraph 2;
direction RL;
V1---V4
V3---V4
V4---V5
V2---V3
V1---V2
V2---V4
end
Types of Graphs
Simple Graphs are unweighted and undirected. They also contain noloops or parallel edges