You are on page 1of 21

1) Define graph with notation.

Definition:
 An (undirected) graph G is defined by two finite sets, there exist a non-
void set X of elements called vertices, a set E (which can be empty) of
elements called edges.
 For each edge “e”, there are two associated vertices, x and y, distinct or
not, called the endvertices of e.

(A vertex of a graph is the fundamental unit of which graphs are formed. They
are also called nodes and appear as points when drawn. An edge is an object
that connects or links two vertices of a graph)

Notation:
We write G = (X, E). The sets X and E can be denoted by X(G) and E(G).
 The cardinality of X, that is the number of vertices, is usually denoted by n
or nG.
 The cardinality of E, that is, the number of edges, is denoted by m or m G.
 The pair of endvertices of an edge e is simply denoted by xy (or yx), when
x≠y

Representation:
 A graph and its representation.
 The vertices are represented by dots and the edges by simple lines
connecting two endvertices.
 Edge a is associated with the endvertices x and z.
 Edge b is also associated x and z.
 Edge c is associated with x and y.
 Edge d is associated with z and y.
 Finally, edge e is associated twice with the vertex y (this is the case for a
loop)

2) Isomorphism and its conditions


A graph can exist in different forms having the same number of vertices, edges,
and also the same edge connectivity. Such graphs are called isomorphic graphs.
The graphs G and H are said to be isomorphic if they satisfy following conditions:
i) Same number of vertices
ii) Same number of edges
iii) Same degree of vertices

3) Path, Cycle, Trail, Circuit

Walk Every sequence of edges is a walk. 

Open Walk If a walk has different start and end vertex. (Start≠End)

Closed Walk If a walk has same start and end vertex. (Start=End)

Trail If edges can’t repeat, the walk is a trail. 

Circuit A closed trail is a circuit.

Path If vertices can’t repeat, the walk is a path.

Cycle A closed path is a cycle.

Note: Walks, paths, trails, circuits and cycles do not need to use every edge or every
vertex in the graph.
4) Planner Graph
A graph G= (V, E) is said to be planar if it can be drawn in the plane so that no
two edges of G intersect at a point other than a vertex. Such a drawing of a
planar graph is called a planar embedding of the graph.

5) Bipartite Graph
 A graph G = (V, E) is said to be a bipartite graph if its vertex set V(G) can
be partitioned into two non-empty disjoint subsets.
 V1(G) and V2(G) in such a way that each edge e of E(G) has one end in
V1(G) and another end in V2(G).
 The partition V1 U V2 = V is called Bipartite of G.
 Example: Here in the figure: V1(G)={V5, V4, V3} and V2(G)={V1, V2} 

6) Degree
Prove

• Proof. When adding up the vertex degrees of G, each edge is counted twice,
once for each end. The result is thus twice the number of edges of the graph.

7) Cut Vertex
A single vertex whose removal disconnects a graph is called a cut-vertex.
8) Define Tree. Also write down its properties.
 A tree is a connected acyclic graph, where acyclic means without a cycle.
 A tree is a simple graph (a loop or a double edge would define a cycle).
 In general, n denotes the number of vertices of a tree and m the number
of edges.

Properties of a Tree
 A tree such that n ≥2 has at least two vertices of degree one.
 If G is a tree then m = n−1.
 In a tree any two vertices are connected by a unique path.

*Proof of m=n-1
Apply inductive reasoning to n.
For n = 1, we have m = 0 since an edge could only be a loop, i.e. a cycle, which
is impossible for a tree.
Assume n > 1.
Since there is a vertex of degree one in G, given x.
The subgraph G − x is connected since suppressing a vertex of degree one in a
connected graph does not suppress the connectedness property, as is easily
verified.
In addition, G−x is acyclic because a cycle in G − x would also be a cycle of G,
while G, as a tree, is itself acyclic.
Thus G = G − x is a tree and it is possible to apply the induction hypothesis,
which gives:
mG = nG − 1.
As mG = mG − 1 and nG = nG − 1,
we can deduce the desired equality:
mG = nG − 1.

Tree Characteristics
The following conditions for a graph G are equivalent:
 G is a tree.
 G is connected and m = n−1.
 G is acyclic and m = n−1.
 G is connected and every edge is a bridge.
 In G any two given vertices are linked by a unique path.

9) Cut Edge (Bridge)

A cut- Edge or bridge is a single edge whose removal disconnects a graph.


Let G be a connected graph. An edge e of G is called a cut edge of G, if G-e
(Remove e from G) results a disconnected graph.

edge (c, e) is a cut-edge

10)Block decomposition
A block of a graph G is a maximal induced connected subgraph without a cut
vertex (of itself as a graph).
11)K-Connectivity
the minimum number of vertices whose removal makes G disconnects or
reduces to a trivial graph. It is denoted by K(G).

K(G)=1

K(G1)=1, K(G2)=2, K(G3)=3


 The first one can be disconnected by the deletion of a vertex, x, which is a
cut vertex of the graph.
 The 2nd one can be disconnected by the deletion of two vertices, x and y
 The third graph has no set of vertices by which deletion would disconnect
it. the only thing that can be done to it by deleting some vertices is to
reduce it to a single vertex (remember that a graph has by definition at
least one vertex).

12)Edge Connectivity
The edge connectivity of a connected graph G is the minimum number of edges
whose removal makes G disconnected. It is denoted by K’(G).
K’(G1)=1, K’(G2)=2, K’(G3)=3

In this graph, K’(G)=2.

Here are the following four ways to disconnect the graph by removing two edges:
CHAPTER 3

13) Edge Chromatic Number q(G)


The edge chromatic number of a graph G is the lowest integer k such that a k-
coloring of G exists. This integer is denoted by q(G). For example, the chromatic
index of the graph shown in Figure is 4

A k-edge-coloring of a graph (set of colors: {α, β, γ, δ})

CHAPTER 4

14) Directed Graph & notation

Definition: A directed graph, abbreviated to digraph, G, is defined by two finite


sets:
 a non-empty set X of vertices and
 a set A of arcs, or directed edges,
 with an ordered pair (x, y) of vertices which are the endvertices of a,
associated with each arc.
 Vertex y is called the head and vertex x is called the tail.

Notation:
 We write G = (X, A). Sets X and A may also be denoted by X(G) and A(G).
 As in the undirected case, the notations nG or n for the number of vertices
and mG or m for the number of arcs.
 Vertex y is called a successor of x and vertex x is called a predecessor of
y.
Representation:
 Digraphs are drawn in a plane as graphs, with simply an arrow indicating its
orientation on each arc line, the arrow going from x to y if the ordered pair (x, y)
is associated with it.
 A digraph:
o the arc a is associated with the ordered pair (x, z),
o b with the ordered pair (z, x),
o c with the ordered pair (x, y),
o d with the ordered pair (z, y),
o e with the ordered pair (y, y);

Representations of digraphs inside a machine

Step-1: Adjacency Matrix


Step-2: List of Successors, Step-3: List of Predecessors

Step-4: List of arcs (array)

Chapter 5
Breadth First Search (BFS) algorithm traverses a graph in a breadth-ward motion and
uses a queue to remember to get the next vertex to start a search when a dead end
occurs in any iteration.
BFS is basically a node-based algorithm which is used to find the shortest path in the
graph between two nodes. BFS moves through all of its nodes which are connected to
the individual nodes.

BFS uses the FIFO (First In First Out) principle while using the Queue to find the
shortest path. However, BFS is slower and requires a large memory space.

Depth First Search (DFS) algorithm traverses a graph in a depth-ward motion and
uses a stack to remember to get the next vertex to start a search when a dead-end
occurs in any iteration.

DFS uses LIFO (Last In First Out) principle while using Stack to find the shortest path.
DFS is also called Edge Based Traversal because it explores the nodes along the edge
or path. DFS is faster and requires less memory. DFS is best suited for decision trees.

CHAPTER 6

DIJKSTRA’S ALGORITHM

 An algorithm that is used for finding the shortest distance, or path, from starting
node to target node in a weighted graph is known as Dijkstra’s Algorithm.
 This algorithm makes a tree of the shortest path from the starting node, the
source, to all other nodes (points) in the graph.
CHAPTER 7

Define Matching. Also explain saturated, unsaturated and perfect matching.

Matching: A matching of a graph G is a set M of edges such that no two edges


share a same endvertex.

Saturated/Unsaturated Matching: A vertex of the graph is said to be saturated by


a matching M, or M-saturated, if it is an endvertex of an edge of M. Otherwise it is
said to be unsaturated by M, or M-unsaturated.
Perfect Matching: If every vertex of G is M-saturated, then matching M is said to be
perfect.

Maximal Matching: A matching is said to be maximal if it is impossible to add an


edge to it.

Maximum Matching: A matching M is said to be maximum if it has the greatest


possible number of edges.

Note: If a graph has an odd number of vertices, it, of course, cannot have a perfect
matching

Alternating Path:
Given a graph G = (X, E) and a matching M of G, “a path for which the edges are
alternately in M and in E \ M ” is called an alternating path relative to M, or an M-
alternating path,

Augmenting Path:
An M-alternating path is said to be an augmenting path for M, or an M-augmenting
path, if its endvertices are M-unsaturated.
Berge Theorem: A matching M of a graph G is maximum if and only if there is no
M-augmenting path.
CHAPTER 8
Define Transportation Network.
A transportation network R is defined as:
A strict connected digraph G = (X, A) with two disjoint sets, S ⊆ X (the set of the
sources) and T ⊆ X (the set of the sinks), and a weighting of the arcs, c : A → N
(natural numbers), called the capacity. We will also allow the (positive) value ∞ as
the capacity of an arc.

Max Flow by Ford Algorithm


 Source (vertex with zero in degree)
 Sink (vertex with zero out degree)
 Capacity (weight of edge)
 Bottle neck capacity (min capacity in path followed)
 Residual capacity (capacity – bottle neck capacity)
 Augmented path
Chapter 9
Euler Trail: A Euler trail of a graph G is a trail containing all the edges of G, that is
which goes exactly once through each edge of G.

Euler Circuit: A Euler tour of G is a closed Euler trail.

Eulerian Graph: A graph is called a Eulerian graph if it has a Euler tour

Note:
1) A connected graph G is Eulerian if and only if every vertex has an even degree.
2) A connected graph has a Euler trail if and only if the number of its vertices of
odd degree is ≤ 2)

Chapter 10
Hamilton Path: a path going through all the vertices of a graph

Hamilton Cycle: A Hamilton cycle of a graph G is a cycle going through all the vertices
of the graph. Because it is a cycle, it will only go through each vertex once (counting
only once the first and last vertex, which is the same vertex since it is a cycle).

Hamiltonian Graph: A graph G is a Hamiltonian graph if it has a Hamilton cycle.


Steps:
 If there are more than 4 vertices then draw min spanning tree
 Make each edge doubke to form a cycle
 Write path
 Delete repearing vertices
 Draw the path
Travelling Salesman Problem

(1) minimum spanning tree T


(2) graph U obtained by doubling the edges, and Euler tour D (cycle defined on
the graph by the arrows of a search);

(3) shortening of the preceding sequence and Hamilton cycle C obtained, of value
78
Christofide’s algorithm

Steps:
1) Draw min spanning tree
2) Find out odd vertices
3) Connect odd vertices (make two sets) directly
4) Draw that connectivity into already found min spanning tree
5) Then we will get two or three cycles
6) Write down their path
7) Cut or remove repearing vertex from path
8) Remaining path will be drawn as cycle

You might also like