CMPT 408: Theory of Computer Networks Prof

CMPT 408: Theory of Computer Networks Prof. Funda Ergun
Lecture 10: Total Wait Time For Random Routing On A Hypercube.
September 28, 2004 Scribe: Christian Milne

Expectation:

Expectation with a random variable:

Win $5 p = 0.3

Lose $3 p = 0.7

X = 5 with probability 0.3

-3 with probability 0.7

E[X] = 5(0.3) – 3(0.7) = 1.5 – 2.1 = -0.6

Expected Value:

The expectation of a number of random variables is the sum of the expectation of each variable.

E[X] = Σi i ·Pr[X = i]

E[Σi Xi ]i = Σi E[X]

Ex. You go to a casino and play each game i..j with individual probabilities Pi … Pj. The total probability of winning is the sum of all the probabilities for each game.

From Last Class Remember: When using random routing in a hypercube, 2 paths that diverge cannot re-converge.

Let p be an arbitrary path from s to t.

P = X1, X2, … , Xk k <= d.

Lemma: Let S be the set of paths that intersect p. The “Waiting Delay” (due to congestion) experienced on p <= |S|.

Therefore, the total waiting time = k + “Waiting Delay”.

Proof:

Note: Due to the previous Lemma, another path can “join” p at most once.

Delay – How is delay caused?

1.  Another packet with higher priority than ‘our packet’ enters p at the same point. Our packet waits. In this case, mark the entering packet.

2.  Our packet might have to wait for another packet on p because the other packet is stalled due to somebody else entering p. Mark the entering packet.

(# of marks = total delay).

Our packet is delayed at most one step for each new path joining p (call that path pi). There are |S| of these paths.

Therefore the total delay <= 1 step for each new path |S|.

Next, we will attempt to bound |S|.

|S| = # of paths sharing an edge with p.

Random Variable: Hij = {1 if pi and pj share an edge.

{0 otherwise.

Delayi <= Σi…n Hij <= Σ(i=1)…k T(ei) = the count of all paths sharing each link.

T(ei) = the number of paths that go through edge i.

Now bound these values:

E[Delayi] <= E[Σ(i=1)…k T(ei)] = Σ(i=1)…k E[T(ei)]

Note the key observation that E[T(ei)] = E[T(ej)] for any i, j. That is to say that the expected number of paths crossing any edge i, is the same as the expected number of paths crossing at any other edge j.

This is due to randomness and symmetry of the Hypercube.

Fact: The average expected path length in a hypercube is d/2.

Therefore, the expected value for the total number of edges used for the entire routing is:

E[Σp length of p] = Σp E[length of p] = Σp d/2 = N·d/2

Now we must determine how many paths per edge is expected. Since there are N·d edges in the hypercube, and there are N·d/2 edges expected to be used in the routing, then the expected use of each edge is:

E[# of paths per edge] = E[T(ei)] = ½

Therefore:

E[Delayi] = Σ(i=1)…k E[T(ei)] = Σ(i=1)…k ½ = k/2 <= d/2

But we must remember that this is not a complete solution to the problem yet because paths may be short on the average. To make this solution complete, we must be able to conclude that all paths are short.

Attempt to prove that ‘all’ paths will be short:

The probability that you will get something different from the expected value is very small.

Chernoff Bound: [Σ(j=1)…n Hij > ( 1 + δ )·μ] <= 2-(1+δ)·μ

This inequality determines the probability that an actual value will be off by more than: ( 1 + δ )·μ.

μ = the expected value = d/2.

Set δ = 11.

Therefore:

The probability that the actual value of Hij will be off by more than 6d is less than or equal to 2-6d.

[Σ(j=1)…n Hij > 6d ] <= 2-6d.

Therefore, with a probability of 1 – 1/(26d), each path will have at most 6d steps to wait.

Union Bound: If you have n events each of which have individual probabilities of less than q that they will have a bad outcome, the total probability of at least one bad outcome is q times n.

We have n events, each with Pr [bad outcome] < q

Pr [>= 1 bad outcome] < q·N.

We have a total of n = 2d paths. Therefore, by the union bound:

Pr [at least one has > 6d weight] < N/(26d) = 2d/(26d) = 1/(25d)

Therefore, for each phase, everyone will finish quickly with a probability of >= 1 – 2-5d.

And for both phases of the routing algorithm, everyone will finish quickly with a probability of 1 – 2·2-5d = 1 – 2-5d+1 >= 1 – 2-d.

So we can conclude that with very high probability, everyone will wait at most 12d steps. Since everyone travels at most 2d steps, then the total time will be at most 14d steps.