Decentralized Search with Random Costs

# Decentralized Search with Random Costs

## Abstract

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 when routing from any vertex to any other, while for others it is not.

We consider random graphs with random costs assigned to the edges. In this situation, we use the methods of stochastic dynamic programming to create a decentralized search method which attempts to minimize the total cost, rather than the number of steps, of each path. We show that it succeeds in doing so among all decentralized search algorithms which monotonically approach the destination. Our algorithm depends on knowing the expected cost of routing from every vertex to any other, but we show that this may be calculated iteratively, and in practice can be easily estimated from the cost of previous routes and compressed into a small routing table. The methods applied here can also be applied directly in other situations, such as efficient searching in graphs with varying vertex degrees.

## 1 Introduction

Jon Kleinberg introduced the concept of decentralized search algorithms in his celebrated 2000 paper on the Small-World phenomenon [1]. In particular, he showed that in certain random graphs it is possible to find paths between vertices of poly-logarithmic length even when limited to using only local knowledge at each step, while in others it is not.

Most of the by now large canon of work in the area (see [2] for a recent survey) has been dedicated to finding and analyzing algorithms that route between two given vertices in a small number of steps. Typically, the best method in these situation is greedy: progress to the neighbor which is closest to the destination. In this paper, we consider a generalized situation where the cost of passing down an edge is not fixed, but may be a random variable whose value is known when the choice of where to proceed to next is made. The goal is then the minimize the cost of reaching the destination, which may lead to different priorities when routing (one may not wish to route to a vertex very close to the destination if the cost of passing down that edge is very high, see Figure 1). This is a problem similar to that applied to time process in the field of stochastic dynamic programming [3], and we use similar methods.

The basic idea is this: If a vertex knows the expected cost of each of his neighbors routing to the destination, and also the cost of him routing to each of his neighbors, it makes sense for him to choose as the next step that neighbor which minimizes the sum of these two costs. While the expected costs are difficult to calculate analytically, we find that there is little reason to do so. When many queries are performed, one may start by using any guess as to these values, and then update these guesses based on past experience.

We will show analytically that this form of search is well defined, and that it is optimal among algorithms that monotonically approach the destination, as well as presenting some results on the order of the total cost as well as approximation trade-offs. We continue with a discussion and some experimentation on the practicality of the approach. Finally, we apply the algorithm with greater generality, and see that it performs well also in these cases. In particular, we note 1that it can be applied to routing with non-homogeneous degree distributions.

### 1.1 Previous Work

The original work on decentralized search was done by Kleinberg in [1] and [4]. Much work has since been done on related problems, in particular further generalization of the results and improvements on the bounds (see [5] [6] [7] [8] [9] for some examples).

In a bid to improve the performance of Freenet [10], a decentralized peer-to-peer network, Clarke [11] proposed an algorithm in some ways similar to that presented here under the name “NG Routing”. The method was implemented in Freenet at the time, but has not been used since the network was re-engineered to route according to the method described in [12]. We believe that the technical and architectural problems experienced by previous versions of Freenet were unrelated to what is discussed below, and, in light of our results, that Clarke’s ideas were fundamentally sound.

Şimşek and Jensen also proposed an algorithm based on the same principles in [13], intended for routing based on both vertex degree and similarity. Their “expected-value navigation” is based on the same idea as our cost-greedy search, however they use a rough estimate of the expected routing time, which cannot be applied to our problem, to make the decisions. They present no analytic results. For our take on search in graphs with variable node degree, see Section 6.2 below.

For an introduction to the field of stochastic dynamic programming, see the monograph by Ross [3].

#### A note on terminology

The terminology regarding algorithms for decentralized path-finding in random graphs has not yet settled, and different authors have used different terms. We have chosen the term “decentralized search” (following recent work by Kleinberg [2]) but others terms have been used to describe the same thing. “Navigation”, used in e.g. [4] [14], is quite common, but perhaps not as descriptive. We avoid formally calling our algorithms “routings” as this name has previously been used in computer science literature to describe flow assignments through a graph with limited edge capacities (for example [15]), a different problem from that currently studied. However, we do use the terms “route” and “to route” following their dictionary definitions.

### 1.2 Organization

In Section 2 we set out the basic definitions of decentralized search, as well as rigorously define our new “cost-greedy” search algorithm. Following this, in Section 3 we prove the main results regarding cost-greedy search in networks with sufficient independence. In Sections 4 and 5 we set out the methods for applying the results in practice, and, finally, in Section 6 we perform simulated experiments to look at the actual performance of the algorithm.

## 2 Definitions

A cost graph is a graph consisting of a vertex set , a possibly directed set of edges , and a collection of costs, . For each element , is an i.i.d. positive random variable giving the cost of traveling down that edge (time taken).

may be a random graph, by which we mean that for each , there exists a random indicator variable saying whether there is an edge from to . These may be dependent and differently distributed.

###### Definition 2.1.

For a given cost graph , a -search for a vertex , is a mapping such that:

1. only if .

2. .

3. For all there exists is such that .

A search of is a collection of -routing algorithms for all .

We call a distance on a set if , if for , implies that , and if for ,

 d(x,z)≤d(x,y)+d(y,z).

A distance is thus a metric without the symmetry requirement. In particular, any connected digraph implies a distance . For , is the set of neighbors of in .

###### Definition 2.2.

A distance is adapted for search in a connected graph if for every , where , there exists a such that .

A distance function is thus adapted for search if it, in some sense, reflects the structure of . The most obvious example is of course itself, but may also be, for instance, graph distance on any connected spanning subgraph of . Another important case is that if is a set of points in a metric space, then the space’s metric is adapted for search in ’s Delaunay triangulation (see [9]).

###### Definition 2.3.

Given a cost graph , and a vertex , a decentralized search is a -search , such that for any the random variable is measurable with respect to:

1. for all .

2. for all .

Intuitively, this means that as well as any information about the graph model, routing at may use information about which vertices does (and does not) have edges to, as well as the costs of passing down those edges. The definition of decentralized search as originally given by Kleinberg was slightly broader than this, allowing a route started at a vertex to use all the information from when taking its -th step. Because our analysis will be restricted to algorithms meeting the following criteria, excluding this information will make little difference:

###### Definition 2.4.

Given a graph , a distance adapted for search in , and a vertex , a forward search is a -search such that for all

 d(F(x),z)

For a given search and vertex

 Sz(x;A)=inf(k:Ak(x)=z)

is the number of steps it takes to reach from using . Let

 Tz(x;A)=Sz(x;A)∑i=1C(Ai−1(x),Ai(x))

which is the cost.

### 2.1 Greedy and Weighted Greedy Search

In the following, we fix . Greedy search is given by

 AG(x)=argminy∈N(x)(d(y,z)). (1)

This is always a decentralized search, and if is adapted, than it is a forward search (if is not adapted, it may not be well defined to begin with).

Standard greedy search does not take the costs into account. A variant that does, is weighted greedy search. For a given , let for be a collection of weights, where . These weights specify a search algorithm

 Aw(x)=argminy∈N(x)(C(x,y)+wz(x)) (2)

which may or may not be well defined. If we restrict this to being a forward search, we get

 Fw(x)=argminy∈N(x):d(y,z)

which is always a well-defined if is adapted for routing in .

The behavior of weighted routing depends on . If is strictly increasing in then and are when the costs are constant. If for all , then will simply choose the edge approaching with the lowest cost. Since we are trying to minimize the cost of routing, it makes sense to see as a guess of the cost of reaching from . Imagine that we are given a black-box function , where

 f(x,A)=E[Tz(x;A)]

that is, tells us the expected cost of routing from using any given algorithm . If a vertex knows that all its neighbors will use the algorithm to route, it makes sense that it should want to use the given by (2) (or (3) if restricted to forward search) with . Extending this reasoning to any vertex motivates the following definition.

###### Definition 2.5.

A forward search is called cost-greedy search for if , where the weights are given by the solution to the equations:

 w(x)=E[Tz(x;Fw)]x∈V (4)

Equation 4 is what is the routing equivalent of what is known in stochastic dynamic programming texts as the optimality equation. We will show below that a solution exists in this context, that this solution is a globally attractive fix-point, and that cost-greedy search is optimal with respect to expected routing cost for all forward searches.

## 3 Results for Independent Graphs

Let be an distance, and denote the event that there is an edge from to (we allow multiple edges per pair). We let be a random graph model on which is adapted for routing (with probability 1), and for which with and , is independent of if . Examples of such graphs are adding outgoing edges from each vertex with destinations chosen independently (as in Kleinberg’s work [1]) or allowing each edge, either seen as directed or undirected, to exist independently of all others (like in classical random graphs and long-range percolation [16]). We call a graph constructed in this manner edge independent.

###### Theorem 3.1.

For an edge independent random graph , there exists a solution to equation (4) so that cost-greedy search is well defined. is a globally attractive fix-point of the iteration given by

 wi+1=E[Tz(x;Fwi)]. (5)
###### Proof.

Define the rank of with respect to , , as the position of when all the elements in are ordered by increasing distance from , using some deterministic tie-breaking rule. Let .

We will proceed by induction on .

Let be any weighting. Let such that . For any forward search , , whence does not depend on the algorithm. In particular is does not depend on , whence is constant for .

Let , and assume that for all such that , takes the same value for all . This means that takes the same value for all .

It follows that for all is fixed for . Hence for all , and is a solution to (4). ∎

###### Theorem 3.2.

Let be an edge independent graph, and a forward search for a vertex . Then for all

 E[Tz(x;F~w)]≤E[Tz(x;F)]

where is cost-greedy search for as in Definition 2.5.

###### Proof.

Use the same definition of as in the proof of Theorem 3.1. Like there, we will use induction on .

If , then all forward searches from are the same, and there is nothing to prove. Let be any forward search. Given , assume that for all such that , .

Let and , the places the respective algorithms choose as the next step. Below, we mean by “local knowledge” that which decentralized algorithm may use, as given in 2.3. We note, crucially, that because of our assumptions, is independent of local knowledge at , while is measurable with respect to it.

 E[Tz(x;F)] =E[E[Tz(x;F)|% local knowledge at x]] =E[D(x,v)+E[Tz(v;F)]] ≥E[D(x,v)+E[Tz(v;F~w)]] ≥E[D(x,v∗)+E[Tz(v∗;F~w)]]=E[Tz(x;F~w)]

where the first inequality follows by induction since and the last because the expression inside the first expectation is what minimizes. ∎

### 3.1 The Small-World Graph

A particular example graphs meeting the criteria of the last chapter are the small-world augmentations first introduced by Kleinberg [1]. This construction starts with a fixed finite grid , letting , and creating by adding a random outgoing directed edge from each vertex to destination a with probability

 P(x⇝y)∝1/dG(x,y)α (6)

is naturally adapted for routing in .

For simplicity, we let be a ring of vertices (Kleinberg originally used a two-dimensional square lattice, but the proofs are identical). Let be the family of random graphs so constructed.

Using previous results about greedy routing on such graphs, we can calculate the cost order of cost-greedy search. In particular, we can see the order in cannot be different from greedy routing.

###### Theorem 3.3.

(Kleinberg) If with there exists such that for ,

 E[Sz(x;AG)]≤k1lognlogd(x,z)

where is a constant independent of , , and .

Further results about such graphs, proved in [5] and [17] respectively are

###### Theorem 3.4.

(Barriere et al.) If with , then there exists such that for ,

 E[Sz(x;AG)]≥k2lognlogd(x,z)

where is a constant independent of , , and .

###### Theorem 3.5.

(Singh Manku) If , with , then

 E[Sz(x;AG)]≤E[Sz(x;A)]

for any and decentralized search .

Together, these allow us to prove the observation that

###### Proposition 3.6.

If and then

 E[Tz(x;F~w)]=Θ(lognlogd(x,z))
###### Proof.

The upper bound comes directly from Theorems 3.2 and 3.3, since

 E[Tz(x;F~w)] ≤E[Tz(x;AG)] =E[C(x,y)]E[Sz(x;AG)] ≤E[C(x,y)]k1lognlogd(x,y).

where the middle equality follows from the fact routes independently of the costs, and the simple form of Wald’s equation.

To prove the upper bound, consider all edges in the graph as directed, letting the edges of the be denoted by double directed edges. Since a forward search can only ever traverse an edge in one direction, this does not affect its cost. Now let

 Rz(x;F)=Sz(x;A)∑i=1Cmin(F(x)i−1) (7)

where . This counts, at each step, the minimum cost of any outgoing edge, rather than the cost of the edge which was actually used.

Since the degree of each vertex is fixed, is i.i.d. for all . Let be the -algebra generated by all the information seen in steps of the search (as listed in Definition 2.3). Note:

• is independent of .

• is a Stopping Time with respect to the filtration .

Thus we may use Wald’s Equation to conclude that

 E[Rz(x;F)]=E[Cmin(x)]E[Sz(x;F)]. (8)

We now use the immediate fact that , followed by (8) and Theorems 3.5 and 3.4, to conclude

 E[Tz(x;F)] ≥E[Rz(x;F)] =E[Cmin(x)]E[Sz(x;F)] ≥E[Cmin(x)]E[Sz(x;AG)] ≥E[Cmin(x)]k2lognlogd(x,z)

for sufficiently large . Since this holds for any forward-search , it holds in particular for . ∎

Proposition 3.6 tells us that in this model, the order of cost-greedy routing will not be different from that of greedy routing. The proof of the lower bound assumes, however, that and that the degree of each vertex is bounded as grows. Neither of these things, and particularly not the latter, necessarily hold in applications.

### 3.2 Approximated Weights

We consider the situation when the solution to (5) is not known exactly but approximated by another set of weights.

###### Proposition 3.7.

If is the solution to (5) and another set of positive weights such that

 maxx∈V|w(x)−~w(x)|≤ϵ

then for any edge-independent graph of size

 E[Tz(x;Fw)]−E[Tz(x;F~w)]≤2nϵ (9)

and more generally, for any

 E[Tz(x;Fw)]−E[Tz(x;F~w)]≤2ϵ(k+nP(Sz(x;Fw)>k)). (10)
###### Proof.

Let . It follows that

 E[Tz(x;Fw)] =E[C(x,Fw(x))+E[Tz(Fw(x);Fw)]] =E[C(x,Fw(x))+E[Tz(Fw(x);F~w)]]+errw(Fw(x)) =E[C(x,Fw(x))+~w(Fw(x))]+errw(Fw(x)). Now, since by the definition of a weighted greedy search C(x,Fw(x))+w(Fw(x))≤C(x,y)+w(y) for all y∈N(x) ≤E[C(x,F~w(x))+w(F~w(x))−w(Fw(x))+~w(Fw(x))] +errw(Fw(x)) ≤E[C(x,F~w)+~w(F~w(x))]+E|w(F~w(x))−~w(F~w(x))| +E|~w(Fw(x))−w(Fw(x))|+errw(Fw(x)) ≤E[Tz(x;F~w)]+2ϵ+% errw(Fw(x))

It follows that for any

 errw(x)≤2ϵk+errw(Fkw(x)). (11)

If then and , so (9) follows since for all searches.

To prove (10), note that by the same reasoning

 errw(Fkw(x))=errw(Fkw(x)|Fkw(x)≠z)P(Sz(x;Fw)>k).

Since the graph is edge independent is simply the error from some point which is not , but where (9) still applies. ∎

What the proposition, and in particular (11) says is that if an approximation of is off by , then each step in the routing adds at most to the optimal routing time. This is intuitively clear, since while may choose the wrong vertex in a given step, it can only do so when the total (actual) cost of routing via that vertex is within of the cost of routing via the real one. For the same reason, it is unlikely that a better bound can be achieved without further assumptions on the graph and the cost distribution.

## 4 Calculating the Weights

Theorem 3.1 provides us with a method of calculating the weights for cost-greedy search. One can start by assigning any initial weighting , and then calculate using (5).

A closed analytic form for as a function of the vector is probably very difficult to find, even in the most simple situations. One can note however that it can be written recursively as

 E[Tz(x;Fw)]=∑(E[Tz(x;Fw)]+E[C(x,y)|Fw(x)=y])P(Fw(x)=y)

where the sum is over all such that . In the very simplest cases (such as a directed loop with one augmented outgoing shortcut chord per vertex) it is possible to calculate and analytically, in which case can be calculated numerically by recursion. Because this is complicated, and unlikely to be of much interest in practice, we do not linger on it.

A much more rewarding strategy is to calculate the weights empirically. That is, start by simulating a large number of searches from randomly chosen points using . While this is being done, sample the average routing cost to from each vertex (due to the Markovian nature of forward search on an edge independent graph, a vertex may take a sample every time a query passes through it). After a sufficient number of queries, the average should be an estimate at by the law of large numbers. One may then take the average costs from each point as , and continue in this manner. Proposition 3.7 indicates how close an approximation is needed, but unfortunately it is not strong enough to derive a rigorous bound using a polynomial number of samples.

Further, we note two things about the sampling implemented. Firstly, one needs to be careful about the way the repeated queries are done. Since we want the edge costs to be random, must be picked anew, independently, for each query sampled. If the graph is random, the edges may be redrawn, but must not – it simply depends on whether they are to be seen as random or fixed edges in the above.

Secondly, the proof of Theorem 3.1 guarantees convergence in steps, meaning that an optimal routing is achieved once has been calculated (if an empirical method is used, the resulting weighting may still suffer inaccuracies due to the sampling). This is an unfortunately large number of iterations, especially given that each may require simulating a large number of queries, but we find that in practice, much fewer iterations (typically two or three, even for very large networks) are needed, see Section 6 below.

## 5 Practicality and Decentralization

We proceed to discuss actual applications of Definition 2.5. On the face of it, the routing method described does not seem particularly practical. Even if we can calculate the weighting , this gives a routing table of size of , and such a table is needed for each we wish to route for. The complete table of weights needed to route between any two vertices is thus of size .

Several assumptions can help here however.

### Centralization: Translation Invariance

If we assume that the graph is translation invariant, then so needs only know the routing cost from each starting vertex to a distinguished vertex . In fact, in many cases (such as the common case of augmenting single cycle with random outgoing edges) may be exactly, or at least approximately, a function of , in which case need only know the expected cost of routing a given distance. This knowledge is the same for all , so may be calculated as a single, global, vector.

### Decentralization

If one wishes for a completely decentralized search system, as, for instance in peer-to-peer systems such as [10], then one cannot store a global vector of weights. Instead, each vertex must store the weights needed to route to every other vertex. In particular, each vertex needs to be able to calculate for each and . If one assumes translation invariance, need only store one such weight vector, and can translate it to apply to its neighbors. Without such invariance, it needs to store vectors.

### Weight Vector Compression

In both cases above, however, we are still left with a routing table size of at least , which is definitely not desirable. The heart of what makes our method practically useful comes from the fact that the previous theory about decentralized search makes compression to a logarithmic size possible.

If we consider graphs of type described in Section 3.1, we know from Proposition 3.6 that

 E[Tz(x,F~w)]≈cE[C]log(n)log(d(x,z)).

The utility of this is that if we know that grows logarithmically with (as indicated by Proposition 3.6), we are motivated to assume that it, and thus the weights in Definition 2.5, can be approximated by assuming and have similar values if and are such that . In particular if we get

 |~w(y)−~w(x)|≈c1E[C]log(n)rd(x,z). (12)

It is easy to prove, using the same methods as in the proof of Theorem 3.3 that for greedy routing in

 P(Sz(x;AG)≥log3n)≤c2lognn.

Assuming that a similar bound holds for , equation (10) with in Proposition 3.7, gives that

 E[Tz(x;Fw)]−E[Tz(x;F~w)] ≤4maxx∈V|~w(x)−w(x)|log3n

so if in (12), then

 E[Tz(x;Fw)]−E[Tz(x;F~w)] <ϵ.

Thus, the weight can be substituted by the weight of a vertex steps from . To do this, we divide the routing distances into zones of size for , and record only the weights of evenly spaced vertices within each zone (Figure 2). The routing table thus contains a polylogarithmic number of entries (), and yet by using the closest recorded weight as a substitute for , we incur only an -error on the total routing cost. Proving this rigorously, however, depends on tighter bounds then Proposition 3.6 or even Theorems 3.3 and 3.4 provide.

We will see experimentally in Section 6 that a routing table of size around works well in practice, both when using a single vector and in a decentralized system.

While it may seem like a limitation that this will only work on graphs where routing in a logarithmic number of steps is possible, those are likely to account for most situations where decentralized search is of interest. Beyond Kleinberg’s small-world model, other cases where decentralized routing is expected to take a logarithmic number of steps are hypercubes (where the hamming distance is adapted for routing), and Chord networks [18] (where the circular distance is).

## 6 Experiments

### 6.1 Direct Applications

We start by simulating the algorithm under the most basic conditions. We let consist of a single directed cycle of vertices, augmented with outgoing shortcuts from each vertex, according to Kleinberg’s small-world model. That is, each shortcut from is to an independently chosen vertex selected with according to (6) with , which in this case translates to , where is distance in , and is a normalizer.

We start by assigning for all , and calculate the expected routing times by simulating queries between randomly chosen points (this number of iterations is probably excessive). We re-sample the costs for each query, but the graph is kept the same. However, because only one sample vector of the expected routing times over each distance is kept, we still end up marginalizing over the shortcuts. We use the logarithmic compression of described in Section 5 (in practice, we find this outperforms using a full vector except when an extremely large number of queries is simulated), and use as an estimate of the final value.

The difference between cost-greedy and standard greedy search in terms of query cost depends crucially on the distribution of . Quantitatively, it is possible to make the benefit of cost greedy as large (or small) as one wishes by a strategic choice of this distribution. For example, if

 C(x,y)={2 with probability 120 otherwise.

then cost-greedy search will most often incur zero cost assuming the vertex degree is large enough (as will a simple lowest cost routing). It would thus be dishonest of us to claim that our methods are motivated based on the performance achieved with delays chosen by us. The experiments in this section are thus meant to verify that cost-greedy search behaves as expected, rather than to illustrate its benefit: the potential benefit of the algorithm must be evaluated for every particular situation where it may be applied.

Our first experiment, shown in Figure 3, is thus to see what happens if we fix the costs to 1 for all the edges. In this case cost and steps are the same, and since it is known (Theorem 3.5) that greedy search is optimal in the expected number of steps, the theory tells us that cost-greedy should, ideally, give the same value. In fact we find that it under-performs by about 5% in all the sizes tested – presumably due to the empirical estimate of the expected value, and the losses due to the logarithmic compression of the weight vector.

Figure 4 shows the performance of cost-greedy when the costs are exponentially distributed as a function of the graph size. We choose an exponential distribution simply because it is a common model for waiting times, and the mean of 1 means that the cost and steps of a route are of the same scale. We see, as expected, that cost-greedy search is able to produce routes that cost less by taking more steps than normal greedy search does. In Figure 5 we plot performance for a single network size against the iterations of (5) when starting with all zeros. We see that even in a network of hundreds of thousands of vertices, no measurable performance is gained after the fourth round - supporting our hypothesis that convergence is a lot faster than the bound given above.

### 6.2 Out-degree Distribution

Another question that has been asked about navigability is how to route in a network if the vertices have variable degree, and if the degree as well as the position of the neighbors is known when the routing decision is made. This problem is motivated by the nature of social networks, which appear to be navigable, but where it is known that the vertex degree follows a heavy-tailed power-law. This problem is in many ways similar to that which we discuss above: like with the edge costs, degree distributions may incentivize away from a pure greedy strategy, and instead call for a trade-off between getting close to the destination, and other factors (in this case, wanting to route a vertex with high degree).

Şimşek and Jensen [13] have studied this problem by simulation. Their method is fundamentally similar to ours: they also seek to choose the neighbor which minimizes the expected number of steps to the destination (as we do if the costs are fixed to a unit value). However, rather than attempting to calculate the fix-point of the weights, they make a rough approximation of the value using the right-hand side of the inequality

 E[Sz(x)]≥P(Sz(x)>1)=P(z∉N(x)) (13)

to estimate the left.

To apply our methods above to the problem, we let the weights be a function not only of the distance to the destination, but also of the degree of the vertex. Since this question related only to the number of steps, we fix all the costs to 1. We expect the weight for any particular distance to be smaller for vertices with higher degree (since the amount of ground gained in the first step should be better).

Figure 6 shows a simple example of this. In that case we have exactly two possible out-degrees: a few () of the vertices have 55 shortcuts, while the rest have just 5. We compare the cost-greedy search as used above with regular greedy search and the method of Şimşek and Jensen. The results seems to vindicate the approximation used in the latter method, with this distribution it slightly out-performs cost-greedy search, meaning that the numerical losses in estimating the true weights are greater than the analytic loss of the approximation. This seems to be the case for most sensible such distributions, we find that cost greedy search only takes a slight lead when the popular vertices have more than a hundred times the degree of unpopular ones. If we presume that cost-greedy search can come within 5% of being optimal also here, we are forced to conclude that so does the SJ method.

One advantage that cost-greedy search has over the method of Şimşek and Jensen, is that their method requires detailed knowledge about the model in order to calculate the right-hand side of (13), which cost-greedy search does not. Algorithmically, any vertex may implement cost greedy search for its queries, and it needs only have the ability to to measure the cost of the queries it sends to its neighbors, nothing more.

### 6.3 A Decentralized and Generalized Implementation

To look at the practical viability of the algorithms described above, we also simulate a completely distributed variant. In the decentralized variant, we equip each vertex with its own weight vector, measuring the mean cost of routing from it to destinations at varying distances. Like before we use a compression of the weights – coalescing all distances between and into the same entry – but unlike above we do not calculate each weight by sampling over a fixed number of queries. Instead, we let the weight vector at each vertex be calculated as the mean of the entries in a FIFO buffer, showing the cost of the last queries has routed destined for vertices of every distance category. As before we do not change the edges of the graph between the queries from which the weights are estimated. Because no marginalizing is occurring here, the graph model is actually one fixed realization for each size – the expectation is actually taken only over the costs.

To route a query, uses the weight vectors of each of the vertices in to minimize (2). In a real world implementation, these values could be periodically copied between neighbors. One problem we find with this method is that if initially has queries in a certain distance category that incur a very high cost, he will not attract more queries in that category from his neighbors (who see it as very costly to send such queries to him), meaning it takes a long time to clear the errant values from the FIFO buffer. Eventually the buffer will be replaced, if not otherwise then by the cost of the queries initiated at itself, but in our simulations we find that this slows the convergence. To alleviate this, we keep a count of the number of queries receives for each distance category during an interval. The theory says that these should be equal, so if one of the counts has fallen a lot behind (is less than a quarter of the queries receives for itself) we set all the values in the buffer to 0.

Even with this method, the convergence is, as expected, slower than in the centralized version. Figure 7 shows the equivalent of Figure 4 but using local weight vectors at each vertex. Here we let . We can note three things: there is an absolute performance cost of the decentralized version, the cost seems to get worse for larger sizes, but it still considerably outperforms greedy search. The first is probably due to each estimate of the expected routing time being based on far fewer values, while the second is due to us not simulating enough queries for full convergence at the large sizes, as seen by the increasing difference between the values as 10 and 20 rounds. We note that even 20 rounds is actually only 400 queries initiated at each vertex – a large number when we must simulate it for a quarter of a million vertices, but very little compared to the number of queries one would expect in most DHT’s or other deployments of distributed networks.

Finally, in Figure 8 we use the decentralized method to route in a situation when we both have exponential edge costs, and vertices of varying out-degree (in this case a power-law with ). Decentralized cost-greedy search can optimize both for varying costs and vertex degrees at the same time.

## 7 Conclusion

We have presented a method for decentralized search that takes varying costs of routing down different edges into account. We have showed that this method is optimal among all such algorithms that monotonically approach the destination of the query, and that the necessary weights can be calculated iteratively. On small-world graphs, we can calculate the order of costs, and say something about the approximation cost. Beyond these analytic facts, have presented a number of techniques which make the algorithm practical, and experimented with actual implementations using simulation.

It would be very desirable to be able to better motivate our approximations rigorously. To do requires strengthening propositions 3.6 and 3.7, and perhaps a lot of work beyond that. In the short term, proving that any polylogarithmic routing table, and any polynomial number of samples, is sufficient would be a big improvement.

The long term goal of these studies is to try to find adaptive methods for decentralized search when the edge costs are not independent random values, but depend, for instance, on the number of queries that have passed down the edges recently. Such methods for routing with congestion are of interest to deployments of peer-to-peer and other distributed systems.

### References

1. J. Kleinberg. The small-world phenomenon: an algorithmic perspective. In Proceedings of the 32nd ACM Symposium on Theory of Computing (STOC), 2000.
2. J. Kleinberg. Complex networks and decentralized search algorithms. In Proceedings of the International Congress of Mathematicians (ICM), 2006.
3. S. M. Ross. Introduction to Stochastic Dynamic Programming. Academic Press, 1983.
4. J. Kleinberg. Navigation in a small world. Nature, page 845, 2000.
5. L. Barriere, P. Fraigniaud, E. Kranakis, and D. Krizanc. Efficient routing in networks with long range contacts. In Proceedings of the 15th International Symposium on Distributed Computing, DISC’01, 2001.
6. J. Kleinberg. Small-world phenomena and the dynamics of information. In Advances in Neural Information Processing Systems (NIPS) 14, 2001.
7. D. Liben-Nowell, J. Novak, R. Kumar, P. Raghavan, and A. Tomkins. Geograph routing in social networks. In Proceedings of the National Academy of Science, volume 102, pages 11623–11628, 2005.
8. P. Fraigniaud, E. Lebhar, and Z. Lotker. A doubling dimension threshold theta(loglog n) for augmented graph navigability. In Proceedings of the 14th European Symposium on Algorithms (ESA), 2006.
9. O. Sandberg. Neighbor selection and hitting probability in small-world graphs. To appear in The Annals of Applied Probability, 2007.
10. I. Clarke, T. Hong, S. Miller, O. Sandberg, and B. Wiley. Protecting free expression online with Freenet. IEEE Internet Computing, 6:40–49, 2002.
11. I. Clarke. Freenet’s next generation routing protocol, 2003. http://freenetproject.org/ngrouting.html.
12. O. Sandberg. Distributed routing in small-world networks. In Proceedings of the Eighth Workshop on Algorithm Engineering and Experiments (ALENEX06), 2006.
13. Ö. Şimşek and D. Jensen. Decentralized search in networks using homophily. In Proceedings of the 19th International Joint Conference on Artificial Intelligence, 2005.
14. M. Franceschetti and R. Meester. Navigation in small world networks, a scale-free continuum model. Journal of Applied Probability, 43:1173–1180, 2006.
15. T. Stern. A class of decentralized routing algorithms using relaxation. IEEE Transactions on Communications, 25:1092–1102, 1977.
16. C.M. Newman and L.S. Schulman. One dimensional percolation models: The existance of a transition for . Communications in Mathematical Physics, 104:547–571, 1986.
17. G. Singh Manku. Know thy neighbor’s neighbor: the power of lookahead in randomized P2P networks. In Proceedings of the 36th ACM Symposium on Theory of Computing (STOC), 2004.
18. I. Stoica, R. Morris, D. Karger, F. Kaashoek, and H. Balakrishnan. Chord: A scalable Peer-To-Peer lookup service for internet applications. In Proceedings of the 2001 ACM SIGCOMM Conference, pages 149–160, 2001.
You are adding the first comment!
How to quickly get a good reply:
• Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
• Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
• Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters