• Aucun résultat trouvé

Trees & Routing (1) BFS

N/A
N/A
Protected

Academic year: 2022

Partager "Trees & Routing (1) BFS"

Copied!
38
0
0

Texte intégral

(1)

Trees & Routing (1) BFS

mercredi 11 février 2015

(2)

Why (spanning) trees ?

mercredi 11 février 2015

(3)

Spanning Tree

Given a graph G=(V,E), a Spanning Tree of G is an acyclic subgraph, spanning all the nodes in V.

mercredi 11 février 2015

(4)

Spanning Tree

Given a graph G=(V,E), a Spanning Tree of G is an acyclic subgraph, spanning all the nodes in V.

mercredi 11 février 2015

(5)

Breadth-first Spanning Tree (BFS)

Given a graph G=(V,E) and a node r in V, a BFS tree of G rooted at r is a spanning tree of G such that for any node v the path leading from the root to v in the tree is of the minimum lenght possible.

r

mercredi 11 février 2015

(6)

Breadth-first Spanning Tree (BFS)

Given a graph G=(V,E) and a node r in V, a BFS tree of G rooted at r is a spanning tree of G such that for any node v the path leading from the root to v in the tree is of the minimum lenght possible.

r

mercredi 11 février 2015

(7)

BFS Construction

mercredi 11 février 2015

(8)

BFS - strategies

«link state» (Dijkstra)

grow on the border

«distance vector» (Bellman-Ford)

compute shortest paths

mercredi 11 février 2015

(9)

Dijkstra BFS

r

mercredi 11 février 2015

(10)

Dijkstra BFS

r root, r, broadcasts in

the curent tree, T,

«pulse»

mercredi 11 février 2015

(11)

Dijkstra-like BFS

r

mercredi 11 février 2015

(12)

Dijkstra-like BFS

r upon reception of

«pulse», leafs of the curent tree send

«layer» to neighbors (except to parents)

mercredi 11 février 2015

(13)

Dijkstra-like BFS

r

mercredi 11 février 2015

(14)

Dijkstra-like BFS

r upon reception of

the first «layer» a node choses the

sender as parent and sends back an «ack»

mercredi 11 février 2015

(15)

Dijkstra-like BFS

r upon reception of

an «ack» a node register the sender

as its child

mercredi 11 février 2015

(16)

Dijkstra-like BFS

r upon reception of

an «ack» a node register the sender

as its child

mercredi 11 février 2015

(17)

Dijkstra-like BFS

r

mercredi 11 février 2015

(18)

Dijkstra-like BFS

r root, r, broadcasts in

the curent tree, T,

«pulse»

mercredi 11 février 2015

(19)

Dijkstra-like BFS

r

mercredi 11 février 2015

(20)

Dijkstra-like BFS

r upon reception of

«pulse», leafs of the curent tree send

«layer» to neighbors (except parent)

mercredi 11 février 2015

(21)

Dijkstra-like BFS

r upon reception of

the first «layer» a node choses the

sender as parent and sends back an «ack»

mercredi 11 février 2015

(22)

Dijkstra-like BFS

r upon reception of

the first «layer» a node choses the

sender as parent and sends back an «ack»

mercredi 11 février 2015

(23)

Dijkstra-like BFS

r upon reception of

the first «layer» a node choses the

sender as parent and sends back an «ack»

mercredi 11 février 2015

(24)

Dijkstra-like BFS

r upon reception of

the first «layer» a node choses the

sender as parent and sends back an «ack»

mercredi 11 février 2015

(25)

Dijkstra-like BFS ?

r

mercredi 11 février 2015

(26)

Dijkstra-like BFS ?

r

mercredi 11 février 2015

(27)

Dijkstra-like BFS - Complexity

Time Complexity: O(Diam2(G))

Message Complexity: O(nDiam(G)+|E|)

mercredi 11 février 2015

(28)

Bellman-Ford-like BFS

each node maintains :

its shortes distance to the root d (initially d=infinity)

its parent to the root on the shortest distance

mercredi 11 février 2015

(29)

Bellman-Ford-like BFS

r d=0 parent=r

d=∞

parent= d=∞

parent=❉

d=∞

parent=

d=∞

parent= d=∞

parent=❉

mercredi 11 février 2015

(30)

Bellman-Ford-like BFS

r root, r, broadcasts

d=0 to all its neighbors

d=0 parent=r

d=∞

parent= d=∞

parent=❉

d=∞

parent=

d=∞

parent= d=∞

parent=❉

mercredi 11 février 2015

(31)

Bellman-Ford-like BFS

r d=0 parent=r

d=1 parent=r d=1

parent=r

d=1 parent=r

d=1 parent=r

d=∞

parent=❉

mercredi 11 février 2015

(32)

Bellman-Ford-like BFS

r d=0 parent=r

d=1 parent=r d=1

parent=r

d=1 parent=r

d=1 parent=r

d=∞

parent=❉

each node

broadcasts its d to all its neighbors

except parent

mercredi 11 février 2015

(33)

Bellman-Ford-like BFS

r d=0 parent=r

d=1 parent=r d=1

parent=r

d=1 parent=r

d=1 parent=r

d=2 parent=n2

n1 n2

n3

n3 n4

mercredi 11 février 2015

(34)

Bellman-Ford-like BFS

r d=0 parent=r

d=1 parent=r d=1

parent=r

d=1 parent=r

d=1 parent=r

d=2 parent=n2

n1 n2

n3

n3 n4

mercredi 11 février 2015

(35)

Bellman-Ford-like BFS - Complexity

Time Complexity: O(Diam(G))

Message Complexity: O(|E|)

mercredi 11 février 2015

(36)

BFS - Complexity

Time Messages Dijkstra-like D2 E+nD Bellman-Ford-

like D nE

Awebuch-Peleg Dlog3n E+nlog3n

Lower Bound D E

mercredi 11 février 2015

(37)

Spanning Tree and Routing

mercredi 11 février 2015

(38)

Routing

«link state» (Dijkstra like)

Open Shortest Path First (OSPF)

«distance vector» (Bellman-Ford like)

Border Gateway Protocol (BGP)

Interior Gateway Routing Protocol (IGRP, CISCO property)

mercredi 11 février 2015

Références

Documents relatifs

We propose then a generalized version of the Xcast protocol, called GXcast, intended to permit the Xcast packets fragmentation and to support the increasing number of members in

• upon reception of «pulse» each node of the current tree upcasts its lightest outgoing. edge (not part of the current tree) to the

• If data rate is very low, it is not necessary to keep sensors listening all the

• Apple Talk : Pour redistribuer les routes apprises par ce protocole, EIGRP utilise le RTMP (Routing Table Maintenance Protocol) ;.. • IP : EIGRP utilise les protocoles OSPF,

We used TLC , the explicit-state model checker for TLA + , to verify the correctness properties against our different versions of the Pastry model, instantiated to four nodes. After

With the creation of the Interior Gateway Routing Protocol (IGRP) in the early 1980s, Cisco Systems was the first company to solve the problems associated with using RIP to

– Next-hop is the IP address used to peer with the EBGP neighbor they learned it from. •

Reactive routing algorithms generate usually less signalization because only the required routes are re- solved, but this comes at the expense of a longer delay when sending the