Routing and Job-shop Scheduling in O(congestion

2)L 0 such packets. Thus, w.h.p. the number of packets that are actually scheduled to cross e during the frame is at most (1? 0)f(n), where 0 is a function of. The number of steps a packet takes during the frame is at most f(n)=g(n). Therefore, using the assumed algorithm, we can schedule all the path segments that fall into this frame so that each packet is delivered within (1 +)(1 ? 0)f(n) + 2f(n) f(n) steps, where the inequality is true under the assumption that is suuciently large. This schedule can be completed within the frame. 5 Distributed Execution In this section, we sketch the ideas used in implementing the above algorithms in a distributed fashion. The detailed algorithms will be presented in the full version of the paper. We assume that packets may carry a small amount of extra routing data. Individual nodes have access to the queues of the edges adjacent to them. They can decide to forward packets from incoming queues into outgoing queues, or leave packets in the incoming queues. Aside from data stored in the packets, no other data is communicated between nodes. At any given time, a node does not have access to data stored in packets that have not yet reached it. The distributed implementation is straightforward. Packets carry their path id and data used by the algorithm. We assume a global clock, so the partition into frames at all levels of the recurrence is known to all nodes. Other than the path, the only data needed for each packet is its current delay (given as the clock tick it's waiting for), and the level of the recurrence it's at. The algorithm run by each node is the following. At each time step, the node examines its incoming queues. Only packets that were waiting for the current clock tick need to be handled. There are two cases: Case 1: The packet is at the bottom level of the recurrence. In this case, the packet has to move to an adjacent node according to its path. Let's assume for a moment that indeed the node performs this move. Case 2: Otherwise, the packet's schedule has to be further reened. In this case, the node tosses the needed dice, and determines a further delay of the packet. If the reened level is the bottom of the recurrence, the packet is delayed till the rst …