Decentralized Search with Random Costs
A decentralized search algorithm is a method of routing on a random graph that uses only limited, local, information about the realization of the graph. In some random graph models it is possible to define such algorithms which produce short paths wh…
Authors: Oskar S, berg
Decen tralized Searc h with Random Costs Osk ar Sandb erg ∗ No v ember 2 1, 2018 Abstract A decentralized search algorithm is a metho d o f r outing on a ran- dom graph that use s only limited, lo cal, information ab out the r eal- ization of the graph. In some random graph mo dels it is pos sible to define suc h algorithms which pro duce short paths when routing from any v ertex to any other, while for others it is not. W e consider random gr aphs with random costs assigned to the edges. In this situation, w e use the metho ds o f sto chastic dynamic progra mming to crea te a decentralized search metho d which a ttempts to minimize the total cos t, rather than the num b er of steps, of each path. W e show that it succeeds in doing so a mong all decentralized search algo rithms which monotonically appr o ach the destina tion. Our algorithm depends on knowing the expected cos t of routing from every vertex to any other , but we show that this may b e ca lculated itera- tively , and in practice can be ea s ily estimated from the cost of previous routes and compressed in to a small routing table. The metho ds applied here can also b e applied directly in other situations, such as efficien t searching in g raphs with v arying vertex degr ees. 1 In tro duction Jon K leinb erg introdu ced the co ncept of decent ralized searc h algorithms in his celebrated 2000 pap er on the Small-W orld p henomenon [1]. I n particular, he sh o wed that in certain rand om graphs it is p ossible to fin d paths b et ween v ertices of p oly-loga rithmic length ev en when limited to usin g only lo cal kno wledge at eac h step, w hile in o thers it is n ot. Most of the b y now large canon of work in the area (see [2] for a recen t surve y) has b een ded icate d to finding and analyzing algorithms th at route b et w een t w o giv en v ertices in a small n umber of steps. T ypically , the b est ∗ The Department of Mathematical Sciences, Chalmers U nivers ity of T ec hnology and G¨ oteb org U nive rsity . ossa@math.chalme rs.se 1 1.42 12.34 1 2 3 4 5 6 7 8 9 Figure 1: If the goal is to reac h vertex 9 in the f ew est steps, then certainly v ertex 1 should c h oose the long edge to vertex 7. Ho w ev er, if the goal instead is to minimize the total cost, routing to 2 might b e a b etter c hoice. metho d in these situation is greedy: p rogress to the neigh b or w hic h is closest to the destination. I n this p ap er, we consider a generalized situation where the cost of p assing down an edge is not fixed, but ma y b e a random v ariable whose v alue is kn o wn when the c hoice of where to pro ceed to next is made. The goal is then the minim ize the cost of reac hing the destination, w hic h ma y lead to different priorities wh en routing (one m a y not wish to route to a v ertex v ery close to the d estination if the cost of passing down that edge is very high, see Figure 1). This is a pr oblem similar to that applied to time pr ocess in the field of sto c hastic dynamic pr ogramming [3], and we use similar metho ds. The basic id ea is this: If a v ertex kno ws the exp ected cost of eac h of h is neigh b ors r outing to the destination, and also the cost of h im routing to eac h of his neighbors , it makes sense for him to c h oose as the next step that neigh b or which min imizes th e sum of th ese tw o costs. While the exp ected costs are difficult to calculate analyticall y , w e fin d that th ere is little rea- son to do so. When m an y queries are p erformed, one ma y start by usin g an y guess as to these v alues, and th en up d ate these guesses based on past exp erience. W e w ill sho w analytically that this form of search is we ll defined, and that it is optimal among algorithms that monotonically app r oac h the destina- tion, as well as pr esenting some results on the order of the total cost as w ell as approximati on trade-offs. W e cont inue with a discussion and some exp erimen tation on th e p ractica lit y of th e app roac h. Finally , we apply the algorithm with greater generalit y , and see that it p erforms w ell also in these cases. In p articular, we note 1that it can b e applied to routing with non- homogeneous d egree distribu tions. 1.1 Previous W ork The original work on decen tralized searc h was done by Kleinberg in [1] and [4]. Muc h w ork has since b een don e on related problems, in particular further generalization of the results and imp ro vemen ts on the b ounds (see [5] [6] [7] [8] [9] f or some examples). 2 In a b id to improv e the p erformance of F r eenet [10], a decen tralized p eer- to-p eer net work, Clarke [11] prop osed an algorithm in some wa ys sim ilar to that present ed here u nder th e name “NG Routing”. The metho d was im- plemen ted in F reenet at the time, but has n ot b een u sed since the netw ork w as r e-engineered to r oute according to the metho d d escrib ed in [12]. W e b eliev e that the tec hn ical and architec tural problems exp erienced b y previ- ous versions of F reenet we re unrelated to w hat is discussed b elo w, and, in ligh t of our resu lts, that Clark e’s ideas were fu n damen tally soun d . S ¸ im¸ sek and Jens en also p rop osed an algorithm based on the same principles in [13], in tended for routing b ased on b oth verte x degree and s imilarit y . Their “exp ected-v alue na vigation” is b ased on the same idea as our cost- greedy searc h, ho w ev er they use a rough estimate of the exp ected r outing time, whic h cannot b e applied to our problem, to mak e the decisions. They present n o analytic results. F or our tak e on searc h in graphs with v ariable no de d egree, see S ection 6.2 b elo w. F or an int ro duction to the field of sto c hastic dynamic pr ogramming, see the monograph by Ross [3]. 1.1.1 A not e on terminology The terminology regarding algorithms for decen tralized path-findin g in ran- dom graphs has not yet settled, and different authors h a ve used differen t terms. W e hav e chosen the term “decen tralized searc h” (follo wing recen t w ork by Klein b erg [2]) bu t others terms hav e b een used to d escrib e the same thing. “Navi gation”, u sed in e.g. [4] [14], is quite common, b ut p erhaps not as d escriptiv e. W e av oid form ally calling our algorithms “routings” as this name has pr eviously b een used in computer s cience literature to d escrib e flo w assignmen ts through a graph with limited edge capacities (for example [15]), a different problem from that currently studied. Ho w ev er, we do use the terms “route” and “to route” follo win g their dictionary d efinitions. 1.2 Organization In S ectio n 2 we set out the b asic defin itions of decent ralized searc h, as w ell as rigorously defin e our new “cost-greedy” searc h algorithm. F ollo wing this, in Section 3 w e prov e the main resu lts regarding cost-greedy search in net works with sufficien t in dep endence. In Sections 4 and 5 we set out the metho ds for applyin g the r esults in p ractice, and, fin ally , in Section 6 we p erform sim ulated exp erimen ts to lo ok at the actual p erformance of the algorithm. 3 2 Definitions A cost graph G = ( V , E , C ) is a graph consisting of a vertex set V , a p ossibly directed set of edges E , and a colle ction of costs, C . F or ea c h elemen t ( x, y ) ∈ E , C ( x, y ) = C (( x, y )) is an i.i.d. p ositiv e random v ariable giving the cost of tra v eling down that edge (time tak en). G ma y b e a random graph, by wh ic h we mean that for eac h x, y ∈ V , there exists a random ind icator v ariable E x,y sa yin g wh ether there is an edge from x to y . These may b e dep endent and differently distrib u ted. Definition 2.1. F or a given c ost gr aph G , a z -searc h for a vertex z ∈ V , is a mapping A : V 7→ V such that: 1. A ( x ) = y only if ( x, y ) ∈ E . 2. A ( z ) = z . 3. F or al l x ∈ V ther e exists is k < ∞ such that A k ( x ) = z . A search of G is a c ol le c tion of z - r outing algorithms for al l z ∈ V . W e call d a distanc e on a set V if d : V × V 7→ R + , if for x, y ∈ V , d ( x, y ) = 0 implies that x = y , an d if for z , y , z ∈ V , d ( x, z ) ≤ d ( x, y ) + d ( y , z ) . A distance is th us a metric without the symmetry requiremen t. In particular, an y connected digraph G implies a distance d G . F or x ∈ V , N ( x ) = { y ∈ V : d G ( x, y ) = 1 } is the set of neigh b ors of x in G . Definition 2.2. A distanc e d is adapted f or searc h in a c onne cte d gr aph G if for every x, z ∈ V , wher e x 6 = z , ther e exists a y ∈ N ( x ) such that d ( y , z ) < d ( x, z ) . A distance function d is th us adapted for searc h if it, in some sen s e, r eflects the structure of G . The most ob vious example is of course d G itself, but d ma y also b e, for instance, graph d istance on any connected sp anning s ub- graph H of G . Another imp ortan t case is that if V is a set of p oin ts in a metric space, then the space’s m etric is adapted for searc h in V ’s Delauna y triangulation (see [9 ]). Definition 2.3. Given a c ost gr aph G , and a vertex z , a decen tralized searc h is a z -se ar ch A , such that for any x ∈ V the r andom variable A ( x ) is me asur able with r esp e ct to: 1. E x,y for al l y ∈ V . 4 2. C ( x, y ) for al l y ∈ N ( x ) . In tuitiv ely , th is means that as w ell as an y information ab out the graph mo del, routing at x m ay u se information ab out w hic h v ertices x do es (and do es n ot) h a ve ed ges to, as we ll as the costs of p assing down those edges. The definition of decen tralized s earch as originally giv en by Kleinb erg w as sligh tly broader than this, allo w in g a route started at a v ertex x to use all the information from A 0 ( x ) , A 1 ( x ) , . . . , A k − 1 ( x ) when taking its k -th step. Because ou r analysis will b e restricted to algorithms meeting the follo wing criteria, excluding this in formation will mak e little difference: Definition 2.4. Given a g r aph G , a distanc e d adapte d for se ar ch in G , and a ve rtex z , a forwa rd searc h is a z -se ar ch F such that for al l x ∈ V \{ z } d ( F ( x ) , z ) < d ( x, z ) . F or a giv en searc h A an d vertex z S z ( x ; A ) = in f k : A k ( x ) = z is the num b er of steps it take s to reac h z from x u sing A . Let T z ( x ; A ) = S z ( x ; A ) X i =1 C A i − 1 ( x ) , A i ( x ) whic h is the c ost . 2.1 Greedy and W eigh ted Greedy Searc h In th e follo win g, we fix z . Gr e e dy se ar ch is given by A G ( x ) = argmin y ∈ N ( x ) ( d ( y , z )) . (1) This is alw ays a d ecentrali zed searc h, and if d is adapted, than it is a forwa rd searc h (if d is not adapted, it ma y not b e we ll defi n ed to b egin with). Standard greedy searc h d o es n ot tak e the costs C in to accoun t. A v ariant that do es, is weighte d gr e e dy se ar ch . F or a giv en z , let w z ( x ) for x ∈ V b e a collectio n of we igh ts, where w z ( z ) = 0. These weig hts sp ecify a searc h algorithm A w ( x ) = argmin y ∈ N ( x ) ( C ( x, y ) + w z ( x )) (2) whic h may or may n ot b e we ll defined. I f w e restrict this to b eing a forward searc h , we get F w ( x ) = argmin y ∈ N ( x ) : d ( y ,z ) d ( x, z ) and d ( v , z ) > d ( u, z ), y ❀ x is indep enden t of v ❀ u if y 6 = v . Examples of s u c h grap h s are addin g outgoing edges from eac h ve rtex with destinations chosen indep endently (as in Klein b erg’s w ork [1 ]) or allo wing eac h edge, either seen as directed or undirected, to exist ind ep enden tly of all others (lik e in classical random graphs and long-range p ercolation [16]). W e call a grap h constructed in this manner e dge indep endent . Theorem 3.1. F or an e dge indep endent r andom gr aph G , ther e exists a solution ˜ w to e quation (4) so that c ost-gr e e dy se ar ch is wel l define d. ˜ w is a glob al ly attr active fix-p oint of the iter ation given b y w i +1 = E [ T z ( x ; F w i )] . (5) 6 Pr o of. Define the rank of x with resp ect to z , r z ( x ), as the p osition of x when all the elemen ts in V \{ z } are ordered by in creasing d istance f r om z , using s ome d eterministic tie-breaking ru le. Let r z ( z ) = 0. W e will pro ceed by ind uction on r z ( x ). Let w 0 b e an y we igh ting. Let x ∈ V such th at r z ( x ) = 1. F or an y forwa rd searc h F , F ( x ) = z , wh ence E [ T z ( x ; F )] d oes not dep end on the algorithm. In particular E [ T z ( x ; F w )] is do es not d ep end on w , whence w i ( x ) is constant for i ≥ 1. Let r z ( x ) = k , and assume that for all y ∈ V suc h that r z ( y ) < r z ( x ), w i ( y ) tak es the same v alue for all i ≥ k − 1. This means that E [ T z ( x ; F w i )] tak es the same v alue for all i ≥ k . It follo ws that for all x ∈ V w i ( x ) is fixed for i ≥ r z ( x ). Hence w k = w k +1 for all k ≥ n − 1 , and ˜ w = w n is a solution to (4). Theorem 3.2. L et G b e an e dge indep endent g r aph, and F a forwar d se ar ch for a vertex z ∈ V . Then for al l x ∈ V E [ T z ( x ; F ˜ w )] ≤ E [ T z ( x ; F )] wher e F ˜ w is c ost-gr e e dy se ar ch for z as in Definition 2.5. Pr o of. Use th e same definition of r z ( x ) as in the pro of of Theorem 3.1. Like there, w e will use indu ction on r z ( x ). If r z ( x ) ≤ 1, th en all forward searc hes from x are the same, and there is nothing to prov e. Let F b e an y forward search. Giv en x ∈ V , assume that for all y ∈ V suc h that r z ( y ) < r z ( x ), E [ T z ( y ; F ˜ w )] ≤ E [ T z ( y ; F )]. Let v = F ( x ) and v ∗ = F T ( x ), the places th e resp ective algorithms c h oose as th e next step. Belo w, w e mean by “lo cal kno wledge” that which decen- tralized algorithm may u s e, as giv en in 2.3. W e note, crucially , th at b ecause of our assumptions, T z ( v ; F ) is in d ep enden t of lo cal knowledge at x , while C ( x, y ) is measurable with resp ect to it. E [ T z ( x ; F )] = E [ E [ T z ( x ; F ) | lo cal kn o wledge at x ] ] = E [ D ( x, v ) + E [ T z ( v ; F )] ] ≥ E [ D ( x, v ) + E [ T z ( v ; F ˜ w )] ] ≥ E [ D ( x, v ∗ ) + E [ T z ( v ∗ ; F ˜ w )] ] = E [ T z ( x ; F ˜ w )] where the first inequalit y follo ws by induction sin ce r z ( v ) < r z ( x ) and the last b ecause the expression inside the first exp ectation is what v ∗ minimizes. 7 3.1 The Small-W orld Graph A p articular example graphs meeting th e criteria of the last chapter are the small-w orld augmenta tions first int ro duced b y Kleinber g [1]. This constru c- tion starts with a fixed fin ite grid H , letting d = d H , and creating G by adding a rand om outgoing directed edge f rom eac h v ertex x to destination a y with p r obabilit y P ( x ❀ y ) ∝ 1 /d G ( x, y ) α (6) d is naturally adapted for routing in G . F or simplicit y , w e let H b e a ring of n v ertices (Kleinb erg originally u s ed a t wo-dimensional squ are lattice, but the pro ofs are iden tical). Let G ( n, α ) b e the family of rand om graphs so constructed. Using previous results ab out greedy routing on suc h graph s, w e can calculate the cost order of cost-greedy searc h . In particular, we can see the order in n cannot b e differen t from greedy r outing. Theorem 3.3. (Kleinb er g) If G ∈ G ( n, α ) with α = 1 ther e exists N 1 such that f or n ≥ N 1 , E [ S z ( x ; A G )] ≤ k 1 log n log d ( x, z ) wher e k 1 is a c onstant indep endent of x , z , and n . F urther results ab out su c h graphs, prov ed in [5] and [17] r esp ectiv ely are Theorem 3.4. (Barr ier e et al.) If G ∈ G ( n, α ) with α = 1 , then ther e exists N 2 such that for n ≥ N 2 , E [ S z ( x ; A G )] ≥ k 2 log n log d ( x, z ) wher e k 2 is a c onstant indep endent of x , z , and n . Theorem 3.5. (Singh Manku) If G ∈ G ( n, α ) , with α ≥ 0 , then E [ S z ( x ; A G )] ≤ E [ S z ( x ; A )] for any x, z ∈ V ( G ) and de c entr alize d se ar ch A . T ogether, these allo w us to p ro ve the observ ation that Prop osition 3.6. If G ∈ G ( n, α ) and 0 < E [ C ( x, y )] < ∞ then E [ T z ( x ; F ˜ w )] = Θ(log n log d ( x, z )) 8 Pr o of. Th e upp er b oun d comes directly f rom Theorems 3.2 and 3.3, since E [ T z ( x ; F ˜ w )] ≤ E [ T z ( x ; A G )] = E [ C ( x, y )] E [ S z ( x ; A G )] ≤ E [ C ( x, y )] k 1 log n log d ( x, y ) . where the middle equalit y follo w s from the fact A G routes indep end en tly of the costs, and the simple form of W ald’s equation. T o pro v e th e up p er b ound, consider all edges in the graph as directed, letting the edges of the H b e denoted by doub le d irected edges. S ince a forw ard searc h can only ev er tra v erse an edge in one dir ectio n, this d o es n ot affect its cost. Now let R z ( x ; F ) = S z ( x ; A ) X i =1 C min ( F ( x ) i − 1 ) (7) where C min ( x ) = min { C ( x, y ) : y ∈ N ( x ) } . This count s, at eac h step, the minim um cost of an y outgoing edge, rather than the cost of the edge whic h w as actually used. Since the degree of eac h vertex is fixed, C min ( x ) is i.i.d. for all x . Let S i b e the σ -algebra generated b y all th e information seen in steps 1 , 2 , . . . , i of th e searc h (as listed in Definition 2.3). Note: • C min ( F i +1 ( x )) is ind ep endent of S i . • S z ( x ; A ) is a Stopp ing Time w ith resp ect to the filtration { S i } ∞ i =1 . Th us we ma y use W ald’s Equ ation to conclude that E [ R z ( x ; F )] = E [ C min ( x )] E [ S z ( x ; F )] . (8) W e n o w use the immediate fact that R z ( x ; F ) ≤ T z ( x ; F ), follo w ed by (8) and T heorems 3.5 and 3.4, to conclude E [ T z ( x ; F )] ≥ E [ R z ( x ; F )] = E [ C min ( x )] E [ S z ( x ; F )] ≥ E [ C min ( x )] E [ S z ( x ; A G )] ≥ E [ C min ( x )] k 2 log n log d ( x, z ) for suffi cien tly large n . Since this holds f or an y forward-searc h F , it holds in p articular for F ˜ w . Prop osition 3.6 tells u s that in this mo del, the order of cost-greedy routing will not b e different from that of greedy rou tin g. The pro of of the lo wer b ound assumes, how ev er, that E [ C ( x, y )] < ∞ and that the degree of eac h v ertex is b ounded as n gro ws. Neither of these things, and particularly not the latter, necessarily h old in applications. 9 3.2 Appro ximated W eigh t s W e consid er the situation when the solution ˜ w to (5) is not kno wn exactly but appro ximated b y an other set of we igh ts. Prop osition 3.7. If ˜ w is the solution to (5) and w another set of p ositive weights such that max x ∈ V | w ( x ) − ˜ w ( x ) | ≤ ǫ then for any e dge-indep endent gr aph of size n E [ T z ( x ; F w )] − E [ T z ( x ; F ˜ w )] ≤ 2 nǫ (9) and mor e gener al ly, for any k ≥ 0 E [ T z ( x ; F w )] − E [ T z ( x ; F ˜ w )] ≤ 2 ǫ ( k + n P ( S z ( x ; F w ) > k )) . (10) Pr o of. Let err w ( x ) = E [ T z ( x ; F w )] − E [ T z ( x ; F ˜ w )]. It follo ws th at E [ T z ( x ; F w )] = E [ C ( x, F w ( x )) + E [ T z ( F w ( x ); F w )]] = E [ C ( x, F w ( x )) + E [ T z ( F w ( x ); F ˜ w )]] + err w ( F w ( x )) = E [ C ( x, F w ( x )) + ˜ w ( F w ( x ))] + err w ( F w ( x )) . No w, since b y the definition of a wei gh ted greedy searc h C ( x, F w ( x )) + w ( F w ( x )) ≤ C ( x, y ) + w ( y ) for all y ∈ N ( x ) ≤ E [ C ( x, F ˜ w ( x )) + w ( F ˜ w ( x )) − w ( F w ( x )) + ˜ w ( F w ( x ))] + err w ( F w ( x )) ≤ E [ C ( x, F ˜ w ) + ˜ w ( F ˜ w ( x ))] + E | w ( F ˜ w ( x )) − ˜ w ( F ˜ w ( x )) | + E | ˜ w ( F w ( x )) − w ( F w ( x )) | + err w ( F w ( x )) ≤ E [ T z ( x ; F ˜ w )] + 2 ǫ + err w ( F w ( x )) It follo ws that for any k ≥ 0 err w ( x ) ≤ 2 ǫk + err w ( F k w ( x )) . (11) If k > S z ( x ; F w ) then F k w ( x ) = z and err w ( F k w ( x )) = 0, so (9) follo ws s ince n > S z ( x ; A ) for all searc h es. T o prov e (10), n ote that by th e same reasoning err w ( F k w ( x )) = err w ( F k w ( x ) | F k w ( x ) 6 = z ) P ( S z ( x ; F w ) > k ) . Since the graph is edge ind ep enden t err w ( F k w ( x ) | F k w ( x ) 6 = z ) is s imply the error f r om some p oint wh ic h is not z , bu t where (9 ) s till applies. 10 What the p rop osition, and in particular (11) sa y s is that if an appro ximation w of ˜ w is off by ǫ , then eac h step in the routing add s at most 2 ǫ to the optimal routing time. Th is is intuitiv ely clear, sin ce w hile F w ma y c ho ose the wron g v ertex in a given step, it can on ly do so wh en the total (actual) cost of routing via that v ertex is within 2 ǫ of the cost of routing via the real one. F or the same reason, it is unlik ely that a b etter b oun d can b e ac h iev ed without fu rther assumptions on the graph an d the cost distribution. 4 Calculating the W eigh ts Theorem 3.1 pro vides us with a metho d of calculating the weig ht s ˜ w f or cost-greedy searc h. One can start b y assigning any initial weigh ting w 0 , and then calculate w 1 , w 2 , . . . u s ing (5). A closed analytic form for E [ T z ( x ; F w )] as a function of the vec tor w is probably v ery d ifficult to find , ev en in the most simp le situations. On e can note h o wev er that it can b e wr itten recursive ly as E [ T z ( x ; F w )] = X ( E [ T z ( x ; F w )] + E [ C ( x, y ) | F w ( x ) = y ]) P ( F w ( x ) = y ) where the sum is o ver all y ∈ V suc h that d ( y , z ) < d ( x, z ). In the v ery s im p lest cases (suc h as a directed lo op with one augmented outgo- ing shortcut c hord p er verte x) it is p ossible to calculate P ( F w ( x ) = y ) and E [ C ( x, y ) | F w ( x ) = y ] analytically , in w hic h case E [ T z ( x ; F w )] can b e cal- culated numericall y by recursion. Because this is complicated, and u nlik ely to b e of muc h in terest in pr actice , we do not linger on it. A m uc h more rew arding strategy is to calculat e the weig hts empirically . That is, start b y simula ting a large n um b er of searc h es from randomly c hosen p oin ts using F w 0 . While this is b eing done, s amp le the a v erage routing cost to z fr om eac h vertex (due to the Mark o vian n atur e of forward searc h on an edge indep enden t graph, a ve rtex ma y take a sample eve ry time a qu ery passes through it). After a suffi cien t num b er of queries, the av erage should b e an estimate at E [ T z ( x ; F w 0 )] by the law of large n umbers. One ma y then tak e the av erage costs from eac h p oint as w 1 , and contin ue in this manner. Prop osition 3.7 ind icates h o w close an approximat ion is n eeded, but u nfortunately it is n ot strong enough to derive a rigorous b ou n d us ing a p olynomial num b er of s amples. F urther, we note tw o things ab out the sampling implemen ted. Firstly , one needs to b e careful ab out the wa y th e rep eated queries are done. Since we w an t th e edge costs to b e r andom, C ( x, y ) must b e p ic ke d anew, indep en- den tly , for eac h query samp led. If the graph is r andom, th e edges may b e redra wn, bu t must n ot – it sim p ly d ep ends on whether they are to b e seen as r andom or fi x ed edges in the G ab o v e. 11 Secondly , the p ro of of Theorem 3.1 guaran tees con vergence in n steps, mean- ing that an optimal routing is ac hiev ed once w n has b een calculated (if an empirical metho d is used, the resulting w eigh ting may still suffer i naccuracies due to the sampling). Th is is an unfortun ately large num b er of iterations, esp ecially giv en that eac h ma y require sim ulating a large num b er of qu eries, but we find th at in practice, muc h fewer iterations (t ypically t w o or three, ev en for very large net w orks) are needed, see Section 6 b elo w. 5 Practicalit y and Decen tralization W e p ro ceed to discuss actual app licatio ns of Definition 2.5. O n the face of it, the routin g metho d describ ed do es n ot seem particularly p ractica l. Even if we can calculate th e wei gh ting ˜ w , this giv es a routing table of size of n , and suc h a table is needed for eac h z we w ish to route for. The complete table of w eigh ts needed to route b et ween an y t wo v ertices is th us of size n 2 . Sev eral assu mptions can help here ho w ev er. Cen t ralization: T ranslation In v ariance If we assum e that the graph is translation inv arian t, then E [ T z ( x ; F )] = E [ T 0 ( x − z ; F )] so x needs on ly kno w the routing cost fr om eac h starting ver- tex to a distinguished v ertex 0. In fact, in man y cases (such as the common case of au gmenting sin gle cycle with rand om outgoing edges) E [ T z ( x ; F T )] ma y b e exactly , or at least approxi mately , a function of d ( x, z ), in whic h case x need only kno w the exp ected cost of r outing a given d istance. Th is kno wledge is the same for all x , so may b e calculated as a single, global, v ector. Decen t ralization If one wish es for a completely decentral ized searc h system, as, for instance in p eer-to-p eer systems suc h as [10], then one cannot store a global v ector of weigh ts. Instead, eac h vertex m ust store the weig hts needed to route to ev ery other v ertex. In particular, eac h vertex x n eeds to b e able to calculate w z ( y ) for eac h y ∈ N ( x ) and z ∈ V . If one assumes translation in v ariance, x need only store one such weigh t vec tor, and can translate it to apply to its n eigh b ors . Without such in v ariance, it needs to store | N ( x ) | v ectors. W eigh t V ector Compression In b oth cases ab ov e, ho we v er, w e are still left with a r outing table size of at least n , whic h is defi n itely n ot desirable. The heart of what mak es our 12 Figure 2: Rather than storing ev ery v alue of w v ector (the d otted line) as a routing table, we store v alues at exp onent ially increasing p ositions, and use these to appr o ximate the v alues b etw een them. metho d practically usefu l co mes from the fact that the previous theory ab out decen tralized searc h mak es compression to a logarithmic s ize p ossib le. If we consider graphs of t yp e G ( n, α ) d escrib ed in Section 3.1, we kno w from Prop osition 3.6 that E [ T z ( x, F ˜ w )] ≈ c E [ C ] log ( n ) log( d ( x, z )) . The utilit y of this is that if we k n o w that E [ T z ( x, F T )] gro ws logarithmically with d ( x, z ) (as indicated b y Prop osition 3.6), w e are motiv ated to assume that it, and th us the w eigh ts ˜ w in Definition 2.5, can b e appro ximated b y assuming ˜ w ( x ) and ˜ w ( y ) hav e similar v alues if x and y are su ch that log( d ( x, z )) ≈ log ( d ( y , z )). In particular if 0 ≤ d ( y , z ) − d ( x, z ) ≤ r we get | ˜ w ( y ) − ˜ w ( x ) | ≈ c 1 E [ C ] log( n ) r d ( x, z ) . (12) It is easy to pr o ve , using the same metho ds as in the pr o of of T heorem 3.3 that f or greedy routing in G ( n, α ) P ( S z ( x ; A G ) ≥ log 3 n ) ≤ c 2 log n n . Assuming that a similar b ound holds for F ˜ w , equation (10) with k = log 3 n in Pr op osition 3.7, gives that E [ T z ( x ; F w )] − E [ T z ( x ; F ˜ w )] ≤ 4 max x ∈ V | ˜ w ( x ) − w ( x ) | log 3 n so if r < ǫd ( x, z ) / 4 log 3 n in (12), then E [ T z ( x ; F w )] − E [ T z ( x ; F ˜ w )] < ǫ. Th us, the weig ht w ( x ) can b e s u bstituted by the w eigh t of a v ertex ǫd ( x, z ) / log 3 n steps fr om x . T o do this, we d ivide the routing d istances into zones of size 2 i for i = 0 , 1 , 2 , . . . , and record only the w eigh ts of log 3 n/ǫ eve nly spaced v ertices within eac h zone (Figure 2). The routing table th u s conta ins a 13 3 4 5 6 7 8 9 10 11 100 1000 10000 100000 1e+06 Steps Size Greedy Cost-Greedy Figure 3: Th e steps take n by greedy and cost-gree dy searc h w hen all edge costs are fi xed to 1. In theory , the latter should conv erge to th e former (whic h is optimal) but due to the inaccuracy of the estimates and the routing-table compression cost-greedy here p erforms ab out 5% worse than the optimum. p olylogarithmic num b er of ent ries ( O (log 4 n )), and y et by using th e clos- est recorded w eigh t as a su bstitute for w ( x ), w e incur only an ǫ -error on the total routing cost. Proving this r igorously , ho w ev er, dep ends on tight er b ounds then Prop osition 3.6 or eve n Th eorems 3.3 and 3.4 pr o vide. W e w ill see exp erimenta lly in S ectio n 6 that a routing table of size around E [ S z ( x ; A G )] w orks w ell in practice, b oth when using a single v ector and in a d ecen tralized system. While it may seem lik e a limitation that this will only work on graphs where routing in a logarithmic num b er of s teps is p ossible, th ose are lik ely to accoun t for most situations where decen tralized searc h is of in terest. Bey ond Klein b erg’s small-wo rld mo del, other cases where decen tralized routing is exp ected to tak e a logarithmic n umber of steps are hyp ercub es (where the hamming d istance is adapted for routing), and Chord net w orks [18] (where the circular distance is). 6 Exp erimen ts 6.1 Direct Applications W e start by simula ting the algorithm und er the most b asic conditions. W e let G consist of a single dir ected cycle of n ve rtices, augmen ted w ith log n outgoing shortcuts fr om eac h v ertex, according to K leinb erg’s small-w orld mo del. That is, eac h shortcut from x is to an indep end en tly chosen v ertex selected with according to (6) with α = 1, wh ic h in this case translates to 1 /h n d ( x, y ), where d is d istance in H , and h n ≈ log n is a norm alize r. 14 0 5 10 15 20 1000 10000 100000 Cost/Steps Size Greedy - Cost/Steps Cost-Greedy - Cost Cost-Greedy - Steps Figure 4: The cost and steps tak en by cost-greedy and greedy searc h on net w orks with Exp(1) distributed costs along eac h edge, plotted against the size of the net w ork. Net works consist of directed rin gs with log 2 n directed shortcuts p er v ertex. 0 5 10 15 20 25 30 35 40 45 50 55 1 2 3 4 5 6 7 8 9 10 Cost/Steps Round Greedy - Cost/Steps Cost-Greedy - Cost Cost-Greedy - Steps Figure 5: The cost and s teps tak en by cost-greedy and greedy r outing on a net w ork of size 262144 with Exp(1) distribu ted costs along eac h edge. Cost- greedy p erformance is plotted against iteration of the system in Theorem 3.1, s tarting with all zero weig hts. 15 W e s tart b y assigning w 0 ( x ) = 0 f or all x ∈ V , and calculate th e exp ected routing times by simulating 20 n queries b etw een randomly c h osen p oint s (this n umber of iterations is probably excessiv e). W e re-sample the costs for eac h query , but th e graph is kept the same. Ho wev er, b ecause only one s ample vec tor of the exp ected routing times ov er eac h d istance is ke pt, w e still end up marginalizing o ver the s h ortcuts. W e use the logarithmic compression of w describ ed in Section 5 (in p ractice , we fi nd th is outp erf orms using a full w vect or except when an extremely large num b er of qu eries is sim ulated), and u s e w 10 as an estimate of th e fin al v alue. The difference b et ween cost-greedy and stand ard greedy searc h in term s of query cost dep ends crucially on th e distrib ution of C ( x, y ). Quantitat iv ely , it is p ossible to mak e the b enefit of cost greedy as large (or small) as one wishes by a strategic c h oice of this distribu tion. F or example, if C ( x, y ) = ( 2 with probability 1 2 0 otherwise. then cost-greedy searc h will most often incu r zero cost assuming the v ertex degree is large en ou gh (as w ill a simple lo w est cost routing). It would thus b e dishon est of us to claim that our metho ds are motiv ated based on the p erformance ac h iev ed with d ela ys c hosen by us. Th e exp eriments in this section are thus meant to v erify that cost-greedy searc h b eha ves as exp ected, rather than to illustrate its b enefi t: the p oten tial b enefit of the algorithm m ust b e ev aluated for ev ery particular situation where it ma y b e applied. Our first exp erimen t, sho wn in Figure 3, is th us to see what happ ens if w e fix the costs to 1 for all the edges. In th is case cost and steps are the same, and since it is kno wn (Theorem 3.5 ) that greedy searc h is optimal in the exp ected n umber of steps, the theory tells us that cost-greedy should, ideally , giv e the same v alue. In fact w e fi nd th at it un der-p erforms by ab out 5% in all the sizes tested – presum ab ly due to the emp irical estimate of the exp ected v alue, an d the losses d ue to the logarithmic compression of the w eigh t v ector. Figure 4 sho ws the p erformance of cost-greedy w hen the costs are exp onen- tially distrib uted as a fun ction of the graph size. W e choose an exp onential distribution simply b ecause it is a common mo del for w aiting times, and the mean of 1 means that the cost and steps of a route are of the same scale. W e see, as exp ected, th at cost-greedy searc h is able to pr o duce r outes that cost less b y taking more steps than normal greedy searc h d oes. In Figure 5 we p lot p erformance for a single n et wo rk size against the iterations of (5) when starting with all zeros. W e see that ev en in a netw ork of hundreds of thousands of v er tices, no measurable p erform an ce is gained after the fourth round - su pp orting our hyp othesis that conv ergence is a lot f aster than the b ound giv en ab ov e. 16 0 5 10 15 20 1000 10000 100000 Cost Size Greedy Cost-Greedy SJ Method Figure 6: Example of a net w ork with t wo different v ertex t yp es - one ten th of the ve rtices are augmented b y 55 outgoing edges, wh ereas the rest get just 5. All edge costs are exactly one, and the v alues are a v eraged ov er four sim ulations to decrease v ariance. “SJ Metho d” is the metho d of S ¸ im¸ sek an d Jensen describ ed in Section 6.2. 6.2 Out-degree D istribution Another question th at has b een asked ab out na vigabilit y is h ow to route in a n etw ork if the v ertices h a ve v ariable d egree, and if the degree as well as the p osition of the n eigh b ors is kno wn when the r outing decision is made. This pr oblem is motiv ated b y the nature of so cial n et works, w hic h app ear to b e na vigable, b u t where it is kno wn that the vertex degree follo ws a h ea vy- tailed p ow er-la w . This problem is in man y w a ys similar to that whic h we discuss ab o ve: lik e with the edge costs, d egree distribu tions ma y incen tivize a wa y fr om a pur e greedy strategy , and in stead call f or a trade-off b et ween getting close to th e destination, and other factors (in this case, wan ting to route a ve rtex with high degree). S ¸ im¸ sek and Jensen [13] ha ve stud ied this pr oblem b y sim ulation. T heir metho d is fu ndamen tally similar to ours: they also seek to choose the neigh- b or w hic h minimizes the exp ected num b er of steps to the destination (as w e do if the costs are fixed to a unit v alue). Ho wev er, rather th an attempting to calculate the fix -p oin t of the weigh ts, they mak e a rough app ro ximation of the v alue usin g the right-hand sid e of th e inequalit y E [ S z ( x )] ≥ P ( S z ( x ) > 1) = P ( z / ∈ N ( x )) (13) to estimate the left. T o apply our metho ds ab o ve to the prob lem, we let the we igh ts b e a function not only of the d istance to the destination, but also of the d egree of the v ertex. Since th is question related only to the num b er of steps, we fi x all the costs to 1. W e exp ect the w eigh t for any particular distance to b e smaller 17 0 2 4 6 8 10 12 1000 10000 100000 Cost Size Greedy Cost-Greedy (Centralized, 10 Rounds) Cost-Greedy (Decentralized. 20 Rounds) Cost-Greedy (Decentralized. 10 Rounds) Figure 7: Th e same situations as in Figure 4, b ut n ow including the results when using a separate w eigh t v ector at every v ertex in the manner describ ed in S ectio n 6.3. A round is 20 × n simulate d queries as ab o v e. for ve rtices with higher degree (since the amoun t of ground gained in the first step sh ou ld b e b etter). Figure 6 sh o ws a simple example of this. In that case we hav e exactly t wo p ossible out-degrees: a few (0 . 1 n ) of the vertice s ha v e 55 shortcuts, wh ile the r est hav e just 5. W e compare the cost-gree dy searc h as used ab ov e with regular greedy search and the metho d of S ¸ im¸ sek and Jensen. Th e results seems to vind icate th e appro ximation used in the latter m etho d , with this distribution it slightly out-p erform s cost-gree dy searc h, meaning that th e n umerical losses in estimating the true w eigh ts are greater than th e analytic loss of th e approxi mation. T his seems to b e the case for most sensible such distributions, we fi nd that cost greedy search only tak es a sligh t lead when the p opu lar v ertices hav e more than a hundred times the degree of un p opular ones. If w e presume that cost-greedy searc h can come within 5% of b eing optimal also h ere, w e are forced to conclude that so do es th e SJ metho d. One adv ant age that cost-greedy searc h has ov er the metho d of S ¸ im¸ sek and Jensen, is that their m ethod r equires detailed kn o wledge ab out the mo d el in order to calculat e the r igh t-hand side of (13), which cost-greedy searc h do es not. Algorithmically , an y vertex ma y implement cost greedy searc h for its queries, and it needs only ha v e the abilit y to to measure th e cost of the queries it send s to its neighbors, n othing more. 6.3 A D ec entralized and Generalized Implemen tation T o lo ok at the practical viabilit y of the algorithms describ ed ab ov e, we also sim ulate a completely distribu ted v arian t. In the decentrali zed v arian t, we equip eac h v ertex with its o wn w eigh t vec tor, measuring the mean cost of routing from it to destinations at v arying distances. Lik e b efore w e use a 18 0 2 4 6 8 10 12 1000 10000 100000 Cost Size Greedy Cost-Greedy SJ Method Figure 8: Using a separate wei gh t ve ctor at every v ertex in the manner describ ed in S ection 6.3. Costs are Exp(1) distributed, and out-degrees are distributed according to a p ow er-la w with tail-exp on ent 2. “SJ Metho d” is the metho d of S ¸ im¸ sek and Jensen d escrib ed in Section 6.2. log 2 n compr ession of the weig hts – coalescing all d istances b et we en 2 k and 2 k +1 in to the same entry – but unlike ab ov e we do not calculate eac h w eigh t b y sampling o ve r a fi xed num b er of queries. Instead, w e let the weigh t v ector at eac h ve rtex x b e calculated as th e mean of the entries in a FIFO buffer, sho wing the cost of the last m quer ies x h as routed destined for vertices of every distance category . As b efore we do n ot c hange the edges of the graph b et we en the queries from which th e w eigh ts are estimated. Because no marginalizing is o ccurr ing here, the graph mo del is actually one fixe d realizatio n f or eac h size – the exp ectation is actually tak en only o v er the costs. T o route a query , x uses the w eigh t v ectors of eac h of the v ertices in N ( x ) to minimize (2 ). In a real wo rld implemen tation, these v alues could b e p eri- o dically copied b et we en neighbors. One p roblem we find with this metho d is that if x initially has m queries in a certain distance category that incur a very high cost, he will not attract more qu eries in that category from his neigh b ors (wh o see it as v ery costly to send suc h q u eries to him), meaning it tak es a long time to clear the err ant v alues from the FIF O b uffer. Ev en- tually the buffer will b e r eplaced, if not otherwise then by the cost of the queries initiated at x itself, b ut in our sim ulations we fi nd that th is slo ws the con v ergence. T o alleviate this, w e keep a count of the num b er of queries x r eceiv es for eac h distance categ ory dur ing an in terv al. The theory sa ys that these should b e equal, so if one of the counts has fallen a lot b ehind (is less than a quarter of the queries x receiv es for itself ) w e s et all the v alues in the b uffer to 0. Ev en with this metho d, th e con vergence is, as exp ected, slow er than in the cen tr alize d version. Figure 7 sho ws the equiv alen t of Figure 4 b ut u sing 19 lo cal weig ht ve ctors at eac h v ertex. Here we let m = 20. W e can note three thin gs: there is an ab s olute p er f ormance cost of the decen tralized v ersion, the cost seems to get worse for larger sizes, but it still consid erably outp erforms greedy searc h. The first is p r obably du e to eac h estimate of the exp ected r outing time b eing based on far fewer v alues, w h ile the second is due to us not simulating enough qu eries for full conv ergence at the large sizes, as seen b y the increasing difference b et w een the v alues as 10 and 20 rounds. W e n ote that ev en 20 roun ds is actually only 400 queries initiated at eac h vertex – a large num b er when w e m ust s im u late it for a quarter of a million ve rtices, b ut v ery little compared to the num b er of queries one w ould exp ect in most DHT’s or other dep lo yments of d istributed net w orks. Finally , in Figure 8 w e us e th e d ecen tralized metho d to r oute in a situation when w e b oth h a ve exp onentia l edge costs, and v ertices of v arying out-degree (in this case a p ow er-la w with P ( | N ( x ) | > t ) ≈ t − 2 ). Decen tralized cost- greedy searc h can optimize b oth for v arying costs and vertex degrees at the same time. 7 Conclusion W e h a ve p resen ted a m ethod for d ecen tralized searc h that tak es v arying costs of routing do wn different edges int o accoun t. W e ha v e show ed that this metho d is optimal among all s uc h algorithms th at monotonically appr oac h the destination of the qu ery , and that the necessary we igh ts can b e calculated iterativ ely . On small-w orld graphs, w e can calculate the order of costs, and sa y something ab out the appro ximation cost. Bey ond these analytic facts, ha v e presen ted a n um b er of tec hniqu es whic h mak e the algorithm pr actic al, and exp erimen ted with actual implementa tions u sing simula tion. It wo uld b e v ery d esir ab le to b e able to b etter m otiv ate our app ro xima- tions rigorously . T o do r equires strengthening prop ositions 3.6 and 3.7, and p erhaps a lot of work b eyond that. In the sh ort term, pr oving that any p olylogarithmic r outing table, and an y p olynomial num b er of samples, is sufficien t w ould b e a big improv emen t. The long term goal of these stud ies is to try to fi nd adaptive metho ds for decen tralized searc h when the edge costs are not indep endent rand om v alues, but d ep end, for in stance, on the num b er of queries that h a ve passed d o wn the edges recen tly . Su c h metho ds for routing with congestion are of in terest to d ep lo yments of p eer-to-p eer and other distrib uted systems. 20 References [1] J. Kleinberg. The sm all-wo rld phenomenon: an algorithmic p ersp ectiv e. In P r o c e e dings of the 32nd ACM Symp osium on The ory of Computing (STOC) , 2000. [2] J. Klein b erg. Complex net w orks and decen tralized searc h algorithms. In Pr o c e e dings of the International Congr ess of Mathematicians (ICM) , 2006. [3] S. M. Ross. Intr o duction to Sto chastic Dynamic Pr o gr amming . Aca- demic Press, 1983. [4] J. K lein b erg. Na vigation in a sm all wo rld. Natur e , page 845, 2000. [5] L. Barriere, P . F raigniaud, E. Kranakis, an d D. Krizanc. Efficient rout- ing in n et works with long range con tacts. In Pr o c e e dings of the 15th International Symp osium on Di stribu te d Computing, D ISC’01 , 2001. [6] J. K leinb erg. S mall-w orld p henomena and the dynamics of inf orma- tion. In A dvanc es in Neur al Information Pr o c essing Systems (NIPS) 14 , 2001. [7] D. Lib en-Now ell, J . No v ak, R. Kum ar, P . Ragha v an, and A. T omkins. Geograph rou tin g in so cial n etw orks. I n Pr o c e e dings of the N ational A c ademy of Sci e nc e , volume 102, pages 11623– 11628, 2005. [8] P . F raigniaud, E. Lebhar, an d Z. Lotk er. A d oubling dimension thr esh- old th eta(loglog n) f or augmente d graph n a vigabilit y . In Pr o c e e dings of the 14th Eur op e an Symp osium on Algor ithms (ESA) , 2006. [9] O. S andb erg. Neigh b or selection and hitting probabilit y in small-w orld graphs. T o app ear in The Annals of Applie d Pr ob ability , 2007. [10] I. Clark e, T. Hong, S. Miller, O. Sandb er g, and B. Wiley . Protecting free expression online with Freenet. IEEE Internet Computing , 6:40–49, 2002. [11] I. Clark e. F reenet’s next generatio n routing proto col, 2003. h ttp://freenetpro j ect.org/ngrouting.h tml. [12] O. Sand b erg. Distributed routing in small-w orld netw orks. I n Pr o- c e e dings of the Eighth Workshop on Algorithm Eng i ne ering and Exp er- iments (A LENEX06) , 2006. [13] ¨ O. S ¸ im¸ sek an d D. J en sen. Decen tralized searc h in net w orks using ho- mophily . In P r o c e e dings of the 19th International Joint Confer enc e on Artificial Intel ligenc e , 2005. 21 [14] M. F rancesc hetti and R. Meester. Na vigation in small w orld net w orks, a scale-free con tin uum mo del. Journal of A pplie d Pr ob ability , 43:1173– 1180, 2006. [15] T. Stern. A class of decentrali zed routing algorithms using relaxation. IEEE T r ansaction s on Communic ations , 25:1092–1 102, 1977. [16] C.M. Newman and L.S. Sc h ulman. One dimensional 1 / | j − i | s p ercola- tion mo dels: Th e existance of a transition for s ≤ 2. Communic ations in Mathematic al P hysics , 104:547– 571, 1986. [17] G. S ingh Manku . Know thy neigh b or’s n eigh b or: the p ow er of lo ok a- head in r andomized P2P netw orks. I n Pr o c e e dings of the 36th ACM Symp osium on The ory of Computing (STOC) , 2004. [18] I. Stoica, R. Morris, D. Karger, F. Kaasho ek, and H. Balakrishnan. Chord: A scalable P eer-T o-P eer lo okup service for int ernet app licat ions. In Pr o c e e dings of the 2001 ACM SIGCOM M Confer enc e , pages 149– 160, 2001. 22
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment