## Abstract

Multiple sinks competition is investigated for a walker diffusing on directed complex networks. The asymmetry of the imposed spatial support makes the system non transitive. As a consequence, it is always possible to identify a suitable location for the second absorbing sink that screens at most the flux of agents directed against the first trap, whose position has been preliminarily assigned. The degree of mutual competition between pairs of nodes is analytically quantified through apt indicators that build on the topological characteristics of the hosting graph. Moreover, the positioning of the second trap can be chosen so as to minimize, at the same time, the probability of being in turn shaded by a thirdly added trap. Supervised placing of absorbing traps on a asymmetric disordered and complex graph is hence possible, as follows a robust optimization protocol. This latter is here discussed and successfully tested against synthetic data.

## Introduction

Probing the stochastic diffusion on a complex directed network defines a topic of paramount importance and inter-disciplinary breath^{1,2}. Depending on the specific realm of investigation, and the associated degree of abstraction, one can often identify putative microscopic entities which execute erratic motion inside the region of pertinence. In many cases, the hosting spatial support results in a intricate skeleton of interlinked pathways, which can be effectively mimicked in terms of heterogeneous graphs. Human mobility flows on veritable networks with asymmetric edges between nodes, as often roads can be trodden in one direction only. Information spreads on Internet, the cyberspace being *de facto* schematized as a network with asymmetric routing of the links^{3}. In robotics, swarm of automa^{4} interacts via local and long-ranged exchanges so as to coordinate their respective action. Swarming behaviors mediated by the diffusive sharing of resources, are also encountered in biological studies of insects^{5}, ants^{6} and other fields in nature^{7,8}.

Individual constituents, be they molecules, animals or bits of information, stochastically diffusing on the embedding graph should often head to specific targets, ubicated on selected nodes. A web surfer crawling on a chain of hyper-linked pages to reach a given topic of interest^{9}, a molecule hunting for the deputed reaction site in topologically tortuous nano-reactors^{10,11} or porous media^{12}, exciton and electron hole recombination or trapping relevant to photonics and solar-energy science^{13}, these are all examples that testify on the widespread significance of devising optimized searching schemes for a stochastic walker on complex geometries assimilated to networks^{14,15,16,17,18,19,20,21}.

Even more importantly, multiple target sites might coexist and mutually interfere with each other, by screening the flux of incoming ligand particles. Given these premises, it is often decisive to elaborate on viable strategies that could yield the most advantageous positioning of a set of target loci (in terms of their associated capturing ability), given a preexisting population of homologous destination sites. The implications of this fundamental question are twofold. On the one side, smart positioning of absorbing traps, as target nodes are commonly referred to, could translate in efficient man made solutions to a large gallery of technological problems. On the other, it might provide a clue to adaptive plasticity in natural phenomena, as shaped by evolution.

To address this topic we shall consider the stochastic dynamics of a walker bound to explore a directed graph, modified with the inclusion of absorbing traps. As we shall argue, the intransitivity of the examined process is a key ingredient to the forthcoming analysis. For pedagogical reasons, we will specialize on a simplified setting where just two traps are considered, although the analysis will extend straightforwardly to graph endowed with an arbitrary number of absorbing sinks. Assume the first trap to be set a priori on a specific node of the hosting network: is it possible to position the second trap so as to obscure as much as possible the first, and so limiting its capacity to absorb diffusing agents? At the same time, can one minimize the risk that the newly added trap gets in turn weaken by the successive insertion of further absorbing sinks? Inquiring on the aforementioned items implies addressing an optimization problem, that we shall here solve analytically. As we shall argue, the sought optimum depends on the topological characteristics of the scrutinized network, the relevant mathematical quantities depending on the eigenfunctions of the associated discrete Laplacian. The theory will be discussed with reference to a specific family of graphs, which displays the small world effect^{22}. While the optimization problem is trivial and largely uninteresting on directed regular lattices of discretionary connectivity, it is definitely relevant for system hosted on a disordered graph, with long range jumps assigned with a prescribed probability of relocation. Surprisingly, a relatively modest density of long range jumps suffices to yield a meaningful solution to the optimal problem.

To clarify the potential interest of our conclusions, imagine two competitors that are willing to advertise their own products by flagging them on a node of a complex asymmetric network, e.g. a page on the web. The first makes her choice and promotes the activity on a specific site, which configures therefore as an absorbing trap for agents (clients) unawarely surfing around. Following our recipe, the second investor can place the second trap on a designated node which (i) limits the number of visitors that can reach the site flagged by the opponent and (ii) secure a strategic positioning to reduce the risk of being shaded by other competitors that might join the venture. On a different level, strategies for optimal integration of multiple reactive sites might have been at play, from biology to chemistry, to shape the world the way we know it.

As already mentioned, the optimization scheme to which we alluded above exploits a fundamental property which ultimately stems from having assumed an asymmetric, hence directed, spatial support. In the context of game theory this property is termed intransitivity^{23}. Non-transitive games produces at least one loop of preferences: if strategy A is to be preferred over strategy B, and strategy B outperforms strategy C, then strategy A is not necessarily preferred over strategy C. This is for instance the case for the classical rock, paper, scissor game, which is deliberately constructed to yield a three steps loop. A more subtle implementation of non transitive game is provided by the so called Penney’s game^{24}, a head and tail sequence generating game. The first player bets on a binary sequence of assigned length, and discloses it to the second player, who selects in turn another sequence of identical length. A string is produced by successive tossing of a fair coin, and the player whose sequence appears first, as consecutive readings of the toss outcomes, wins. Provided sequences of at least length three are used, and because of the emerging intransitivity, the second player statistically wins over the starting player: for any given sequence of length three (or longer), another sequence can be always found that has higher probability of occurring first. Mathematically, the Penney game can be reformulated as a problem of stochastic diffusion on a directed network, whose nodes are the different sequences of fixed length which can be assembled with a binary alphabet. Remarkably, the non-transitivity relates to the asymmetry of the underlying graph, but the two concepts are to some extent different, as we shall argue in the following. As a matter of fact, the analytical treatment here proposed will materialize in a macroscopic indicator to quantify the global intransitivity of the examined asymmetric graph, enabling one to establish a priori if one contendent can outperform the other or, equivalently if optimal strategies can be played.

The paper is organized as follows. In the next Section, we will consider the problem of traps competitions for a walker diffusing on a regular asymmetric lattice. Operating the continuum limit the problem is mapped into a standard Fokker-Planck equation, in one dimension, subject to two absorbing boundary conditions. The discussion has mainly a pedagogical interest as it sets the stage for the forthcoming generalization. As we shall clarify in the following, the optimal problem returns, in this case, a trivial solution. Then, we will turn to analytically investigate the competition between fully absorbing traps, positioned on a generic graph, as specified by its adjacency matrix. We will in particular derive closed analytical expressions for the asymptotic density absorbed on each of the mutually competing traps, and so immediately assess their respective victory rate, in the spirit of non-transititive games. This information will form the basis for defining the optimization strategy mentioned above. The proposed approach will be exemplified for a class of graphs of (directed) Watts-Strogatz type with a variable long-ranged relocation probability. Finally, we shall sum up and conclude. Technical details are illustrated in Materials and Methods.

## Results

## Competition between traps on asymmetric regular lattices

Assume a walker to hop randomly on a one-dimensional directed regular lattice made of *N* nodes and subject to periodic boundary conditions. Each node is solely connected to its adjacent nearest neighbors. Denote by *a* (resp. *b*) the probability of jumping towards the right (resp. left). Here, *a* and *b* are positive real numbers chosen to match the condition *a* + *b* < 1. The stochastic *N* × *N* matrix **M** which controls the diffusive process is therefore circulant, with entries specified by *M*_{i,i−1} = *b*, *M*_{i,i} = 1 − *a* − *b*, *M*_{i,i+1} = *a* in such a way that , ∀*j*. Notice that in this preliminary example the edges among connected nodes are symmetric. The asymmetry that makes the graph directed comes from the probability which controls microscopic jumps. In the following Section we shall turn to consider graphs that are topologically asymmetric, namely graphs that present an heterogeneous distribution of links. In all cases, for the sake of simplicity, we shall refer to direct or, equivalently, asymmetric networks.

In the continuum limit, assuming that nodes are densely distributed on the circle, the probability of seeing the walker in a specific spatial location (identified by the continuum variable *x*) is governed by:

where *v* = *b* − *a* and *D* = (*a* + *b*)/2 respectively denotes the drift velocity and the diffusion constant. In performing the continuum limit we are implicitly setting both space and time elementary intervals to unit. Working in this context, and given any fixed pair of nodes, *i* and *j*, we aim at evaluating their relative scores in terms of visits of independent and mutually transparent random walkers. More specifically, we imagine *i* and *j* to act as fully absorbing traps. Starting from a uniform distribution (nodes are equally populated at time *t* = 0), we wish to estimate the number of paths that take a walker to *i* (without hitting *j*) and viceversa. This analysis translates into a scalar indicator *V*_{ij}, positive and smaller than one, if properly normalized, that weights the probability of *i* to *win over j*. Conversely, *V*_{ji} will measure the probability of *j* to prevail over *i*. Clearly, *V*_{ij} + *V*_{ji} = 1, as it follows from the obvious conservation of the total probability. In the end, a *N* × *N* matrix *V* can be obtained that quantifies the probability of every node to win against any other selected competitor site. The diagonal elements of *V* are arbitrarily set to zero.

To determine explicitly the matrix *V* we first position two fully absorbing traps in respectively node *i* and *j*. Then, we divide the circle (regular lattice under periodic boundary conditions) into two distinct domains, as schematically depicted in Fig. 1. One domain is constituted by the *n* nodes encountered when circulating from *i* to *j*, clockwise. The ensemble made by the complementary *N* − *n* nodes (from *j* to *i*, clockwise) defines the second set. To quantify the asymptotic density of walkers that fall on each trap, we need to solve the Fokker-Planck equation (1), inside both domains and subject to absorbing boundary conditions at their respective edges. More specifically, we will consider the general solution of the Fokker-Planck equation defined on a one dimensional segment [0, *L*], with *p*(0, *t*) = *p*(*L*, *t*) = 0. Further, we shall begin by assuming as initial condition a Dirac delta centered in *x*_{0} = *αL*, with 0 < *α* <1. Following Farkas *et al*.^{25} (see Materials and Methods), the sought solution reads:

where

and:

Here *θ*_{3}(·,·) stands for the Jacobi theta function. We are now in a position to evaluate the probability current *J*(*x*, *t*) = −*D*∂_{x}*p*(*x*, *t*) + *vp*(*x*, *t*), flowing to the boundaries, namely *J*(*L*, *t*) e *J*(0, *t*). As outlined in Materials and Methods, one eventually gets:

where , and where we have introduced the positive quantity *J*_{→}(*t*) (resp. *J*_{←}(*t*)) to denote the current flowing from the right (resp. left) boundary. The probability that particles get absorbed to either right () or left () boundary is obtained by respectively integrating *J*_{→}(*t*) and *J*_{←}(*t*) to yield:

To estimate the relative performance of the two traps *i* and *j*, we have to generalize the analysis to the case of an initial uniform distribution of the walkers on the lattice. For this reason, we shall integrate the above expressions over the allowed interval in *α* to yield:

These preliminary relations will be used to assess the relative performance of the two traps *i* and *j*. We recall that the circular lattice that defines the spatial background of the model has been split into two distinct domains: the first formed by the *n* nodes, visited when going from *i* to *j*, clockwise. The second domain is constituted by the remaining *N* − *n* nodes, encountered when circulating the ring clockwise from *j* to *i*. With reference to the former, stands for the flux of particles that eventually hits *j*, while refers to the particles that are eventually attracted towards *i*. For the other domain, the situation is clearly specular. Hence, the probability *V*_{ij} that a diffusing agent is eventually attracted to node *i* instead of node *j* (i.e. without passing from node *j*) is the sum of two terms: calculated for *L* = *n* and with *L* = *N* − *n*. The first term should be weighted by a factor *n*/*N* to reflect the average over the initial uniform distribution, while the second needs to be multiplied by a factor (*N* − *n*)/*N*. In formulae:

With analogous consideration one gets:

For diffusion prevails over drift: on average, half of the particles are expected to fall on trap *i* and the remaining ones to get absorbed by trap *j*. This is in turn the limit of a symmetric adjacency matrix for the investigated stochastic dynamics, that yields *V*_{ij} = *V*_{ji} = 1/2. At variance, for large values of the ratio *v*/*D*, the exponential functions in equations (11) and (12) can be neglected and one eventually obtains , and, obviously .

The intransitivity ultimately stems from the underlying network asymmetry, here implemented through unbalanced jumping rates. Although related, the concepts of asymmetry and intransitivity are however subtly different. When the adjacency matrix is asymmetric, it is not a priori guaranteed that, for any selected node *i*, at least another node *j* exists that wins over *i*. Stated differently, for a generic random walker hopping on a directed graph, the entries of a given column(s) of matrix *V* can be in principle smaller than 1/2. In the following, we are interested in identifying a specific subclass of asymmetric networks, that we shall term globally intransitive. For these networks, any trap *i* can be always (statistically) outperformed, in terms of its ability to absorb, by at least another trap, positioned on a given node *j*. To formally classify the asymmetric network according to this scheme, we introduce an *index of global intransitivity*, *η*, calculated via the following procedure. We select the maximum from each column of *V*, and then identify the global minimum among collected values. This latter quantity is then shifted by −1/2, to yield the index *η*, which is therefore bound to the interval [−1/2, 1/2]. If *η* is positive the system is globally intransitive, according to the definition evoked above. Classical measures of networks intransitivity rely on triad census. The transitivity coefficient of a network, often termed *clustering coefficient*, is the ratio of the number of loops of length three and the number of paths of length two^{2}. In other words, the clustering coefficient quantifies the frequency of loops of length three in the network. The parameter *η* returns instead a more general estimate of the intransitivity degree, as it does require assuming a priori a specific size of underlying loops.

For the case under scrutiny of a regular asymmetric lattice, *η* → 0, when the drift is virtually silenced (*v*/*D* → 0) and the process approaches the symmetric limit. Conversely, for *v*/*D* ≠ 0, *η* > 0 and it approaches the limiting value *η* → 1/2 for *v*/*D* → ∞. The process of asymmetric particles’ hopping on a regular lattice with short ranged connections is therefore globally intransitive for any *v*/*D* ≠ 0.

Since the process is always globally intransitive, a secondly added trap can always be found that wins over the first, by attracting more walkers. Is it however possible to position the second competing trap (*j*) on a node that reduces as much as possible the risk of being obscured by yet another trap, the third of the sequence, while still performing better than the first (*i*)? To answer this question, we take advantage of the composite information stocked inside matrix *V*. We introduce in fact an additional indicator, called *σ*_{ij} and defined as follows:

The larger the value of *σ*_{ij} the less the average screening on trap *j* (selected after trap *i*), as exerted by an hypothetical third trap, installed in one of the remaining *N* − 2 nodes of the network. Notice that, by definition, *σ*_{ij} stays in the interval [0, 1].

Building on the above we are now in a position to define a supervised strategy for optimizing the selection of trap *j*, given the pre-defined location of trap *i* and for a stochastic diffusion process, taking place on a globally intransitive graph. For fixed *i*, the key idea is to select *j* in such a way that it both maximizes *V*_{ij}, the factor that quantifies direct competition versus *i*, and *σ*_{ij}, a measure of competition against the residual bulk. In Fig. 2 *V*_{ij} is plotted versus *σ*_{ij} for regular one-dimensional asymmetric lattices, characterized by increasing values of *v*/*D* amount. Different symbols refer to different choices of *v*/*D*. In carrying out the analysis we considered all possible combination of *i* and *j*. As it can be clearly appreciated by visual inspection, the data align on a almost vertical line, the value of *σ*_{ij} being, for practical purposes, constant. The larger the value of *v*/*D*, the wider the vertical band. Optimizing the selection of node *j*, given *i*, proves therefore a trivial exercise, when the system is made to diffuse on a regular directed lattice: the best choice is to select the node *j* which maximizes the *V*_{ij} score, irrespectively of the corresponding *σ*_{ij}. The newly introduced trap will be manifestly fragile, as concerns the successive intrusion of additional traps. As we shall see in the following section, complex asymmetric networks, that accommodate for directed long-range jumps to distant sites, yield however a definitely richer scenario and, consequently, more intriguing optimization protocols.

Before concluding this Section, we remark that, in the limit *v*/*D* → ∞, the matrix element . Hence, *σ*_{ij} as defined in (13) can be calculated analytically to return *σ*_{ij} = (*N* − 3)/(*N* − 2)/2 + *n*/(*N* − 2)/*N*, where *n* refers to the number of sites entrapped in between node *i* and *j*, see Fig. 1. This latter estimate accurately explains the peculiar distributions as seen in Fig. 2.

## Traps on a directed disordered network and the optimization problem

We here aim at extending the above analysis to the case of a walker that is randomly diffusing on a generic directed network. The entries of the adjacency matrix are one, if two nodes are mutually connected, or zero otherwise. Hence, at variance with the case considered above, the asymmetry of the support is topological, namely related to the distribution of assigned edges, while the probability of individual jumps is constant and set to one, without loss of generality. In the following, we shall denote with *M* the stochastic matrix obtained by dividing the columns of the adjacency matrix by the associated nodes connectivity.

As discussed above we are interested in resolving the degree of mutual interference between two distinct traps, respectively located in *i* and *j*. Walkers can reach the absorbing traps, but cannot escape from them. To accommodate for this effect we replace the *i*-th and *j*-th columns of matrix *M* with zeros, except for the diagonal elements which are instead set to one. The obtained matrix is hereafter referred to as to *M*^{[i,j]}. The master equation that governs the evolution of *p*_{k}, the probability of detecting a particle on node *k*, reads:

where is the Laplacian operator in presence of absorbing traps. Again we implicitly assume discrete time updates with Δ*t* = 1. The last equality in (14) follows immediately from the normalization condition . To solve the linear problem (14) we need to develop the time dependent probability on a proper basis, which diagonalizes the Laplacian operator. The associated eigenvalue problem takes the form where *λ*^{(α)} and *ψ*^{(α)} define, respectively, the eigenvalue and its associated, *N*-dimensional, eigenvector. It can be proven that two eigenvalues of the discrete Laplacian operator exist which are identically equal to zero and that reflect the imposed absorbing traps. Importantly, and because of the asymmetry of the network, all remaining eigenvalues are complex, and bear a negative real part. The eigenvectors that correspond to null eigenvalues have a rather simple structure: all their components are zero, except for the entry identified by the consonant trap index. This latter component is equal to one. The eigenvectors associated to the Laplacian operators are linearly independent, but they do not constitute an orthonormal basis, as it instead happens when the underlying graph structure is supposed to be symmetric. To solve the linear equation (14) we shall preliminarily define an appropriate orthonormal basis {**u**^{(β)}}, expressed in terms of the original eigenvectors *ψ*^{(α)} of the Laplacian operator. As we shall see, the request of dealing with an orthogonal basis is fundamental to carry out the forthcoming derivation. Mathematically, one can always find a linear transformation such that , where *C* is the *N* × *N* matrix that specifies the change of basis. This can can be calculated via a straightforward implementation of the Gram-Schmidt algorithm. We can hence set:

where represents the coefficients of the expansion on the introduced orthonormal basis. Inserting the above ansatz into equation (14) and carrying out the calculation, that we discuss in some details in the Materials and Methods Section, one eventually obtains the following explicit solution:

The asymptotic solution that is relevant for our purposes can be readily obtained, by performing the limit for *t* → ∞ in (16), and so yielding:

where use has been made of the fact that two eigenvalues (those associated to the traps) are zero and all the other have negative real parts (their contributions, stored in the exponential, fade away in the large time limit). In the above equation (⋅)^{*} stands for the complex conjugate. Recall now that e , which allow to further simplify equation (17) as:

Eventually the walker has to land either on site *i* or *j*, where the absorbing sinks are located. The relative ability of *i* and *j* to trap stochastically diffusing entities is quantified through the following elements of matrix *V*:

and

with *p*_{l}(0) = 1/*N*, in the relevant case where the initial condition is assumed to be uniform. Having determined the elements of the matrix *V*, we are in the position to estimate both the global intransitivity index *η* and the parameter *σ*_{ij} as defined in the preceding Section. As we will demonstrate in the following, the optimization problem discussed above admits a non trivial solution, when the hosting graph is heterogeneous, and as opposed to the simplified setting where the diffusion occurs on a regular asymmetric lattice. Incidentally, we note that the above relations provide closed analytical solutions to the family of Penney’s games.

To prove our claim we consider a family of directed graphs generated via a straightforward procedure which is adapted from the Watts-Strogatz recipe. Assign the desired number of nodes *N* and be *K* their assigned constant degree (connectivity). We then construct a *K*-regular ring lattice, by connecting each node to its *K* nearest neighbors, on one side only. Then, for every node *i*, we select all its associated edges and rewire them with a given probability *p* ∈ [0, 1]. Rewiring implies replacing the target node, with one of the other nodes, selected with a uniform probability from the ensemble of possible destination sites. The rewiring is directed and the outgoing connectivity is preserved. In Fig. 3 we report *η* as a function of the connectivity *K*, for (i) the *K*-ring lattice, and the corresponding disordered graph obtained by imposing a different probability of rewiring, respectively (ii) *p* = 0.02 and (iii) *p* = 0.2. In all cases the index *η* is positive, hence implying that the system is globally intransitive, a prerequisite condition for the optimization protocol to be applicable. Moreover *η* decreases as *K* is increased and, more importantly, as *p* gets larger. The more disordered the graph, the less intransitive the network appears at the global scale, a reasonable result as rewiring amounts to breaking the perfect asymmetry of the initial lattice and so enforcing a macroscopic symmetrization in the topology of the hosting support.

We now turn to consider the optimization process, following the approach illustrated in the preceding Section. We recall that the idea is to select the location of the second trap *j*, after having fixed the first one *i*, so as to maximize, at the same time, *V*_{ij}, the measure of direct competition versus *i*, and *σ*_{ij}, the quantity that controls the degree of competition against the remaining *N* − 2 nodes. The results of analysis are reported in Fig. 4, for two different choices of the parameter *p* (top and lower panels, respectively). For a given network realization, we select a generic node *i*, which identifies the location of the first trap. The *N* − 1 symbols scattered in the plane (*σ*_{ij}, *V*_{ij}) (panels in the left) gauge the performance of the other nodes, imagined as the competitor trap *j*.

Performing the same analysis for the limiting case *p* = 0, returns a distribution that is substantially uninteresting in the perspective of devising a viable optimization strategy, consistently with the analysis carried out in the preceding Section (data not shown). For *p* ≠ 0, instead, the distribution of points gets distorted and progressively elongates along the bisectrix, as clearly testified by visual inspection of Fig. 4. Remarkably, the more the global intransitivity index *η* gets reduced, the more the density points tend to populate the top-right portion of the parameter plane, which incidentally identifies the region of interest for the optimization method here addressed. To cast it differently, when the graph becomes disordered, while still being asymmetric, it is definitely possible to operate a supervised selection of an absorbing sink *j*, for *any* given choices of *i*, that outperforms the latter in terms of ability to attract and, still, minimizes the risk of being in turn buried by successively added traps. The rightmost panels of Fig. 4 display the density plot obtained upon averaging over 20 independent realizations of the networks, generated with an assigned rewiring probability *p*. The trend agrees with the general conclusion illustrated above for a specific choice of *i*. It is remarkable that a modest amount of long-range edges suffice to yield a significant optimization scenario. This is made clear in the annexed movie (supplementary information movie), where the density plots are displayed for increasing values of *p*, in a range of definition that returns a sensible optimization scheme. When *p* exceeds a given threshold, the networks is too unstructured to allow for a global optimization, even if local strategies can be played in light of the persistent grade of intransitivity.

Before ending this Section, we wish to assess the effectiveness of the proposed method. With reference to the choice *p* = 0.02, we place the second trap in the optimal position, as identified in the top left panel of Fig. 4. We evolved numerically the stochastic dynamics of the system, starting from a uniform initial distribution, and found that trap *j* captures almost 75% of the diffusing agents, the remaining ones heading to *i*. But what is going to happen when a third trap is introduced into the competition? Averaging over the *N* − 2 possible locations of the third trap, we see that the second trap still has the lion’s share with about 50% visits out of the total. Conversely, when the second trap *j* is assigned to the sub-optimal position, as highlighted in Fig. 4, it is solely invested by 15% of the total flux, the remaining quota being directed towards the other two competing sinks. These results are schematically summarized in the insets of the top-left panel of Fig. 4. For the case *p* = 0.2, a similar scenario holds: the optimal trap *j* scores 85%, while trap *i* displays only 15%. Inserting the third trap proves mainly at the detriment of the first sink, the second winning the competition with a final 60% score. If trap *j* is assigned to its sub-optimal configuration, as depicted in Fig. 4 (lower-left panel), the final score is as expected very modest 15%. The histograms inserted in the left-lower panel of Fig. 4 summarizes these results. Finally, we varied *j*, among those nodes that display similar *V*_{ij} entries, for *i* fixed. Reducing *σ*_{ij} is indeed beneficial, as anticipated by our interpretative scheme.

## Conclusions

Complex webs of interactions between individual constituents are everywhere, from the Internet to epidemic spreading, via the molecular processes occurring inside a cell. Hence, studying the stochastic diffusion of microscopically entities confined on a heterogeneous and disordered spatial support defines a topic of investigation of broad applied and fundamental interest. In many cases, randomly hopping agents are chasing for specific target sites, where reactions can supposedly take place. These latter sites configure as absorbing traps. When multiple sinks are simultaneously present on a given network, they can eventually interfere with each other, and mutually screen the flux of incoming ligand agents. Optimization strategies are in principle possible that could result on the most advantageous positioning of an ensemble made of competing traps, so as to minimize their reciprocal hindrance and favor cooperation. On the other hand, it could be strategically advantageous to maximize the mutual competition between traps, so that the lastly added sink prevails over previously existing ones. Shedding light onto such an issue can contribute to explain a large plethora of natural phenomena, as shaped by the evolutionary pressure and devise novel efficient man made solutions to specific technological problems.

In this paper we have specifically considered the stochastic dynamics of a walker diffusing on a directed static graph, endowed with two absorbing sinks. Given the network, we imagined the location of the first trap to be assigned a priori. The position of the second trap is designated so as to obscure as much as possible the first, upon estimation of a quantitative indicator that characterizes the degree of pair-interference. At the same time, an optimal location of the second absorbing sink can be determined that allows to minimize the average screening due to a newly added (third) trap. Analytical formulae are derived which implicitly depend on the topology of the scrutinized network and that enable us to tackle the above optimization process. For walkers diffusing on a regular lattice, and subject to a constant drift, the optimization protocol is largely ineffective: for any given trap *i*, a competitor sink *j* can always be found that absorbs a substantial amount of incoming flux of diffusing agents, at the detriment of *i*. The average screening coming from an hypothetic third trap is however relevant and substantially independent on the specific location of the assigned trap *j*. As opposed to this conclusion, the proposed optimization strategy is definitely significant when the random walker is made to diffuse on a disordered directed graph, with long range relocation edges. A modest degree of disorder suffices to yield an effective optimization scheme, as we demonstrated in the paper for specific family of asymmetric complex networks of the Watts Strogatz type. Explicit formulae are derived which materialize in a new class of indicators for the topological characteristic of complex random graphs. Interestingly, and as a side result, we also propose a global measure for the grade of intransitivity of a network, which prescinds from identifying closed loops of a given size, as customarily done. The analysis here carried out could be relevant for a large plethora of applications, where multiple reactive sites are concurrently at play. Smart positioning of fully or partially absorbing traps might also translate in innovative non-invasive strategies to control, and consequently shape, the response of a dynamical systems bound to evolve on a complex network-like spatial support.

As a final comment we emphasize that the procedure here outlined ultimately requires determining the eigenvectors of the Laplacian matrix, with an associated algorithmic cost which scales as *N*^{3}. For large networks, this is a computationally demanding task and other suboptimal procedures might be devised, which would return approximate solutions to the examined problem. Relevant dynamical information prior absorption on the traps, are for example stored in the so called quasi stationary distribution. This can be mathematically accessed by computing a limited set of eigenvectors, so resulting in principle in a significant reduction of computationally complexity. Alternatively, one could build simplified representations of the original network which exploit, where possible, its modular, community-like, structure. In doing so one could eventually define a large-scale backbone of the network for the optimization protocol to be implemented. The degree of imposed coarse graining, could reflect the available computational resources. Future investigations will be targeted to shed light onto these possibilities.

## Materials and Methods

## Explicit solution of the 1D Fokker-Planck with two absorbing boundaries

The solution of the Fokker-Planck equation employed in the main text follows the derivation by Farkas *et al.*^{25}, that we shortly review in the following. Introduce the operator which is defined on where *D*^{2} identifies the set of twice differentiable functions. If *ϕ*_{λ} ∈ *D*_{F} is an eigenfunction of *F* associated to the eigenvalue *λ*, then *e*^{λt}*ϕ*_{λ} is a particular solution of the Fokker-Planck equation (1). The operator *F* can be made Hermitian by defining the scalar product as:

We can therefore find a orthonormal basis formed by the eigenfunctions of *F* which read:

The associated eigenvalues are .

Hence, by denoting with *ϕ*^{0}(*x*) the initial probability distribution, one can cast the solution of the Fokker-Planck equation (1) in the explicit form:

Assuming the initial distribution to be a delta function centered in *x*_{0} = *αL* (0 < *α* < 1) yields

from which equation (2) immediately follows.

## The case of a generic network: details of the calculation

By inserting ansatz (15) in equation (14), one gets:

To proceed we make explicit the dependence on the eigenvectors:

Since *ψ*^{(α)} are linearly independent, one gets:

which yields:

Making use of the above relations we obtain:

The only quantity that we have to determine is , that we wish to express as a function of the initial condition *p*_{k}(0). To this end we make use of the inverse of (15):

that, introduced into equation (29), results in the general solution reported in the main text. Finally, let us verify that equation (30) is indeed the inverse of (15). In formulae:

where use has been made of the condition . It is hence clear the importance of dealing with an orthonormal basis to carry out the calculation.

## Additional Information

**How to cite this article**: Cencetti, G. *et al.* The second will be first: competition on directed networks. *Sci. Rep.* **6**, 27116; doi: 10.1038/srep27116 (2016).

## References

- 1.
A. Barrat, M. Barthelemy & A. Vespignani. Dynamical processes in complex networks. (Cambridge University Press, New-York. (2008).

- 2.
S. Boccaletti

*et al.*Complex networks: Structure and dynamics Physics reports**424**(4), 175–308 (2006). - 3.
W. John, M. Dusi & K. C. Claffy. in Proceedings of the 6th International Wireless Communications and Mobile Computing Conference (ACM, New York, NY, USA 2010), IWCMC 10, pp. 473–478.

- 4.
M. Rubenstein, A. Cornejo & R. Nagpal. Programmable self-assembly in a thousand-robot swarm.

*Science***345**, 795–799 (2014). - 5.
D. H. Kelley & N. T. Ouellette. Emergent dynamics of laboratory insect swarms.

*Scientific Reports***3**, 1073 (2013). - 6.
S. Goss, S. Aron, J. L. Deneubourg & J. M. Pasteels. Self-organized shortcuts in the Argentine ant.

*Naturwissenschaften***76**, 579–581 (1989). - 7.
E. Bonabeau, M. Dorigo & G. Theraulaz. Swarm Intelligence: From Natural to Artificial Systems (Oxford Univ. Press, New York 1999).

- 8.
M. Ballerini

*et al.*Interaction ruling animal collective behavior depends on topological rather than metric distance: Evidence from a field study.*Proc. Natl. Acad. Sci. USA***105**(4), 1232–7 (2008). - 9.
F. Di Patti, D. Fanelli & F. Piazza. Optimal search strategies on complex multi-linked networks.

*Scientific Reports***5**, 9869 (2015). - 10.
Y. Lu & M. Ballauff. Thermosensitive core-shell microgels: From colloidal model systems to nanoreactors.

*Progress in Polymer Science***36**, 767 (2011). - 11.
N. Welsch, A. Wittemann & M. Ballauff. Enhanced Activity of Enzymes Immobilized in Thermoresponsive Core-Shell Microgels.

*Journal of Physical Chemistry B***113**, 16039 (2009). - 12.
O. Benichou, C. Chevalier, J. Klafter, B. Meyer & R. Voituriez. Geometry-controlled kinetics.

*Nature Chemistry***2**, 472 (2010). - 13.
R. Kopelman. Reaction kinetics: Catalysis without a catalyst.

*Nature Chemistry.***2**, 430–431 (2010). - 14.
J. M. Kleinberg. Navigation in a small world.

*Nature***406**, 854 (2000). - 15.
S. H. Lee & P. Holme. Exploring Maps with Greedy Navigators.

*Phys. Rev. Lett.***108**, 128701 (2012). - 16.
K. Komidis, S. Havlin & A. Bunde. Structural properties of spatially embedded networks.

*Europhys. Lett.***82**, 48005 (2008). - 17.
G. Li

*et al.*Towards Design Principles for Optimal Transport Networks.*Phys. Rev. Lett.***104**, 018701 (2010). - 18.
G. Li

*et al.*Optimal transport exponent in spatially embedded networks.*Phys. Rev. E***87**, 042810 (2013). - 19.
Y. Lin & Z. Zhang. Mean first-passage time for maximal-entropy random walks in complex networks.

*Sci. Rep.***4**, 06 (2014). - 20.
C. L. N. Oliveira, P. A. Morais, A. A. Moreira & J. S. Andrade. Enhanced Flow in Small-World Networks.

*Phys. Rev. Lett.***112**, 148701 (2014). - 21.
G. Oshanin, K. Lindenberg, H. S. Wio & S. Burlatsky. Efficient search by optimized intermittent random walks.

*J. Phys. A: Math. Theor.***42**, 434008 (2009). - 22.
D. J. Watts & S. H. Strogatz. Collective dynamics of small world networks.

*Nature***393**(6684), 440–442 (1998). - 23.
M. Gardner. On the paradoxical situations that arise from nontransitive relations.

*Sci. American***231**, 120–125 (1974). - 24.
W. Penney.

*Journal of Recreational Mathematics***2**, 241 (1969). - 25.
Z. Farkas & T. Fülöp. One dimensional drift-diffusion between two absorbing boundaries: application to granular segregation.

*J. Phys. A: Math. Gen.***34**, 3191–3198 (2001).

## Author information

## Affiliations

### Dipartimento di Ingegneria dell’Informazione and CSDC, università degli Studi di Firenze, via S. Marta 3 I-50139 Firenze, Italy

- Giulia Cencetti

### INFN, Sezione di Firenze, Florence, Italy

- Giulia Cencetti
- , Franco Bagnoli
- , Francesca Di Patti
- & Duccio Fanelli

### Dipartimento di Fisica e Astronomia and CSDC, università degli Studi di Firenze, via G. Sansone 1, 50019 Sesto Fiorentino, Italia

- Franco Bagnoli
- , Francesca Di Patti
- & Duccio Fanelli

## Authors

### Search for Giulia Cencetti in:

### Search for Franco Bagnoli in:

### Search for Francesca Di Patti in:

### Search for Duccio Fanelli in:

## Contributions

F.B. and D.F. conceived the study. G.C., F.B., F.D.P. and D.F. performed the calculations. G.C. performed the numerical simulations. G.C., F.B., F.D.P. and D.F. analyzed the results and wrote the manuscript.

## Competing interests

The authors declare no competing financial interests.

## Corresponding author

Correspondence to Duccio Fanelli.

## Supplementary information

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/