You are on page 1of 10

Sustainable

Transporta<on and
Electrical Power
Systems

Universidad
de Oviedo

Lesson 2 Graph Theory Basics


Semester 3 Power Systems for Electrical Transporta<on
Lecturer: Pablo Arboleya Arboleya

Network Descrip<on: Table of contents.


Graph Theory and Electrical Networks

The geometric proper<es of a network are non dependent of


the nature of the interconnec<ons between the nodes.
From this point of view, each network will be modelled by a
graph represen<ng its topology

Contents of this lesson:

Basic contents and useful deni<ons about graph theory.


Matrix representa<on of a graph
Describing a trac<on network using graphs
Node enumera<on criteria and adjacency matrix congura<on
Edge enumera<on criteria and node incidence matrix congura<on

Graph theory basics and deni<ons

A graph G consists of two nite sets (V,E), where V is the set of


elements called ver<ces or nodes and E is the set of elements
called edges.

Nodes will be represented as 1,2..n


Edges will be represented as e1,e2...ek
Each edge el, is iden<ed with a pair of nodes (i,j).

G is a directed, oriented graph or digraph if its edges are


iden<ed with ordered pairs of nodes. Otherwise G is an
undirected or a non-oriented graph.
A graph G, is a simple graph if it has no self-loops or mul<-
edges (there is no edges star<ng and ending at the same
node).
Here in aUer, simple digraphs will be used.

Graph theory basics and deni<ons


A simple digraph G=(V,E), is represented in this gure.
In a digraph, the rst node of an edge will be called tail and
the second one head.
The direc<on of the edges will help us to dene a posi<ve
reference for the currents.
4
Where:
e4

V={1,2,3,4}
E={e1, e2, e3, e4}
And:

e1 = (1,2)
e2 = (1,3)
e3 = (3,2)
e4 = (4,3)

e3
2

3
e2

e1
1
4

Graph theory basics and deni<ons


A subgraph H = (Vh,Eh) of a graph G = (Vg,Eg), is a graph

where Vh and Eh are subsets of Vg and Eg respec<vely.


Where:
4

Vg={1,2,3,4}
Eg={e1, e2, e3, e4}

e4

And:

Vh={2,3,4}
Eh={e3, e4}

e3

e4
2

3
e2

e3
3

2
Subgraph H=(Vh,Eh)

e1
1

Graph G=(Vg,Eg)
5

Graph theory basics and deni<ons

A pair of ver6ces are adjacent if there exists a edge


that connects them.
The degree of a vertex (d(i)), is the number of edges
incident in it.
A leaf or pendant vertex is a vertex with degree one.
When working with digraphs, we can dis<nguish to
kinds of degree:

4
e4

e3

e2

Out-degree (number of outgoing edges)


In-degree (number of incoming edges)

We can consider that a given graph is Dense if the


number of edges is near |V|2
Otherwise, we can consider that the graph is Sparse

e1
1

A source vertex is a vertex with in-degree zero, while


a sink vertex is a vertex with out-degree zero.
The order of a graph (|V|), is dened by the number
of ver<ces.

e4

e3
3

Graph theory basics and deni<ons


A bipar6te graph G = (V, E) is a graph

whose ver<ces (set V ) can be divided


into two subsets V1 and V2, such that
every edge of E has a vertex in V1 and
other in V2.
If it exists an edge (i,j) for every vertex i
of V1 and every vertex j of V2, the graph
is called complete bipar6te graph.
This kind of graphs can be also simple
digraphs and will be very useful for
describing the connec<ons between the
trains and other DC nodes.

v1

v2

Simple Complete
Bipartite Graph

Graph theory basics and deni<ons

e4

The deni<on of some opera<ons could

Graph G

be also very useful for trac<on network


modelling, we will use the union of
subgraphs to form the complete graph
of the system.
Therefore, being:

e3
2

3
e2
1

G1 = (V1,E1) and G2 = (V2, E2)


subgraphs of G = (V, E)

The union G1G2 called sum graph, has

V1V2 nodes and E1E2 edges.


If G 1 G 2 =G, then G 1 and G 2 are
complementary subgraphs of G.

e1

e4

Graph G1
3

e3
3

2
e2

e1

Graph G2
1

Matrix representa<on of a graph

For a graph G with n nodes (graph order) the matrix with dimension (n, n)
that relates the connec<ons between nodes is formed as follows:
number of edges between i and j i j
i, j =
i= j
number of self - loops in i
However, for our purposes, all graphs will be simple digraphs so:
1 ( adjancency between i and j ) (i > j )
i, j =
0 othercases
Normally, adjacency matrices are dened as symmetric. However, in this case
they are dened as upper triangular, thus the redundant informa<on storage is
avoided allowing greater eciency in the use of sparse matrices.

4
e4

e3
2

3
e2

e1
1

=
0

1 1 0

0 1 0
0 0 1

0 0 0

Matrix representa<on of a graph


In the same way, the graph G with n nodes and k edges is

fully dened by the (k,n) dimension incidence matrix ()


as:

1
the tail of the edge i is the node j

i, j = 1 the head of the edge i is the node j

0 othercases

e4

e3
2

=
0

1 1 0

0 1 0
0 0 1

0 0 0

1 1 0 0

1 0 1 0

=
0 1 1 0

0 0 1 1

e2

e1
1

10