__A graphs denoted G = (V, E), consists of a finite set of vertices V and a set of pairs of n vertices E called edges.__

**Graphs :**__graph is shown in figure-6(a).__

**Example :**
Here, V = {1, 2, 3, 4} and E = {(n, m)} | n+m = 4 or n+m = 7}

A path in a graph is a sequence of vertices v

_{1}, v_{2}...........v_{k}, k 1, such that
there is an edge (v

_{i}, v_{i+1}) for each i, 1<=i<k. The length of the path is k-1. if v_{1}= v_{k}, the path is a cycle.__A directed graph also denoted G = (V,E), consist of finite set of vertices V and a set of ordered pairs of vertices E called ares. We denote an are from v to w by v w.__

**Directed graph :**

**A directed graph appears in figure-6(b).**

__Example :__
A path is directed graph is a sequence of vertices, v

_{1}, v_{2}...........v_{k}, k 1 such that v_{i}, v_{i+1}is an are for each i, 1<=i<k. We say the path in from v_{1}to v_{k}__A tree is a directed graph with the following properties :__

**Trees :**__There is one vertex called the root, that has no predecessors and from which there is a path to every vertex.__

**1)**__Each vertex others than the root has exactly one predecessor__

**2)****THe successors of each vertex are ordered "from the left"**

__3)__