29
Interval Routing Presented by: Marc Segal

Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Embed Size (px)

Citation preview

Page 1: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Interval Routing

Presented by: Marc Segal

Page 2: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Motivation(1)

In a computer network a routing method is required so that nodes can communicate with each other.

Normally, an O(N) routing table is used.This method does not scale well for large

networks:Routing is inefficientStorage space cost for nodes

Page 3: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Motivation(2)

One possible solution is prefix-routing:Node identities are words over an alphabet ΣRouting is done using the entry in the routing

table that has the longest common prefix with the destination address

In this presentation we present an alternative method that requires O(d) size tables, where d is the degree of the node

Page 4: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Model

A network is an N-node connected graph G(V,E), N=|V|

Edges may have a non-negative cost value associated with them.

The edges incident at a node are called its links.

A node communicates with its neighbours via its links.

Links are bidirectional.

Page 5: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Interval Labeling Scheme

Nodes and links are labeled with labels from a linearly ordered set {i0,i1,…,iN-1} The label of node v is marked α(v) For simplicity, we label nodes 0,1,…,N-1

An Interval Labeling scheme (ILS) is a scheme in which: All nodes get different labels At every node each link receives a distinct label

Link labels are stored in a sorted cyclic table at each node

Page 6: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

The routing routine

Routing is performed to the first link αs such that the interval [αs, αs+1) contains the destination node.

SEND(i,j,m) {if i==j process melse {

i=first link αs such that αs≤j<αs+1;SEND(i,j,m)

}}

Page 7: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Interval Routing – An example

0

4

1

3

2

6

5

4 2

0

1

2

6

4

3

0

1

1

5

1

SEND(0,3,m)

SEND(2,3,m)

SEND(1,3,m) But…

SEND(0,5,m)

SEND(4,5,m)

SEND(1,5,m)

This ILS is invalid!

Page 8: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Valid ILS

An ILS is valid if all messages sent from any source node reach their destination.

Theorem: For every network G there exists a valid ILS.

We show a DFS based algorithm for finding a valid ILS.

Page 9: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

The DFS scheme

Start with an arbitrary node, label it 0Proceed in DFS order, labeling nodes with consecutive

numbers.Label links with the label of the node they connect to If a node that admits no forward is reached, and i is the

largest node number assigned until now, backtrack and label the link over which we backtrack (i+1) mod N.

If backtracking to node u from node v that has a frond at node 0 and i=N-1, label the backtrack link by α(u) (instead of 0).

Page 10: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

The DFS scheme - example

1

0

0

1

2

1

2

2

3

3

4

4

2

5

4

5

0

6

6

6

62

0

0

65

4

Page 11: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

DFS Scheme - correctness

Since the graph is connected DFS will find a spanning tree

A node labeled u whose maximum descendent is i has :

u

v w

v w-1

i+1

All nodes in the interval [v,w-1) will be under this subtree

All nodes in the interval [w,i) will be

under this subtree

Page 12: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Optimum schemes

The DFS labeling scheme is valid but is not necessarily optimal. For example,

A labeling scheme is called optimal if all paths between the nodes in the scheme are the shortest possible paths.

Page 13: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Optimum Schemes(2)

The DFS scheme is optimal for Trees and for complete graphs.

For rings the following scheme is optimal:Orient the ring in one direction an label the nodes

consecutively from 0 to N-1For each node i

Label the right link by label the left link by NiN mod2/

Ni mod1 0

1

2

3

1

2

3

03

1

0

2

Page 14: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Optimum Schemes(3)

A k-labeled ILS is an ILS where:Each link may receive up to k distinct labelsAt every node all the link labels must be distinct

Proposition: For any graph with N nodes there exists an (N-1)-labeled ILS that is optimum For every node i, for every node j label the first link on the

shortest path from i to j by j. This is actually the traditional routing table

Page 15: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Neighbourly schemes

An ILS is a neighbourly scheme if it is valid and all messages for a neighbour are delivered directly in one hop.

Lemma: The only nodes in a DFS scheme that do not necessarily deliver messages to neighbours in one hop are those nodes k that have fronds to nodes i with i<k Proof:

j

k

Let j,k be negihboursCase 1: (j,k) is a frond

k

j

Case 2:j is k’s father

Case 2a:If k has no fronds from k to i, i<jb 1, kbj

Case 2b:If k has a frond from k to i, i<j

i

i

ibj ,

Page 16: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Neighbourly schemes(2)

Theorem: There exists a two-labeled neighbourly scheme for any arbitrary graph. Start with a DFS scheme We only need to concern ourselves with the case in lemma 1 For such a link (k,j) double-label it with the label j We must make sure that messages to to any node t in [j,k+1) are

routed correctly. Since j≤t<k, the message is sent to j and does not return to k

Page 17: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Orderly DFS schemes

A DFS scheme is orderly if whenever there is a ‘backward’ frond from node k to node i and x>k, either x must belong to the subtree of the DFS tree with k as a root or x does not belong to the subtree with i as a root.

Lemma: in an orderly DFS scheme, if there is a backward frond from node k to node i and the backtrack link at k is labeled b, the backtrack link at i is also labeled b.

k

i

b

Page 18: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Orderly DFS schemes(2)

Theorem: There exists a neighbourly ILS for every graph that has an orderly DFS scheme. Relabel the orderly DFS scheme: for each node k that has backward fronds the

smallest of which is i and whose father is j:

k

ji

b i k

ji

j b

The modified scheme is neighbourly : By the lemma, we only have to consider node k. Messages to j are now delivered in one hop. But so are messages to i since jbi ,

Page 19: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Orderly DFS schemes(3)

The modified scheme is valid:The only intervals that were changed are [j,k) and [b,i)

• Messages for nodes in [j,k) were routed through i and then made their way down to j. Now they are routed directly to j.

• Messages for nodes in [b,i) were routed throuh j and made their way up the tree to i. Now they are routed directly to i

Corollary: There exists a neighbourly scheme for any Hamiltonian graph

Page 20: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Scheme indices

The index of a node in an ILS is the number of hops it takes a message sent by the node to itself to return to its sender

The index of an ILS is the maximum of indices of all the nodes

Proposition: a DFS scheme is of index 2 A message from a node i to itself can be routed only to a frond

or to the node’s father. In either case, the message returns immediately.

Page 21: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Insertion & connection of schemes

Definition: An ILS is sequential if each node i has a link labeled (i+1)mod N

Proposition: A valid ILS remains valid after cyclically shifting the labels of all nodes and links by a constant Because

Proposition: There exists an algorithm for updating a valid ILS after unit-link insertion of a node for every network G with a valid sequential ILS

),[),[ cbccjj

Page 22: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Insertion of nodes

If node x is to be inserted to node i, cyclically shift every node and link label until node i becomes node N-1. Label the new node by N. Label the link (N-1,N) by N and link (N,N-1) by 0.

0

1

2

3

6

4

5

1

0

2

0

4

3

4

6

5

6

0

6

2

0

65

5

6

0

1

4

2

3

6

5

0

5

2

1

3

4

4

4

5

6

2

0

437

76

Page 23: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Insertion of nodes (2)

Routing within the old network is unchanged except for node N-1

Because the scheme is sequential node N-1 has a link to 0. If β is the maximum link label at node N-1 before the addition of the new node, the only interval that is affected at node N-1 is [N-1,N).

If β is the maximum link label at node i, then all messages to N will be routed through this link. But so will all messages to N-1. So the messages to N will follow the same route as messages to N-1. From N-1 they will reach N in one hop.

Corollary: A DFS scheme remains valid after a unit-link insertion of a node.

β NN-1α

Page 24: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Insertion of nodes(3)

The previous algorithm does not work if the new node is connected through multiple links.

Definition: A zero-biased ILS is an ILS in which every node has a zero link with the possible exception of the zero node.

Unlike sequentiality, the zero-biasedness is not preserved under arbitrary cyclic shifts.

Proposition: There exists an algorithm for updating a zero-biased ILS after multiple links insertion of a node if that node has a link to node N-1. Label the new node N and connect all links, labeling linke (i,N) by N and

linke (N,i) by i The zero link guarantees that the only messages routed to N are

messages intended for N Messages to the new node N will either get routed throug N-1 or directly

through one of the new fronds

Page 25: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Connecting two networks

Theorem: There exists an algorithm for constructing a valid ILS for the unit-link connection of two arbitrary sequential ILS. Cyclically shift G1 so that the node that connects to the second

graph is labeled N-1. Cyclically shift G2 so that the node that connects to G1 is labeled

0 and then add N to all node and link labels Relabel all links with value N in G2 to 0, except at node N

Label the link between G1 and G2 (N-1,N) by N and link (N,N-1) by 0.

Page 26: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Leader election using an ILS

We can utilisze the information embedded in the ILS it is possible to solve the leader election problem

The approach : nodes send a probing message via the maximum link

Lemma: In a ring network with a valid ILS of index 2 if every node sends a probing message via the maximum link, either the maximum node or one of its neighbours must eventually receive two probing messages If any other node is connected by maximum links to both its neighbours

the scheme is not valid If all nodes’ maximum links are in the same direction the scheme is not

of index 2

Page 27: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Leader election using an ILS - a ring

Theorem: There is an algorithm for locating the maximum node in a ring network of N nodes with a valid ILS of index 2 that uses at most 2N+1 messages Every node sends a probing message containing its identification

number to one of its neighbours and a regular awake message to the other neighbour.

The node that receives two probing messages compares the identification number of the three nodes and decides if it is the leader or one of its neighbours

Since every node sends 2 messages and there may be one extra message to inform the leader the bound is 2N+1

Page 28: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

Leader election using ILS – general graph

Theorem: There is a distributed algorithm for locating the maximum node in a general network of N nodes given a valid ILS of index 2. This is achieved in at most 2E+N exchanges of message. Let every woken node send a probing message through its maximum

link and a regular awake message on all other links. The node then awaits messages from all its neighbours. Every node computes the maximum in its 1-neighbourhood and sends

the computed result to the neighbour via the maximum link The node that receives its own identification back again as a processed

maximum declares itself the leader There can be at most one such node because the ILS is valid There is at least one such node because the ILS is of index 2

Page 29: Interval Routing Presented by: Marc Segal. Motivation(1) In a computer network a routing method is required so that nodes can communicate with each other

References

“Interval Routing”, J. Van Leeuwen and R.B. Tan, The computer Journal Vo. 30 No.4 , p. 298-307, 1987

“Linear Interval Routing”, Erwin M.Bakker, Jan Van Leeuwen and Richard B. Tan