Online-outing on the buttefly netwok: obabilistic analysis Andey Gubichev 19.09.008 Contents 1 Intoduction: definitions 1 Aveage case behavio of the geedy algoithm 3.1 Bounds on congestion................................ 3. Bounds on unning time............................... 5 3 Conclusion 7 4 Bibliogahy 7 1 Intoduction: definitions In this talk we will examine the aveage-case behavio of the geedy algoithm in buttefly netwok. Let us fist intoduce some useful notions and give simle examles. Definition 1 (Buttefly). The -dimensional buttefly consists of (+1) nodes and +1 edges. A node is a ai w, i, i is the level of the node, w is the ow numbe (-bit). An edge links two nodes w, i and w, i if and only if i = i + 1 and eithe w = w, o w and w diffes in the ith bit. Figue 1 shows an examle of 3-dimensional buttefly. The acket outing oblem is the oblem of outing N ackets fom level 0 to level in a -dimensional buttefly. Each acket u, 0 has its own destination π(u), whee π : [1, N] [1, N] is a emutation. The most commonly used emutations ae the bit-evesal emutation: π(u 1 u ) = u u 1, 1
Figue 1: Thee-dimensional buttefly. and the tansose emutation: π(u 1 u u +1 u ) = u +1 u u 1 u We will insist that ou outing algoithms be on-line: thee is no global contolle that can ecomute outing aths, each node decides what to do with a acket that ass though it based on its local contolle and infomation fom acket. Definition. The geedy ath fom u, 0 to v, is the unique ath of length fom the fist node to the second node. The geedy algoithm is the algoithm that constains each acket to follow its geedy ath. The congestion oblem is that many ackets might ass though a single node o edge, but only one acket can use the aticula edge o node at a time. Theoem 1. The geedy algoithm will oute N ackets to thei destinations in a -buttefly in O( (N)) stes. In fact, the bit-evesal emutation and the tansosal emutation ae the wost-case emutations fo geedy outing. In the following section we will find out that in aveage case the geedy algoithm behaves much bette.
Aveage case behavio of the geedy algoithm We will divide ou analysis into two ats. Fist of all, we will bound the congestion. If we obtain the bound C fo congestion, we will automatically have a bound fo the unning time: (C 1). In the second at we will get a tighte bound fo the unning time. In this section we conside the outing oblem fo which each acket has a andom destination (destinations ae selected indeendently and unifomly fom among the N ossible oututs). Hee we also allow moe than one acket to stat at each inut (denote by the numbe of ackets at each inut)..1 Bounds on congestion Theoem. Fo all but at most a 1/N 3/ faction of the ossible outing oblems with ackets e inut in a -dimensional buttefly at most C ackets ass though each node duing a geedy outing whee e, if C = ( ) e / log, if Poof. Ou main aim hee is to bound the obability P (v) that o moe acket aths ass though some node v fo each > 0 and fo each node fom -dimensional buttefly. Let v be the node on ith level of the buttefly. Thee ae i inuts that can each v and i = N i choices of destinations that can cause the acket to ass though v. Since we choose destinations andomly among N destinations, the obability fo each of i ackets to ass though v is N i /N = i. A simle illustation is given on figue. If o moe ackets ass though v, then thee exists a subset of ackets and all of them must ass though v: ( ) ( ) i P (v) ( i ) i e i = ) The ue bound does not deend on v, i. Hence, the obability that o moe ackets ass though all nodes in the buttefly is at most N (e/). This bound deceases if inceases. If, let = e and we get ) ( ) e 1 N N = N 1 e 1/N 3/ In case that let = e log( ) and x = : N ) ( ) e = N x 3 e log(x/ ) = N N
Figue : Choices of inuts and destinations that cause the acket to ass though v The minimum fo log(x/ ) whee x occus if = e: These facts comlete the oof. e log(x/ ) N N N N e+ 1/N In fact, the faction of "bad" outing oblems can be made abitay small. Coollay 1. α the congestion fo all but 1/N α oblems is at most O(α) + o(α ) Poof. In ode to ove it we can modify the evious oof. If let = eα = O(α): ) N N α If let = e log( ) = o(α ): ) N N α Now we see that outing oblems with bit-evesal emutation and tansose emutation ae incedibly ae: fo 99% of all outing oblems at most C + O(1) ackets ass though any node duing the outing. 4
Let us conside two secial cases of the theoem. If = 1, we have a single N-acket outing oblem. With high obability, the maximum numbe of ackets that ass though any node is O(/ log ) with high obability. The second case is when = Θ(), and we have Θ(N ) ackets on an N - node buttefly. At most O() ackets ass though any node with high obability.. Bounds on unning time If two o moe ackets ae waiting to exit a node, we need to secify a otocol fo deciding which acket will exit the node fist. We will use a andom-ank otocol in such cases: assign a andom ioity key (P ) [1, K] to each acket P define a total ode on ackets: t(p ) is the ank of P define w(p ) = ((P ), t(p )). If P/ = P, we say that w(p < w(p ) if and only if (P ) < (P ), o (P ) = (P ) and t(p ) < t(p ). if thee is a collision, we choose the acket with minimal w Conside the outing oblem with congestion C. Let P 0 be the last acket to each its destination v 0 at time T. It was delayed at v 1, l 0 is the numbe of stes in ath v 1 v 0. P 0 was delayed duing the ste T l 0. Let P 1 be the acket esonsible fo delaying P 0. Next ecod the ath of P 1 fom the time it was last delayed befoe ste T l 0 until the ste T l 0. Let l 1 be the numbe of edges in this ath and v the node whee P 1 was last delayed at ste T l 0 l 1 1. We oceed to ecod the sequence of delays and emove eeated nodes. We get delay ath P = v 0 v 1... v s - a simle ath of length. An examle of the delay ath is given on figue 3. Each acket on the figue 3 consists of the destination (binay numbe),the name and the andom ank. It is obvious that T l 0 l 1 l s (s 1) = 1 and l 0 + + l s =. Hence, T = s +. An active delay sequence consists of a delay ath P integes l 0 1, l 1 0,..., l s 1 0, l 0 +... + l s 1 = nodes v 0,v 1,...,v s : v i is the node of P on level l 0... l s 1 diffeent ackets P 0, P 1,..., P s : the geedy ath fo P i contains v i keys k 0, k 1,..., k s fo the ackets: k s k s 1... k 0, k i [0, K] and (P i ) = k i fo 0 i s. 5
Figue 3: Delay ath Thee exist lots of ossible delay sequences. The obability that (P i ) = k i fo 0 i s is K (s+1). Thee ae N ossible delay aths (they ae uniquely defined by endoints). Thee ae ( ) s+ s 1 choices fo l0,..., l s : thee is one-to-one coesondence between choices fo l i and (s + )-bit binay sting t with s 1 zeos, whee l i is the numbe of "1" between (i + 1)st and (i + )nd zeos in the sting 01t0 Since we fix P and l i s, the nodes v i ae detemined. Then thee ae at most C choices fo any P. Hence, thee ae at most C s+1 choices fo all ackets. We also have ( s+k s+1) ways to choose k 0,..., k s such that k s k s 1 k 0 and k i [1, K]: thee is one-to-one coesondence between choices fo k i and (s + K)-bit binay sting u with s + 1 zeos, whee k i is the numbe of "1" to the left of the (s + 1 i)th zeo in the sting 1u. Put it all togethe: the obability that thee is an active delay sequence with s + 1 ackets is at most ( ) ( ) s + s + K N C s+1 K (s+1) s 1 s + 1 We can show that if K = s + 1 = 8eC, and C, this obability is at most ( ) K 4eC N 3 N 3 4e = o(n 7 ), K and if K = s + 1 = 8e / log ( ) C, and C, this obability is at most ( ) K 4eC N 3 o(n 1 ) K Ou esult is that with high obability thee is no active delay ath with s + 1 ackets, whee 6
8eC, if C s + 1 = ( ) 8e / log, if C C Since T = + s, we get O(C) +, if C T = ( ) O(/ log ), if C C This fact comletes the analysis. 3 Conclusion "Tyical" outing oblem in actice ae not at all the same as "tyical" outing oblems in a mathematical sense: while the latte ae likely to have a easonable unning time, the fome have vey bad estimation of unning time. 4 Bibliogahy 1 F. T. Leighton. Intoduction to Paallel Algoithms and Achitectues: Aays, Tees, Hyecubes. Mogan Kaufmann Publ., 199 Fiedhelm Meye auf de Heide. Kommunikation in Paallelen Rechenmodellen. 7