Spanning Trees in Communication Networks - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

Spanning Trees in Communication Networks

Description:

Auto-configuration and Self-management of Personal Area Networks. considering: ... Algorithm: BELLMAN-FORD. Input: A weighted, directed graph G=(V,E,w); a ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 56
Provided by: telecomIn
Category:

less

Transcript and Presenter's Notes

Title: Spanning Trees in Communication Networks


1
Spanning Trees in Communication Networks
  • Rui Campos
  • INESC Porto, Faculdade de Engenharia,
  • Universidade do Porto
  • rcampos_at_inescporto.pt

2
Outline
  1. Graph Theory
  2. Spanning Trees
  3. Algorithms
  4. Spanning Trees Applications
  5. Summary

3
About me
  • PhD student at University of Porto
  • PhD Overview
  • Auto-configuration and Self-management of
    Personal Area Networks
  • considering
  • intra- and extra-PAN connectivity
  • heterogeneity in IP networks
  • integration of multiple communication
    technologies
  • Researcher at INESC Porto
  • Participation in FP6 Ambient Networks Project
  • 1st phase - protocol design, specification, and
    simulation
  • 2nd phase automatic and dynamic IP connectivity
    establishment between Ambient Networks

4
1. Graph Theory
  • Graph formal definition
  • A graph G(V,E,w) is defined as a set of
    vertices V connected by a set of edges EV2
    (i.e., the elements of E are 2-element subsets of
    V) with weights w that represent costs assigned
    to the edges of G.

5
1. Graph Theory example graph
6
1. Graph Theory some definitions
  • Number of vertices in G is n V
  • Number of edges in G is m E
  • Degree of a vertex v is defined as its number of
    adjacent edges
  • (an adjacent edge to v is an edge connecting it
    to a neighbor vertex)
  • Path in G is defined as a sequence of connected
    adjacent vertices
  • Cost of path is equal to sum of weights of edges
    belonging to path
  • Cycle in G is defined as a path where first and
    last vertex in sequence are the same

7
1. Graph Theory graph types
undirected
undirected weighted
8
1. Graph Theory graph types
directed
directed weighted
9
1. Graph Theory specific types
complete graph
metric graph
all vertices have degree n-1
edge weights satisfy triangle inequality
10
1. Graph Theory specific types
spanning tree
tree
tree with n-1 edges extracted from a graph G
with n vertices
graph without cycles
11
2. Spanning Trees cost functions
  • Path cost
  • e.g., cT(1,3)527
  • Total cost
  • Ctotal(T)5218
  • Routing Cost
  • Cr(T) cT(1,2)cT(1,3)cT(1,4)cT(2,1)cT(2,3)cT
    (2,4)
  • cT(3,1)cT(3,2)cT(3,4)cT(4,1)cT(4,
    2)cT(4,3)48

12
2. Spanning Trees types
  • Shortest Path Tree (SPT)
  • Minimum Spanning Tree (MST)
  • Minimum Routing Cost Tree (MRCT)

path cost
total cost
routing cost
13
2. Spanning Trees SPT
  • The Shortest Path Tree (SPT) rooted at a vertex s
    defines a tree composed by union of the shortest
    paths between s and each of the other vertices in
    G such that

14
2. Spanning Trees SPT
  • Lets see an example
  • SPT root at vertex 1

P(1,2) (1,2) C(1,2) 10 P(1,2) (1,3,2)
C(1,2) 3 P(1,2) (1,3,4,2) C(1,2) 9
P(1,4) (1,2,4) C(1,4) 14 P(1,4)
(1,2,3,4) C(1,4) 14 P(1,4) (1,3,2,4)
C(1,2) 7 P(1,4) (1,3,4) C(1,4) 5
P(1,3) (1,3) C(1,3) 2 P(1,3) (1,2,3)
C(1,3) 11 P(1,3) (1,2,4,3) C(1,3) 17
15
2. Spanning Trees SPT
  • SPT root at vertex 1
  • P(1,2) (1,3,2)
  • P(1,3) (1,3)
  • P(1,4) (1,3,4)

16
2. Spanning Trees MST
  • The Minimum Spanning Tree (MST) represents the
    spanning tree T such that
  • for all spanning trees T that can be
  • computed from G

17
2. Spanning Trees MST
  • Lets see an example ...
  • STs that can be computed from graph

Ctotal 324 9
Ctotal 354 12
Ctotal 235 11
Ctotal 245 11
18
2. Spanning Trees MRCT
  • The Minimum Routing Cost Tree (MRCT)
  • represents the spanning tree T such that
  • for all spanning trees T that can be
  • computed from G

Note computation of exact MRCT is a NP-hard
problem
19
2. Spanning Trees MRCT
  • Lets see an example
  • STs that can be computed from graph

Cr 12491283 48593582
Cr 245263 46953958
Cr 2492611 465911574
Cr 2105283 108553566
20
2. Spanning Trees MRCT
  • Using other routing cost definition
  • STs that can be computed from graph

Cr 124983541
Cr 24563929
Cr 249611537
Cr 210583533
21
2. Spanning Trees other types
  • MRCT considering communication requirement
  • (MRCT is optimal when communication
    requirements are equal)
  • Steiner Minimal Tree (SMT)
  • spans only a given subset of vertices in a graph
    G
  • minimizes same cost functions as MST
  • Minimum Diameter Spanning Tree (MDST)
  • diameter cost of longest path between any two
    vertices in a tree
  • defines spanning tree of minimum diameter among
    all possible spanning trees

Note other types and further details can be
found in 1
22
2. Spanning Trees 2 interesting cases
  • When edge weights of G are highly heterogeneous
  • ?
  • MST MRCT ?SPT ()
  • When there is a single source s
  • ?
  • MRCT SPTs

() P. Mieghem, S. Langen, Influence of the link
weight structure on the shortest path, Physical
Review E 71 (2005) 056113-1056113-13. P.
Mieghem, S. M. Magdalena, Phase transition in the
link weight structure of networks, Physical
Review E 72 (2005) 056138-2056138-7.
23
2. Spanning Trees MSTMRCTSPT
  • Lets see an example ...
  • STs that can be computed from graph

Cr64 Ctotal21
Cr46 Ctotal21
Cr46 Ctotal21
Cr64 Ctotal 21
Cr36 Ctotal 12
Cr36 Ctotal 12
Cr10 Ctotal 3
Cr64 Ctotal 21
SPT
24
3. Algorithms Prims algorithm
  • Algorithm to compute MST for a graph G
  • Proposed by Robert Prim in 1957
  • Time complexity
  • O(n.m)
  • in its more naive implementation
  • O(m.log(n))
  • using binary heaps in conjunction with adjacency
    lists
  • O(mn.log(n))
  • using Fibonacci heaps in conjunction with
    adjacency lists

25
  • Algorithm PRIM
  • Input A weighted, undirected graph G(V,E,w)
  • Output A minimum spanning tree T
  • T ? 0
  • Let u?V be an arbitrary vertex
  • U ? u
  • while U lt n do
  • find u?U and v?(V - U) such that edge (u,v) is
    the smallest edge between U and V U and does
    not form a cycle
  • T ? T ? (u,v)
  • U ? U ? v

26
3. Algorithms Prims algorithm
  • Steps in a nutshell
  • (T ? 0)
  • Pick up arbitrary vertex v
  • Select edge (i,j) adjacent to v with lowest
    weight and add it to T
  • Select adjacent edge (i,j) to T with lowest
    weight that does not form a cycle and add it to T
  • Repeat step 3 until all vertices have been spanned

27
3. Algorithms Prims algorithm
Lets see an example ...
input graph
MST
28
3. Algorithms Prims algorithm
Other possible result ...
input graph
MST
29
3. Algorithms Kruskals algorithm
  • Algorithm to compute MST for a graph G
  • Proposed by Joseph Kruskal in 1956
  • Time complexity
  • O(m.log(m))
  • using priority queues

30
  • Algorithm KRUSKAL
  • Input A weighted, undirected graph G(V,E,w)
  • Output A minimum spanning tree T
  • Sort edges in E in nondecreasing order by weight
  • T ? 0
  • Create one set for each vertex
  • for each edge (u,v) in sorted order do
  • if FIND_SET(u) ? FIND_SET(v) then
  • T ? T ? (u,v)
  • UNION(u,v)

Legend
MAKE_SET(v) create a new set whose only member is v
FIND_SET(v) returns a pointer to set containing v
UNION(u,v) unites dynamic sets that contain u and v into new set that is union of these two sets
31
3. Algorithms Kruskals algorithm
  • Steps in a nutshell
  • (T ? 0)
  • Pick up edge (i,j) with lowest weight that does
    not belong to T and does not form a cycle
  • Add edge (i,j) to T
  • Repeat step 1 and 2 until all vertices have been
    spanned

32
3. Algorithms Kruskals algorithm
Lets see an example ...
input graph
MST
33
3. Algorithms Dijkstras algorithm
  • Algorithm to compute SPT for a graph G
  • Proposed by Edsger Dijkstra in 1959
  • Time complexity
  • O(n2)
  • in its more naive implementation
  • O(m.log(n))
  • using binary heaps
  • O(mnlog(n))
  • using Fibonacci heaps

34
  • Algorithm DIJKSTRA
  • Input A weighted, directed graph G(V,E,w)
  • a source vertex s.
  • Output A shortest path tree T rooted at s
  • for each v?V do
  • dv ? ? pv ? NIL
  • ds ? 0 T ? 0 S ? V
  • while S ? 0 do
  • choose u?S with min(du)
  • S ? S u
  • if u ? s then T ? T ? (pu,u)
  • for each vertex v adjacent to u do
  • if (dv ? du w(u,v)) then
  • dv ? du w(u,v)
  • pv ? u

35
3. Algorithms Dijkstras algorithm
  • Steps in a nutshell
  • (T ? 0 dv ? ? ds ? 0)
  • Select vertex v with min shortest path estimate
    and add edge (pv,v) to T
  • Re-evaluate shortest path estimates of vertices
    adjacent to v and update them and parent vertex
    in T if lower estimates are obtained
  • Repeat steps 1 and 2 until all vertices have been
    spanned

36
3. Algorithms Dijkstras algorithm
Lets see an example ...
SPT rooted_at_vertex 1
v dv
2 1
3 10
v dv
3 10
5 4
v dv
3 10
4 6
v dv
3 9
6 7
input graph
v dv
3 9
37
3. Algorithms Bellman-Ford algorithm
  • Algorithm to compute SPT for a graph G
  • Proposed by Richard Bellman in 1958
  • Works in more general cases
  • finds SPT even when graph has negative weights
  • Time complexity
  • O(n.m)

38
  • Algorithm BELLMAN-FORD
  • Input A weighted, directed graph G(V,E,w)
  • a source vertex s.
  • Output A shortest path tree T rooted at s
  • for each v?V do
  • dv ? ? pv ? NIL
  • ds ? 0
  • for i ? 1 to n-1 do
  • for each (u,v)?E do
  • if (dv ? du w(u,v)) then
  • dv ? du w(u,v) pv ? u
  • for each (u,v)?E do
  • if (dv ? du w(u,v)) then
  • Output A negative cycle exists Exit
  • T ? 0
  • for v?(V-s) do
  • T ? T ? (pu,u)

39
3. Algorithms Bellman-Ford algorithm
  • Steps in a nutshell
  • (T ? 0 dv ? ? ds ? 0)
  • For each edge (u,v) re-evaluate shortest path
    estimate dv and update it and pv if (du w(u,v)
    ? dv)
  • Repeat step 1 (n-1) times
  • The union of edges (pv,v) gives shortest path
    tree T

40
3. Algorithms Bellman-Ford algorithm
Lets see an example ...
SPT rooted_at_vertex 2
E(1,2),(2,1),(1,3),(3,1),(2,4),(4,3)
v 1 2 3 4
dv ? 0 ? ?
pv NIL NIL NIL NIL
v 1 2 3 4
dv 2 0 ? 3
pv 2 NIL NIL 2
v 1 2 3 4
dv 2 0 12 3
pv 2 NIL 1 2
v 1 2 3 4
dv 2 0 6 3
pv 2 NIL 4 2
input graph
Re-evaluation for each (u,v)?E do if (du
w(u,v) ? dv) then dv ? du w(u,v)
SPT_rooted_at_2
41
3. Algorithms Add algorithm
  • Algorithm for finding approximate MRCT for a
    graph G
  • Proposed by Vic Grout in 2005
  • Vertex oriented version of Prims algorithm
  • minimizes number of relay nodes in final spanning
    tree
  • Time complexity
  • O(n.log(n)) time in the worst case
  • usually, faster due to tendency for many nodes to
    be added to T at each step

42
  • Algorithm ADD
  • Input undirected graph G(V,E)
  • Output approximate minimum routing cost tree T
  • T ? 0
  • for all v ? V
  • sv ? 0
  • for all u,v ? V
  • wuv ? 0
  • find u such that
  • du ? max(dv), v ? V
  • su ? 1
  • while there exists j such that sj 0 do
  • for each v ? V adjacent to u do
  • wuv ? 1 sv ? 1 T ? T ? (pu,u)
  • find u such that (du - du)? max(dj - dj)
    where sj 1

Legend sv1 ? v?T wuv weight of edge (u,v) du
degree of vertex u du degree of vertex u in T

43
3. Algorithms Add algorithm
  • Steps in a nutshell
  • Pick up vertex v adjacent to maximum number of
    unspanned vertices
  • Add to T all edges adjacent to v that do not form
    a cycle
  • Repeat steps 1 and 2 until all vertices are added
    to T

44
3. Algorithms Add algorithm
Lets see an example ...
approximate MRCT
input graph
45
3. Algorithms Wongs algorithm
  • Proposed by Richard Wong in 1980
  • 2-approximate MRCT algorithm
  • Based on Dijkstras algorithm
  • Time complexity
  • O(n2.log(n)m.n)

46
3. Algorithms Wongs algorithm
  • Steps
  • Compute n SPTs using Dijkstras algorithm
  • Compute routing cost for each SPT
  • Select SPT with lowest routing cost

2-approximate MRCT
47
3. Algorithms Wongs algorithm
Lets see an example ...
SPT_rooted_at_3
SPT_rooted_at_1
SPT_rooted_at_2
SPT_rooted_at_8
SPT_rooted_at_6
SPT_rooted_at_4
SPT_rooted_at_5
SPT_rooted_at_7
48
3. Algorithms Wongs algorithm
Lets see an example ...
SPT root Routing Cost
1 124
2 136
3 118
4 122
5 144
6 126
7 134
8 142
approximate MRCT
49
4. Spanning Trees Applications
  • Minimum Spanning Tree (MST)
  • cable TV network
  • cost-efficient connection of several end clients
    to infrastructure
  • islands connection
  • cost-efficient connection of islands using
    bridges
  • travelling salesman problem
  • NP-hard problem
  • MST can be used to find 2-approximate solution

50
4. Spanning Trees Applications
  • Shortest Path Tree (SPT)
  • routing protocols
  • Routing Information Protocol (RIP)
  • Open Shortest Path First (OSPF)
  • Ad-hoc On-demand Distance Vector (AODV)
  • Optimized Link State Routing (OLSR)
  • multicast routing
  • minimization of path cost between source and
    destinations
  • road network
  • find shortest path between a city and other
    cities in a country

51
4. Spanning Trees Applications
  • Minimum Routing Cost Tree (MRCT)
  • Ethernet networks
  • minimization of routing cost between
    bridges/switches
  • road network
  • connection of cities in a country with minimum
    distance between cities

52
5. Summary
  • Different types of graphs defined
  • undirected, undirected weight, directed, directed
    weighted
  • Specific graph types
  • complete graph, metric graph, tree, spanning tree
  • Different types of spanning trees
  • Shortest Path Tree (SPT)
  • Minimum Spanning Tree (MST)
  • Minimum Routing Cost Tree (MRCT)
  • ?

their computation by exhaustive search is
impratical
53
5. Summary
  • Spanning tree algorithms
  • Enable efficient computation of spanning trees
  • Spanning trees have several applications

Spanning Tree Algorithm
MST Prim Kruskal
SPT Dijkstra Bellman-Ford
MRCT Add Wong
54
References
  • 1 B. Wu and K. Chao, Spanning Trees and
    Optimization Problems, Chapman Hall, 2004.
  • 2 R. Diestel, Graph Theory, Springer-Verlag
    Heidelberg, New York, Electronic Edition 2005.
  • 3 V. Grout, Principles of Cost Minimization in
    Wireless Networks, J. of Heuristics 11 (2005)
    115-133.

55
Contact
  • Rui Campos
  • (351) 222 094 268
  • rcampos_at_inescporto.pt
  • http//telecom.inescporto.pt/rcampos
Write a Comment
User Comments (0)
About PowerShow.com