# Permutation Routing over Sparse Networks Presented by Nithish Kumar - PowerPoint PPT Presentation

## Permutation Routing over Sparse Networks Presented by Nithish Kumar and Shubhang Kulkarni Presenter: Nithish Kumar Routing Algorithm Given a network topology, a routing algorithm specifies, for each pair of nodes, a route - or a sequence of

1. Permutation Routing over Sparse Networks Presented by Nithish Kumar and Shubhang Kulkarni

2. Presenter: Nithish Kumar

3. Routing Algorithm • Given a network topology, a routing algorithm specifies, for each pair of nodes, a route - or a sequence of edges - connecting the pair in the network. • The algorithm may also specify a queuing policy for ordering packets in the switches' queues. For example. the First In First Out (FIFO) policy orders packets by their order of arrival. The Furthest To Go (FTG) policy orders packets in decreasing order of the number of edges they must stiII cross in the network.

4. The Model • We model a communication network by a directed graph on N nodes. Each node is a routing switch. A directed edge models a communication channel, which connects two adjacent routing switches. • We consider a synchronous computing model in which (a) an edge can carry one packet in each time step and (b) a packet can traverse no more than one edge per step.

5. The Model • We assume that switches have buffers or queues to store packets waiting for transmission through each of the switch's outgoing edges. • The measure of the performance of a routing algorithm on a given network topology is the maximum time - measured as the number of parallel steps - required to route an arbitrary permutation routing problem.

6. The Permutation Routing Problem • In the permutation routing problem • each node sends exactly one packet • each node is the address of exactly one packet. • If the graph is complete, routing the permutation can be done in just one step. • But most graphs are sparse and packet routing on such networks often leads to congestion and bottlenecks.

7. Hypercubes The n-dimensional hypercube (or n-cube) is a network with N = 2 n nodes such that node X has a direct connection to node Y if and only if X and Y differ in exactly one bit.

8. Hypercubes

9. Permutation Routing in Hypercubes • We analyse a hypercube with N processors and O(N log N) edges. • The total number of directed edges in the n-cube is 2nN. since each node is adjacent to n outgoing and n ingoing edges. • The diameter of the network is n; that is, there is a directed path of length up to n connecting any two nodes in the network, and there are pairs of nodes that are not connected by any shorter path(for instance take 00..0 and 11...1).

10. Bit-Fixing Routing Algorithm

11. Bit Routing Algorithm – Bad Case • The above algorithm may lead to lot of congestion in specific permutations. Consider the following example. • Suppose that n is even. Write each source node s as the concatenation of two binary strings a s and b s each of length n/2. Let the destination of s's packet be the concatenation of b s and a s . This permutation will take Omega(sqrt(n)).

12. Two Phase Routing Algorithm

13. Two Phase Routing Algorithm In some sense, this is similar in spirit to Quicksort. For a list already sorted in reverse order, Quicksort would take O(n 2 ) comparisons, whereas the expected number of comparisons for a randomly chosen permutation is only O( n log n). Randomizing the data can lead to a better running time for Quicksort. Here, too, randomizing the routes that packets take - by routing them through a random intermediate point - avoids bad initial permutations and leads to good expected performance.

14. Two Phase Routing Algorithm The two-phase routing algorithm is executed in parallel by all the packets. The random choices are made independently for each packet. Our analysis holds for any queueing policy that obeys the following natural requirement: if a queue is not empty at the beginning of a time step, some packet is sent along the edge associated with that queue during that time step. We prove that the above routing strategy achieves asymptotically optimal parallel time.

15. Presenter: Shubhang Kulkarni

16. Main Result Theorem In any permutation routing problem, the two-phase routing scheme routes all packets to their destinations in 𝑷(𝒐) time steps with high probability v Analyze time for Phase I and argue Phase II by symmetry v Assume no packets start at Phase II until completion of Phase I

17. Technique Overview Time for Phase I ≤ Time for any packet to reach destination ≤ Number of times its path is touched by any packet ≤ Number of times any path is touched by any packet ≤ (Our Bound) 30𝑜 w.h.p. Pr 𝐵𝑜𝑧 𝑞𝑏𝑢ℎ 𝑢𝑝𝑣𝑑ℎ𝑓𝑒 > 𝑐𝑝𝑣𝑜𝑒 ≤ Pr 𝑓𝑤𝑓𝑜𝑢 + Pr 𝐵𝑜𝑧 𝑞𝑏𝑢ℎ 𝑢𝑝𝑣𝑑ℎ𝑓𝑒 > 𝑐𝑝𝑣𝑜𝑒 𝑓𝑤𝑓𝑜𝑢]. = ≤ Very small > ?

18. � � Preliminary Notation v 𝑁: Packet v 𝑓: Edge v P: Path (sequence of edges) v 𝑈 𝑁 : Number of time steps for 𝑁 to reach destination v 𝑈 𝑄 : Number of times edges of 𝑄 are used v 𝑂 𝑓 : Number of packets traversing over edge 𝑓 In each time step, 𝑁 halts at a node, or traverses an edge. Let 𝑓 = 𝑓 > ⋯ 𝑓 J be the edges traversed by 𝑁 𝑈 𝑁 ≤ E 𝑂(𝑓 F ) FH= Let 𝑄 = 𝑓 = 𝑓 > ⋯ 𝑓 J be any valid path by the bit fixing algorithm 𝑈 𝑁 ≤ 𝑈(𝑄) Time for a packet is upper bounded by number of times its path is touched 𝑈 𝑄 = E 𝑂(𝑓 F ) FH=

19. Active Packets Path 𝑄 is a possible packet path if it may be the outcome of the bit fixing algorithm Fix a possible packet path 𝑄 = 𝑤 L 𝑤 = ⋯ 𝑤 J . A packet 𝑁 is active at 𝑤 F if the following two conditions happen: 1. 𝑤 F and 𝑤 FM= differ in 𝑘 QR bit 𝑘 1 2 ⋯ ⋯ ⋯ 𝑜 ⋯ ⋯ 𝑤 F Differ in 𝑘 QR bit 𝑤 FM= 2. Packet 𝑁 does not have its 𝑘 QR bit fixed by the bit fixing algorithm Less than 𝑘 bits of 𝑁 have been fixed • 𝑁 comes from a distance less than 𝑘 to 𝑤 F • A packet is active if it is active at any node 𝑤 F

20. Bounding Active Packets For every vertex 𝑙 ∈ 𝑂 , define the indicator variable 𝐵 V as follows: … If packet starting at node 𝑙 is active 1 𝐵 V = 0 … Otherwise 𝐵 V are independent as Depend only on intermediate destination • Choice of intermediate destination is independent for each packet • V 𝐵 = E 𝐵 V Is the total number of active packets FH= 𝐹 𝐵 = ?

21. Bounding Active Packets Source of P 𝑡 𝑡 𝑡 = 𝑡 𝑡 Z [M= [\= [ v A packet can arrive at 𝑤 F only if it starts from ∗ ⋯ ∗ 𝑡 [ ⋯ 𝑡 Z 𝑡 𝑢 [\= 𝑢 = 𝑡 𝑤 F 𝑡 Z [M= [ v A packet actually arrives at 𝑤 F only if its random 𝑄 destination is (𝑢 = ⋯ 𝑢 [\= ∗ ⋯ ∗) 𝑡 𝑢 [\= 𝑢 = 𝑢 [ 𝑤 FM= 𝑡 Z [M= 𝑢 [M= 𝑢 [\= Destination of P 𝑢 = 𝑢 [ 𝑢 Z Total number of possible arrivals ≤ 2 [\= 1 Pr 𝑏𝑠𝑠𝑗𝑤𝑗𝑜𝑕 𝑏𝑢 𝑤 F 𝑏𝑠𝑠𝑗𝑤𝑏𝑚 𝑗𝑡 𝑞𝑝𝑡𝑡𝑗𝑐𝑚𝑓] = 2 [\= 𝐹 𝑂𝑣𝑛𝑐𝑓𝑠 𝑝𝑔 𝑏𝑑𝑢𝑗𝑤𝑓 𝑞𝑏𝑑𝑙𝑓𝑢𝑡 𝑞𝑓𝑠 𝑤𝑓𝑠𝑢𝑓𝑦 ≤ 1 𝐹 𝐵 ≤ 1 ⋅ 𝑛 ≤ 𝑜 We found our event! Pr 𝐵 ≥ 6𝑜 ≤ 2 \hZ By Chernoff Bounds

22. Bounding Path Time v We now know that Pr 𝑏𝑑𝑢𝑗𝑤𝑓 𝑞𝑏𝑑𝑙𝑓𝑢𝑡 ≥ 6𝑜 ≤ 𝑡𝑝𝑛𝑓𝑢ℎ𝑗𝑜𝑕 𝑢𝑗𝑜𝑧 v We can now bound the time for Phase I conditioning on high probability complement event v Use following inequality to get final bound: j] Pr 𝑅 j ≤ Pr 𝑅 + Pr 𝑄 𝑅 j] Pr 𝑄 = Pr 𝑄 𝑅] Pr 𝑅 + Pr 𝑄 𝑅 P ∶ 𝐹vent that T P ≥ 𝑑𝑜 Q ∶ 𝐹𝑤𝑓𝑜𝑢 𝑢ℎ𝑏𝑢 𝐵 ≥ 6𝑜

23. Bounding Path Time Observation 1: Due to the ordering of bit fixing, a packet that leaves 𝑄 cannot return to 𝑄 in this phase Observation 2: = An active packet at 𝑤 F , crosses the edge (𝑤 F , 𝑤 FM= ) with probability at most > Can be thought of as flipping fair independent coins to generate next co-ordinate Lemma: Probability that the active packets cross edges of 𝑄 more than 30𝑜 times is less than probability that a fair coin flipped 36𝑜 times comes up heads fewer than 6𝑜 times

24. Bounding Path Time Trial: each point in the algorithm where an active packet on path P, might cross an edge of P successful if packet leaves path trial failure if packet stays on path Since packet leaves 𝑄 on a successful trial, there can be at most 6𝑜 successful trials (due to our condition event!) Let 𝑌 F be the number of transitions that the 𝑗 QR packet makes on 𝑄 . = Then 𝑌 F is a geometric random random variable with probability of success > Let 𝑇 hZ be an upper bound on the total path time hZ 𝑇 hZ = E 𝑌 F FH=

25. Bounding Path Time Let 𝑇 hZ be an upper bound on the total path time hZ 𝑇 hZ = E 𝑌 F FH= Let 𝑎 be the number of heads in 36n fair coin flips y wx? y z Thus, Pr 𝑈 𝑄 ≥ 30𝑜 𝐵 ≤ 6𝑜] ≤ Pr 𝑇 hZ ≥ 30𝑜 ≤ Pr 𝑎 ≤ 6 ≤ 𝑓 \ … by Chernoff bounds y y wx? y z = 𝑓 \{Z ≤ 2 \|Z\= On simplifying we get that: 𝑓 \ y Time for our favorite inequality to get the desired bound!