The problem we shall discuss here is of routing message packets in a parallel computer, which we model as a directed graph: each vertex is a processor, and each edge is a one-way communication link. We suppose this system is synchronous, and that at most one packet can be sent on a link per time step. Thus, if several packets are routed through a certain link at the same time, a queue will result, and there will be delays. We want to minimize delays with routing strategies that can be implemented in a distributed sense. We follow the presentation in Motwani and Raghavan's book Randomized Algorithms , and begin with a common topology in parallel computers and some general concepts.
Definition 13453
Let the n-dimensional hypercube be the graph where the vertex set is the set of bit-strings of length n, and where there are directed edges between two vertices if they differ in exactly one bit.
Let the route of a packet be the path it takes from its origin to its destination. We call a routing strategy oblivious if this route is a function only of the origin and the destination. For a hypercube, we can easily find an oblivious routing strategy:
Definition 13462
We shall do oblivious routing in the hypercube as follows: Let i be the origin and d the destination of a packet p. Notice that in the hypercube, by flipping a bit of a vertex, we get an adjacent vertex. So consider the bits where i and d differ. We get a path from i to d by flipping each of these differing bits, one at a time. Let the route of p be the path that results from flipping these bits in order.
For this strategy we have a simple lemma:
Lemma 13469
Let
and
be the routes of two packets.
and
may have a common (directed) subpath. However, once
and
separate, they do not rejoin.
Proof. Let
and
have the edge e = (u,v) in common.
Let (v, w1) be the next edge in
and let (v, w2) be
the next edge in
. Going to w1 means flipping a bit in
v at some position b1, and going to w2 means flipping a bit
in v at some position b2. If
, then
. Let b be the minimum of b1 and b2. Then w1 and
w2 differ at position b, and neither in
nor in
will there be any later change in this position.![]()
We now turn to a specific problem.
Definition 13498
In the permutational routing problem, a graph is given along with a
permutation
of its vertices. At each vertex i, there is a
packet pi with destination
.
Theorem 13501 (Valiant and Brebner)
For the permutational routing problem on hypercubes, there is a randomized oblivious strategy taking O(n) steps, where n is the dimension of the hypercube.
Proof. The protocol works as follows: Each vertex i picks, for its
packet, an intermediate destination
at random. Then, in
a first phase, pi (with the final destination attached) is sent
to
with the oblivious routing strategy described above
for hypergraphs. In a second phase, using the same strategy, pi
is sent on to di. However,
is not instructed to
forward pi immediately, but to wait (probably) until some time
when it is almost certain that all other packets have also reached
their intermediate destinations. (Provided they have, phase one and
phase two will not interfere.)
In the following lemmas, we analyze an arbitrary phase under the assumption that the other phase does not interfere.
Lemma 13521
For each i, let
be the route of pi in the concerned
phase. Then, for a particular i, let S be the set of packets,
other than pi, whose routes have at least one edge in common
with
. Obviously, these are the only packets that can
delay pi on its route
. In fact, the delay incurred by
pi is at most |S|.
Proof. Let
be the sequence of edges in
, and let the routing start at time 1. Then, as long as pi is not
delayed, it traverses et at time t. Naturally therefore, if
pi is waiting to traverse ej at time t, we define its lag
at t to be t-j. To facilitate the following argument, we make
the same definition for packets in S. Also for a packet in S,
we say that it leaves
when it traverses an edge of
for the last time. Notice that the lag of pi is zero
initially, and that the total delay incurred by pi is its lag
when it traverses ek.
We now prove the lemma by showing that for each increase in the
lag of pi, there is at least one packet in S that leaves
(and, by definition, does not come back). So assume that
the lag of pi has just increased from l to l+1. Thus there
is some packet in S that just traversed the edge that pi is
in line for. This traversal occurred with lag l.
Let t be the last time step at which there is a packet in S
with lag l. Thus there is a packet
traversing an edge
ej with lag l at time t. The next edge in the route of p
cannot be ej+1 though, since then p or some other packet in
S would traverse ej+1 at time t+1, obviously with lag
l, and thus contradicting our assumption about t. According to
Lemma 14.1, ej therefore is the last edge in the
route of p that is also in
. In other words,
leaves
, and it does so with lag l.
![]()
Lemma 13576
For an edge e, let T(e) be the number of routes (in the
concerned phase) that pass through e. Then, the expected value
of T(e),
, is 1/2.
Proof. We let n be the dimension of the hypercube. The number of
vertices is N=2n, and the number of edges (directed) is Nn.
Since intermediate destinations are just random bit strings, the
expected length of a route is n/2, and the expected total route
length is Nn/2. By symmetry,
is independent of
e. It follows that
. ![]()
Lemma 13588
With probability at least 1 - 2-2n, every packet reaches its destination (in the concerned phase) in at most 4n steps.
Proof. For each i, let
be the route of pi. Also let
Hij be 1 if
and
have some edge in common,
and 0 otherwise. Then, for a given i, Lemma 14.2 shows that
the delay incurred by pi is at most
. To study this sum, we begin by fixing
. Then,
the terms of H are mutually independent, and we can apply the
Chernoff bound. With
denoting the expectancy of H, we
have, for any
:
![\begin{displaymath}
\ensuremath{\mathrm{Pr} [H \gt (1+\delta)\mu]} <
\left[ \f...
...} <
\left[ \frac {e}{(1+\delta)} \right] ^ {(1+\delta)\mu}.
\end{displaymath}](img365.gif)
![]()
We therefore bound
. For an edge e, let
T'(e) be the number of routes, other than
, that pass
through e. Then

![]()
Hence,
satisfies
, and we can say
that
. That is, we have shown that the
probability that packet pi is delayed more than 3n time units
is less than 2-3n. Since there are 2n packets altogether,
we find that with probability at least 1 - 2-2n, no packet is
delayed more than 3n time units, or equivalently, needs more
than 4n time units to complete its route.
![]()
To complete the proof of Theorem 14.1, we define that vertices
shall wait until 4n steps have elapsed before they start phase
2. Lemma 14.4 then shows that all packets will complete both
phases in at most 8n steps with probability at least 1 -
21-2n, that is, at least 1 - 1/N, where N=2n is the number
of vertices in the hypercube.![]()