0% found this document useful (0 votes)
15 views8 pages

What is a Graph_

A graph is a mathematical structure consisting of vertices (nodes) and edges (connections) that models pairwise relations between objects. It can be defined as an ordered pair (V, E), where V is a set of vertices and E is a set of edges connecting those vertices. Various types of graphs exist, including directed, undirected, weighted, complete, and bipartite graphs, each serving different applications in real life such as social networks and transportation systems.

Uploaded by

Kajal Patel
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)
15 views8 pages

What is a Graph_

A graph is a mathematical structure consisting of vertices (nodes) and edges (connections) that models pairwise relations between objects. It can be defined as an ordered pair (V, E), where V is a set of vertices and E is a set of edges connecting those vertices. Various types of graphs exist, including directed, undirected, weighted, complete, and bipartite graphs, each serving different applications in real life such as social networks and transportation systems.

Uploaded by

Kajal Patel
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/ 8

What is a Graph?

A graph is a mathematical structure used to model pairwise relations between objects. It


consists of two primary components: vertices (also called nodes) and edges (also called
links).

Graph Structure

Edges
Connections between
Graph vertices

Core structure modeling


relations Vertices
Objects in the graph

Definition of Graph
A graph G can be defined as an ordered pair (V,E) where:

• V is a set of vertices.
• E is a set of edges, where each edge is a pair of vertices from V.

Graph Definition Flowchart

V is a set of
vertices
Define Graph
Start
G Each edge is
E is a set of a pair of
edges vertices from
V

For example, G = (V, E) is a graph such that,


• V = {a, b, c, d, e, f}
• E = {ab, af, bc, cd, de, ef}
This graph can be represented as follows:
Examples in Real Life
Some common real life examples of graphs are:

Graph Applications in Life

Variable Relationships

Social Media Analytics

Financial Context

Data Representation

Visual Simplification

• Social Networks: Vertices represent people, and edges represent friendships.


• Transportation Networks: Vertices represent locations, and edges represent routes or
connections.
• Computer Networks: Vertices represent computers or devices, and edges represent
communication links.

Basic Concepts in Graph Theory


Some of the basic concepts in graph theory are:
• Vertex
• Edge
• Loop
Choose the appropriate element for geometric structure representation

Vertex Edge
Represents a point Connects two
in space points with a line

Let's discuss these concepts in detail as follows:


Vertex or Nodes
A vertex is a point where lines meet in a graph and is denoted by an alphabet. It can also be
called a node or a junction. In graph theory, a vertex is one of the points that the graph is
defined on and can be connected by edges. It is often represented by alphabets, numbers,
or alphanumeric values.
Edge or Links
In mathematics, a line that joins two vertices to form a link in a graph is called an edge. It can
have more than one edge from a single vertex, but it must have a beginning and an ending
vertex in order to exist. An edge can be directed (having a defined path) or undirected
(having no direction), often referred to as a line, branch, link, or arc. It is analogous to having
an undirected edge link two vertices when there are two directed edges between them.
Therefore, in mathematical contexts, edges are essential for joining vertices and creating
connections.
Multiple Edges
In graph theory, multiple edges (also known as parallel edges) refer to two or more edges
that connect the same pair of vertices. Graphs that allow multiple edges between pairs of
vertices are known as multigraphs.
Loop
A loop is a special type of graph where both endpoints of an edge are the same vertices or
when an edge starts from itself and end on itself too, it is called a loop.

Types of Graphs
There are various types of graphs in graph theory, some of these are:
Types of Graphs in Graph Theory

Bipartite Graphs Null Graph


A graph where A graph with no
vertices are edges or vertices
divided into two
sets

Complete Graph Trivial Graph


A graph where A graph with a
every pair of single vertex and
vertices is no edges
connected

Weighted Graphs
Simple Graph
A graph where
A graph with no
edges have
loops or multiple
numerical values
edges

Directed Graph Undirected Graph


A graph where A graph where
edges have a edges have no
direction direction

• Null Graph
• Trivial Graph
• Simple Graph
• Undirected Graph
• Directed Graph
• Weighted Graphs
• Complete Graph
• Bipartite Graphs
Hierarchy of Graph Types

Directed Graph
Edges have a direction
Complete Graph
Every vertex is connected to
Bipartite Graphs every other vertex

Graphs with two distinct sets


of vertices Weighted Graphs
Edges have associated
Simple Graph weights or costs

No loops or multiple edges

Let's discuss these types in detail as follows:


Null Graph
A null graph, also known as an empty graph, is a type of graph in which the vertex
setV is non-empty, but the edge set E is empty.

In other words, a null graph has vertices but no edges connecting any pairs of vertices.
Consider a null graph with three vertices:

Null Graph Structure

Vertex Set V:
Vertices
{A, B, C]
Null Graph
Edge Set E: {]
No Edges
or φ

• Vertex set V: {A, B, C}


• Edge set E: { } or ϕ
Note: Each vertex in a null graph has a degree of zero, since there are no edges
connected to any vertex.

Trivial Graph
A trivial graph is the simplest type of graph, consisting of exactly one vertex and no
edges.
Trivial Graph Structure

Single
No Edges
Vertex

Consider a trivial graph with one vertices:


• Vertex set V: {A}
• Edge set E: { } or ϕ
Simple Graph
A simple graph is a type of graph in which each pair of vertices is connected by at
most one edge, and no vertex has an edge to itself.

Simple Graph Structure

Edges
Connections between
Simple Graph vertices

Basic graph with single edges


and no self-loops Vertices
Nodes in the graph

This means that a simple graph does not contain any loops (edges that connect a vertex to
itself) or multiple edges between the same pair of vertices.
Consider a simple graph with four vertices:
• Vertex set V: {A, B, C, D}
• Edge set E: { {A, B}, {A, C}, {B, D}, {C, D} }

Undirected Graph
An undirected graph is a type of graph in which the edges have no direction.
Types of Graphs

Directed Graph Weighted Graph


Edges have a specific Edges have numerical
direction values assigned

Complete Graph Bipartite Graph


Every node is connected Nodes are divided into
to every other node two sets with
connections only
between sets

Cycle Graph
Nodes form a closed
loop

This means that the relationship between any pair of connected vertices is mutual. In an
undirected graph, the edge (u, v) is identical to the edge (v, u).
Consider an undirected graph with four vertices:
• Vertex set V: {A, B, C, D}
• Edge set E: { {A, B}, {A, C}, {B, D}, {C, D} }
Directed Graph
A directed graph, also known as a digraph, is a type of graph where the edges have a
direction.

In other words, each edge has a starting vertex (source) and an ending vertex (destination),
indicating a one-way relationship between the vertices.
Consider a directed graph with four vertices:
• Vertex set V: {A, B, C, D}
• Edge set E: { (A, B), (A, C), (B, D), (C, D)}
Weighted Graphs
A weighted graph is a type of graph in which each edge is assigned a weight (or cost).

These weights can represent various quantities such as distances, costs, capacities, or any
other metric that quantifies the relationship between vertices.
Consider a weighted graph with four vertices
• Vertex set V: {A, B, C, D}
• Edge set E: { (A, B, 3), (A, C, 5), (B, D, 2), (C, D, 1) }
Complete Graph
If every vertex in a graph G is linked to every other vertex in the graph, then the graph is said
to be complete. Therefore, every graph G has to be linked. Kn represents the whole graph
with n vertices.
Consider a complete graph with four vertices:
• Vertex set V: {A, B, C, D}
• Edge set E: { {A, B}, {A, C}, {A, D}, {B, C}, {B, D}, {C, D} }
Note: Number of Edges in complete graphs with n vertices is n(n - 1)/2.

Bipartite Graphs
A bipartite graph is a type of graph where the vertex set can be divided into two
disjoint sets such that no two vertices within the same set are adjacent.

This means that every edge in a bipartite graph connects a vertex in one set to a vertex in the
other set.
Consider a bipartite graph with vertex sets:
• Vertex sets V1: {A, B}, V2: {C, D}
• Edge set E: { {A, C}, {A, D}, {B, C} }
Cycle Graph
A cycle graph, also known as a circular graph, is a type of graph that forms a single
cycle.

In a cycle graph, each vertex has exactly two neighbors, creating a closed loop.
Consider a cycle graph C4 with four vertices:
• Vertex set V: {A, B, C, D}
• Edge set E: {{A, B}, {B, C}, {C, D}, {D, A} }

You might also like