Professional Documents
Culture Documents
Graph Theory
Graph Theory
Graph Theory
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/310796561
CITATIONS READS
0 318
1 author:
Mohamed Fayez
Cairo University
2 PUBLICATIONS 0 CITATIONS
SEE PROFILE
All content following this page was uploaded by Mohamed Fayez on 24 November 2016.
By:
محمد فايز الشوادفى عبدالباسط
1
TABLE OF CONTENTS
CHAPTER NO. TITLE
1. Graph theory-Introduction
1. Graph theory fundamental.
1.1. Point.
1.2. Line.
1.3. Vertex.
1.4. Edge or Element.
1.5. Graph.
1.6. Sub graph.
1.7. Path.
1.8. Loop.
1.9. Oriented graph.
1.10. Degree of vertex.
1.11. Tree and Co-Tree.
1.12. Basic Loop.
1.13. Cut-Set.
1.14. Basic cut-set.
2. Application of graph theory.
2.1. Introduction.
2.2. Example 1.
2.3. Example 2.
4. References.
2
What is a Graph?
A graph is a pictorial representation of a set of objects where some pairs of
objects are connected by links. The interconnected objects are represented by
points termed as vertices, and the links that connect the vertices are called
edges.
Formally, a graph is a pair of sets (V, E), where V is the set of vertices and E is
the set of edges, connecting the pairs of vertices. Take a look at the following
graph:
3
as point, line, vertex, edge, degree of vertices, properties of graphs, etc. Here,
in this chapter, we will cover these fundamentals of graph theory.
1.1. Point
A point is a particular position in a one-dimensional, two-dimensional,
or three-dimensional space. For better understanding, a point can be
denoted by an alphabet. It can be represented with a dot.
Example
a
Here, the dot is a point named ‘a’.
1.2. Line
A Line is a connection between two points. It can be represented with a
solid line.
Example:
Here, ‘a’ and ‘b’ are the two vertices and the link between them is called an edge.
1.3. Vertex
A vertex is a point where multiple lines meet. It is also called a node. Similar
to points, a vertex is also denoted by an alphabet.
Example
a
Here, the vertex is named with an alphabet ‘a’.
4
1.4. Edge or Element
An edge is the mathematical term for a line that connects two vertices. Many
edges can be formed from a single vertex. Without a vertex, an edge cannot
be formed. There must be a starting vertex and an ending vertex for an edge.
Example:
1.5. Graph
A graph ‘G’ is defined as G = (V, E) Where V is a set of all vertices and E is a
set of all edges in the graph.
Example 1:
In the above example, ab, ac, cd, and bd are the edges of the graph. Similarly,
a, b, c, and d are the vertices of the graph.
Example 2:
In this graph, there are four vertices a, b, c, and d, and four edges ab, ac, ad,
and cd.
5
1.6. Sub Graph
Any subset of elements of the graph is called a subgraph A subgraph is said to
be proper if it consists of strictly less than all the elements and nodes of the
graph.
1.7. Path
A path is defined as a subgraph of connected elements Such that not
more than two elements are connected to anyone node. If there is a path
between every pair of nodes then the graph is said to be connected.
Alternatively, a graph is said to be connected if there exists at least one path
between every pair of nodes.
1.8. Loop
In a graph, if an edge is drawn from vertex to itself, it is called a loop.
Example 1:
In the above graph, V is a vertex for which it has an edge (V, V) forming a
loop.
Example 2:
In this graph, there are two loops which are formed at vertex a, and vertex b.
6
An oriented graph is a graph with direction marked for each element Fig.
(a) Shows the single line diagram of a simple power network consisting of
generating stations. Transmission lines and loads. Fig. (b) Shows the
positive sequence network of the system in Fig (a). The oriented connected
graph is shown in Fig. c for the same system.
Notation: deg(V).
In a simple graph with n number of vertices, the degree of any vertices is:
7
deg(v) ≤ n – 1 ∀ v ∈ G
A vertex can form an edge with all other vertices except by itself. So the
degree of a vertex will be up to the number of vertices in the graph minus
1. This 1 is for the self-vertex as it cannot form a loop by itself. If there is a
loop at any of the vertices, then it is not a Simple Graph.
Degree of vertex can be considered under two cases of graphs:
Undirected Graph
Directed Graph
8
deg(c) = 1, as there is 1 edge formed at vertex ‘c’
So ‘c’ is a pendent vertex.
deg (d) = 2, as there are 2 edges meeting at vertex ‘d’.
deg (e) = 0, as there are 0 edges formed at vertex ‘e’.
So ‘e’ is an isolated vertex.
Example 2
Take a look at the following graph:
The indegree and outdegree of other vertices are shown in the following table:
vertex Indegree Outdegree
a 1 2
b 2 0
c 2 1
d 1 1
e 1 1
f 1 1
g 0 2
Example 2
Take a look at the following directed graph. Vertex ‘a’ has an edge ‘ae’ going
outwards from vertex ‘a’. Hence its outdegree is 1. Similarly, the graph has an
edge ‘ba’ coming towards vertex ‘a’. Hence the indegree of ‘a’ is 1.
10
The indegree and outdegree of other vertices are shown in the following table:
vertex Indegree Outdegree
a 1 1
b 0 2
c 2 0
d 1 1
e 1 1
The number of nodes and the number of branches in a tree are related by:
b = n-1
If e is the total number of elements then the number of links I of a
connected graph with branches b is given by
11
l=e-b
Hence, from first eq. . It can be written that
l=e-n+1
A tree and the corresponding co - tree of the graph for the system shown in
the following Fig. are indicated in Fig.(d) and Fig.(e)
12
1.12.Basic Loops
A loop is obtained whenever a link is added to a tree, which is a closed
path. As an example to the tree in Fig. (d) if the link 6 is added, a loop
containing the elements 1-2-6 is obtained. Loops which contain only one link
are called independent loops or basic loops.
1.13. Cut-set
A Cut set is a minimal set of branches K of a connected graph G, such that
the removal of all K branches divides the graph into two parts. It is also true
that the removal of K branches reduces the rank of G by one, provided no proper
subset of this set reduces the rank of G by one when it is removed from G.
13
The rank of the graph = (no. of nodes n - 1) = 4 - I = 3. If branches 1 and 3
are removed two sub graphs are obtained as in Fig. (c). Thus 1 and 3 may be a
cut-set. Also, if branches 1, 4 and 3 are removed the graph is divided into two
sub graphs as shown in Fig.(i) Branches I, 4, 3 may also be a cut-set. In both the
above cases the rank both of the sub graphs is 1 + 1 = 2. It can be noted that (I,
3) set is a sub-set of (I, 4, 3) set. The cut-set is a minimal set of branches of the
graph, removal of which cuts the graph into two parts. It separates nodes of the
graphs into two graphs. Each group is in one of the two sub graphs.
If each cut-set contains only one branch, then these independent cut-sets
are called basic cut-sets. In order to understand basic cut-sets select a tree.
Consider a twig bk of the tree. If the twig is removed the tree is separated into
two parts. All the links which go from one part of this disconnected tree to the
other, together with the twig bk constitutes a cut-set called basic cut-set. The
orientation of the basic cut-set is chosen as to coincide with that of the branch
of the tree defining the cut-set. Each basic cut-set contains at least one branch
with respect to which the tree is defined which is not contained in the other
basic cut-set. For this reason, the n -l basic cut-sets of a tree are linearly
independent.
Consider node (1) and branch or twig 1. Cut-set A contains the branch 1 and
links 5 and 6 and is oriented in the same way as branch J. In a similar way C cut-
set cuts the branch 3 and links 4 and 5 and is oriented in the same direction as
branch 3. Finally cut-set B cutting branch 2 and also links 4, 6 and 5 is oriented
as branch 2 and the cut-sets are shown in Fig. (j).
14
15
2.1. Introduction
2.2. Example 1:
For the network shown in figure(1) form the bus incidence matrix, A.
branch path incidence matrix K and loop incidence matrix C.
16
For the tree and co-tree chosen for the graph shown below fig.(2), the basic
cut-sets are marked. Bus (l) is taken as reference.
17
i. Bus incidence matrix
Number of buses == number of nodes
A=
1 -1 0 0 0
2 1 -1 0 0
3 0 1 -1 0
4 1 0 -1 0
5 0 0 1 -1
6 0 0 0 -1
Fig.(4)
A=
(2) (3) (4) (5)
Elements Bus
branch 1 -1 0 0 0
branch 2 1 -1 0 0
branch 5 0 1 -1 -1
branch 6 1 0 0 0
Link 3 0 1 -1 1
Link 4 1 0 -1 0
Fig.(5)
Bus Buses
e
B Ab
branches
18
L Al
Link
K=
19
iii. Basic loop incidence matrix C :
Example 2:
Form the Y BUS by using singular transformation for the network shown
in Fig. including the generator buses.
20
The given network is represented in admittance form:
Fig. (2)
The oriented graph is shown in Fig. below
Fig. (3)
21
The above graph can be converted into the following form for convenience:
Fig. (4)
The element node incidence matrix is given by:
Â=
0 1 2 3 4
e n
a +1 -1 0 0 0
b 0 +1 0 -1 0
c 0 0 -1 +1 0
d +1 0 -1 0 0
e 0 0 +1 0 -1
f 0 -1 0 0 +1
22
Bus incidence matrix is obtained by deleting the column corresponding to the
reference bus.
A=
1 2 3 4
e n
a -1 0 0 0
b +1 0 -1 0
c 0 -1 +1 0
d 0 -1 0 0
e 0 +1 0 -1
f -1 0 0 +1
Aͭ=
a b c d e f
e
b
1 -1 1 0 0 0 -1
2 0 0 -1 -1 1 0
3 0 -1 1 0 0 0
4 0 0 0 0 -1 1
ͭ [𝑦][𝐴]
𝑌𝑏𝑢𝑠 = [𝐴]
23
24
1. Introduction
Kirchhoff’s voltage law states that for a closed loop SV=0 or SV rise
is equal to SV drops. The total resistance of ‘n’ resistors in series is RT=
R1+R2+R3+………+Rn and the total power are PT= P1+P2+P3+…….Pn.
In series, So that the same current flows through all the components
but a different potential voltage can exist across every one. In parallel, so
that the same potential difference exists across every components but
each component may carry a different current.
Fig. (1)
Here is the graph of the circuit,
25
Fig. (2): Network graph
Fig. (3)
26
A graph can actually be represented using matrices method the two
of the most widely used matrices for graph representation is adjacency
and incidence matrices. An adjacency matrix is a square matrix in which
each row and column is represented by a vertex.
Consider figure 4, as an example it has three vertices V={ R1, R2,R3} this
mean that the square matrix must be 3x3 let each row and column is
represented by each of the six vertices in V.
4. Conclusion
27
1. Power systems applications of graph theory (energy science,
engineering and technology) by jizhong zhu.
28