Interacting Urns Processes for Clustering of Large-Scale Networks of Tiny Artifacts

We analyze a distributed variation on the Pólya urn process in which a network of tiny artifacts manages the individual urns. Neighboring urns interact by repeatedly adding the same colored ball based on previous random choices. We discover that the process rapidly converges to a definitive random ratio between the colors in every urn. Moreover, the rate of convergence of the process at a given node depends on the global topology of the network. In particular, the same ratio appears for the case of complete communication graphs. Surprisingly, this effortless random process supports useful applications, such as clustering and computation of pseudo-geometric coordinate. We present numerical studies that validate our theoretical predictions.


Introduction
Designers of distributed algorithms often assume that each node is computationally powerful, capable of storing nontrivial amounts of data, and carrying out complex calculations.However, recent technological developments in wireless communications and microprocessors allow us to establish networks consisting of massive amounts of cheap and tiny artifacts that are tightly resource constrained.These networks of tiny artifacts are far more challenging than the traditional networks; on one hand, their relative scale is enormous, while on the other hand, each tiny artifact can only run a millicode that is aided by a miniature memory.Such limitations are not crippling if the system designer has a precise understanding of the tiny artifacts' computational power and local interaction rules from which global formation emerges.
1.1.Related Work.Urn processes (and more generally processes with reinforcements) are a tool for modeling stochastic processes that show emerging structures.Their aim is to analyze the global structure of a given population given the micromechanisms the particular entities are applying.The global structure reflects the ability of the entities to self-organize.Such models can explain the preferentialattachment model in small-world networks, the process of market sharing, interaction of biological entities, and so forth, based on given micromechanisms.We refer to [1, and references therein] for reinforcement processes, for models based on urn models see [2], and for the emergence of structure we refer to [3].
Tishby and Slonim [4] use random processes for network clustering.The authors use a Markov process and the clusters are built by considering the decay of mutual information.The information changes with time, and during an appropriate period, the mutual information is relevant for clustering.After this period, the mixing property of the Markov process destroys the emerged structure.The random processes we suggest converge so slowly that the mixing property is useful for tolerating various faults.Nevertheless, the process obtains the significant values rapidly.
Angluin et al. [5] define urn automata that include a state controller and an urn containing balls with a finite set of colors.Tiny artifacts can implement the urn automata with provable guarantees regarding their computational power and, by that, allowing the exact analyses of the interaction process among artifacts.This work aims at understanding the International Journal of Distributed Sensor Networks possibilities of the urn automata to emerging global formations using miniature algorithms and diminutive resources.

Our Contribution.
In this paper our aim is to extend the classical urn process to a network of interacting urn processes and to analyze the emerging global formation, which is carried out by a low-level interaction process.The network of tiny artifacts repeats the following operations.Each urn has a multiset of black and white balls, initially one of each color.A given tiny artifact draws a ball from the urn with uniform distribution and returns to the urn the ball along with a new ball of the same color.(This is a classical P ólya urn [6].)The tiny artifact interacts with its neighbors on the network.Namely, after returning the two balls, the tiny artifact announces the balls' color to its neighbors, and the neighbors add a new ball of that color to their urns.The selection of the artifact drawing the ball from the urn is random and uniform (any artifact might be selected with the same probability).
Indeed, if we assume that, before drawing from the urn, the tiny artifacts wait for a random time with λ-exponential distribution, then globally, the tiny artifacts are going to be selected uniformly without any global synchronization.(The implementation of this assumption in distributed systems is considered in Section 4.) Notice that the algorithm steps are composed of the following operations: (1) an urn balldrawing operation, (2) a ball announcement operation, and (3) an update of the urn by the drawing tiny artifact and its neighboring urns.Concurrent steps should interleave carefully; we require that at most one artifact among any set of neighbors is accessing its urn at a time and announces its ball drawing, and no neighboring artifact takes a step before all neighboring artifacts update their urns.
This work presents the following.
(i) First is an analysis of the interacting urns process, allowing us to demonstrate that the ratio between the numbers of black and white balls in every urn is converging and that these ratios, which are obtained locally, provide global information about the communication graph.(ii) Second are the applications for large-scale networks of tiny artifacts include clustering and the computation of pseudogeometric coordinates.We present numerical studies that validate our theoretical predictions on the emerging global formations.
Self-stabilizing systems [7,8] can recover after the occurrence of transient faults.These systems are designed to automatically regain their consistency from any starting state.The property of self-stabilizing facilitates the requirements of self-organization in ad hoc networks [9][10][11].
(iii) The interacting urn process analysis assumes undisturbed steps and that all urns are selected with the same probability.We explain how to implement the interacting urn process in a self-stabilizing manner (see [8]).We use existing self-stabilizing building block that facilitates the announcement of ball drawing on shared communication media.

The Interacting Urns Process
There is no unified way of analyzing the behavior over time of the type of systems we consider in this paper.These systems usually cannot be understood with Markovian formalism.Indeed, the system behavior over time is Markovian but describing the process in this way leads to an intractable set of equations.Relative to these kinds of processes, which are characterized by path-dependence or (negative) reinforcement, we can find various ad hoc techniques.Many references are available from the survey [1].We show that there is a connection between a time-based analysis of the interacting urns process and multitype branching process [12].We use this connection and existing literature to that the evolution equations of the interacting urns processed.We start by establishing firmly how the tiny artefacts randomly draw balls from their urn with a uniform probability.For the sake of presentation simplicity, we assume in Lemma 1 that within a single operation that takes no time, we can draw a ball and advertise it, that is, announce the ball's color to all neighboring urns.(In Section 4, we consider a possible implementation that does not require this assumption.)Lemma 1.We consider N artefacts which repeatedly wait for an λ-exponentially distributed random time independently of each other before proceeding to a random draw.Then, the probability that artefacts proceed to a random draw is uniform.
Proof.A λ-exponential waiting time can be facilitated by the following p-persistence-like technique.Every artefact decides with probability 1 − λ • h to wait for a period of h time units and not to draw a ball and with probability λ • h it decides to draw a ball and announce the ball's color to all neighboring urns.The λ-exponential distribution is obtained as h → 0. It is easy to check that as h → 0, the probability that two artefacts draw a ball simultaneously vanishes.This proves the lemma because during short period h time units, the artefacts independently decide to draw a ball or not.
As a conclusion from Lemma 1, we say that the artefacts wait independently for a random exponentially distributed random time (with the same parameter λ) and then draw and announce a random ball from their urns.Let N be the number of artefacts composing the network.The state of the interacting urns process is described by the vector: , where the index i ∈ {1, . . ., N} refers to a particular artefact.(The T is the transpose operator which is used to denote the vectors column-wise, as usual.)(The presentation analysis uses urns' indices.However, the interacting urns are anonymous; that is, the urns do not know their indices and do not use unique identities in their computations or communications.)To simplify the presentation, we start by writing down the equations for the total population belonging to the urns Z i (t) = b i t + w i t .Every time the artefact owner or one of its neighboring artefacts proceeds to a random draw, the population size in a given urn i increases by one unit.Then, asymptotically, the population size increases linearly with time and proportionally to (deg(i) + 1).
In order to look at the evolution of our process described by the state vector Z(t), we need to compute the probabilities P(Z(t) = ( j 1 , . . ., j N )) for each N-tuples ( j 1 , . . ., j N ), such that j i ≥ 0, for all i = 1, . . ., N. To manipulate the N-tuples, we use classical conventions.We denote vectors with boldface characters, for example, j = ( j 1 , . . ., j n ).We also expand the notation for the exponential in the classical way.That is, s j denotes the vector (s j1 1 , . . ., s jN N ) and similar notations for vector-valued functions.
A convenient way of pursuing the computations is to use the probability generating function given by F(t, s) := j=( j1,..., jN )≥0 where E(•) is the expectation operator.The function F(t, S) is called the probability generating function since it is possible to compute the probability function using it.In order to prove the existence of F(t, s), we are now going to characterize the function by computing the Fokker-Planck equation [13,14] (also known as Kolmogorov forward equation).Moreover, we are using this characterization to show that some results available in the literature are applicable to our model and lead to a time-based description of the interacting urn process.
In order to compute the probability generating function, we first compute E(s Z(t+h) | Z(t)), where E(• | Z(t)) is conditional expectation given that Z(t) is known.Using the description of the λ-exponential random time used in the proof of Lemma 1 shows that

Z(t)
with probability 1 where the jth entry of the vector n k is 0 or 1 to indicate that the jth artefact is a neighbor or not of k, and the vector n k is a line of the adjacency matrix describing the network connections.We define that each artefact is its own neighbor.(This is a slight departure from the conventional notation.)In other words, adding the vector n k to the state vector Z(t) corresponds to the situation where the artefact k proceeds to a random draw and adds a ball in its urn as well as in its neighbor's urns.Then, we get From ( 4), we obtain by computing the expectation on both side and passing to the limit h → 0 Equation ( 5) is called the Fokker-Planck equation [13,14] (also known as Kolmogorov forward equation).Solving this equation provides the complete knowledge of the probability that the state vector Z(t) is in a given state at time t.We are using this equation in order to derive another one which describes the evolution of the expectation of the number of balls in a given urn, that is, Secondly, by construction we have that asymptotically as t → ∞ we have the approximation Z k (t) ≈ tλ(deg(k) + 1).We then have as the time t is large the approximation By differentiating both sides of ( 5) with respect to s j and using the approximation above, we obtain that for large t, We then obtain a differential equation for m j (t) by differentiating both sides of this last equation with respect to ∂/∂s j and evaluating the expression at s = 1.This leads to where δ j∼k is 1 if j and k are neighboring artefacts and 0 else.In the limit t → ∞, the limit m(t) tends to the solution of ( 8) where the approx sign ≈ is replaced by an equality.This is due to the fact that the solution of (8) converges to a unique limit.In the following, we unashamedly proceed to the substitution.The term t is removed from the equation with the substitution m(log(t)) = m(t), from which we get or written in matrix form and removing the tilde, where A d = (δ i∼ j ) i, j=1,...,N , I is the N × N identity matrix, and D is a diagonal matrix with d ii = 1/(deg(i) + 1).The FokkerPlanck equation ( 7) is one of a multitype branching process with constant rate (λ k (t) = λ k ).From [12,15], we know that where Z(t, ω) is the state vector of our interacting urn process (1) in which we make explicit the underlying probability space by writing the sample point ω; W(ω) is a random variable and u is the left eigenvector of the matrix A corresponding to the largest eigenvalue λ 1 .Hence, because of the exponential time change, the solution is going to converge like From (7) we know that given an initial urn content vector (Z 1 (0), . . ., Z N (0)) T , the expected population is given by with the matrix A given by This representation of the evolution of the vector (m 1 (t), . . ., m N (t)) is useful to prove a stronger result than (11) (or (12)).We state the result in the following proposition.
Proposition 1.Let ξ be a right eigenvector of the matrix A and λ ξ the corresponding eigenvalue.Then, the process defined by Proof.The representation of the time evolution of the mean vector (m 1 (t), . . ., m N (t)) given by (13) shows that m(t) = m(t 0 ) exp(A(t − t 0 )), ∀0 ≤ t 0 ≤ t.So, with t 0 ≤ t fixed, we can write and hence, This last equation shows that The convergence follows from the classical convergence result for martingale.
We also state the following corollary which will be useful in the next section.
Corollary 1.We denote by X 1 , X 2 , . .., the right eigenvectors of the matrix A and λ 1 , λ 2 , . . . the corresponding eigenvalues.If we assume that the eigenvectors are independent, then we have the following decomposition: where a i (t) is a random variable which converges as t → ∞.
Proof.To compute the decomposition, we use the fact that by assumption the eigenvectors are orthogonal.To get the coefficient a i (t), we compute the scalar product of Z(t) with the corresponding eigenvector X i .The convergence follows from Proposition 1.
The convergence rate of the process is determined by the second largest eigenvalue.Proof.The proof uses the same decomposition of the matrix A as in the previous proposition and proceeds by direct computations using the fact that the matrices D + I and A d are symmetric.

Proposition 2. The eigenvalues
Generalized eigenvectors are useful for spectral graph drawing.Actually, as discussed in [16], generalized eigenvectors corresponding to the generalized eigenvalues smaller than the dominant one provide coordinates for drawing the graph in the plane.Numerical evidence supports the fact that such generalized eigenvectors provide better coordinates than the eigenvectors of the Laplacian matrix.This proposition will support our application of the interacting urn process to clustering.
We now consider what does happen if we distinguish black and white balls in a same urn.Actually, the analysis previously presented carries on, the rate of split/die of the particles living in a given urn of different colors being asymptotically independent since b i t + w i t → t(deg(i) + 1)t.
Theorem 1.The scaled interacting urn process populations converge to a random vector which is proportional to the left eigenvector of the matrix A corresponding to the maximal eigenvalue 1; see (12).The ratio of the black balls among the total population of a given urn, denoted X i t , converges to a mean value (19) which is equivalent to Proof.The equivalence between the two expressions above follows from simple computation; we point out that the difference between the two sums is that in the first one we take into account the term X i ∞ while we do not in the second.The populations of black balls in the urn b i ∞ satisfy; see ( 12) Moreover, the total populations composing the urns satisfy because of the asymptotic limit as t → ∞.Hence, Broadly speaking, it is hard to get general results on the convergence rate of the interacting urn process because it is related to random processes (e.g., processes with reinforcement [1]).The process convergence rate depends on the value of the second largest eigenvalue of A. The difficulty of asserting general results is mainly because such results depend on the topology of the interactions, that is, the matrix A. However, the case where the topology of the graph of interactions is a complete graph is easy to understand, because the completeness implies identical urn content and the process is similar to the classical P ólya urn.This can motivate us to investigate the applications of the interacting urn process in clustered networks, since nodes that share many links are apt to develop similar urn content.Another folk result concerning processes similar to the interacting urn process is that the time for convergence to the definite value is usually very large and not numerically observable.However, some significant values may emerge quickly from the dynamic process.Moreover, notice that due to the probabilistic nature of the interacting urn process, fault tolerance is implied; there is an inherent recovery after the loss of a ball, say, due to communication interferences.

Applications
We now turn to describe two of the many possible applications of the interacting urn process in networks of tiny artifacts.

Cluster Formation.
Spectral graph drawing considers the entries of the generalized eigenvector of (A d , D) corresponding to the second largest eigenvalue as 1d coordinate of the node as an efficient heuristic; see [16].(By considering successive generalized eigenvectors of (A d , D), one can also obtain multidimensional representation of the graph.)It is then natural to cluster nodes that are close in the 1d drawing of the graph.

The Analysis.
We have shown that the population vector (b 1 t , . . ., b N t )/t converges, with the left eigenvector of the matrix A corresponding to the dominant eigenvalue 1, see equation 7, and that b i t + w i t → t(deg(i) + 1).The ratio is then converging to the generalized eigenvector of (A d , D) corresponding to the dominant eigenvalue 1 by proposition 3, with a rate of convergence depending on the second largest eigenvalue.However, by direct computation, one can check that this generalized eigenvector is (1, . . ., 1) T , and by considering the difference X i t − X j t ; we get an approximation of the component of the generalized eigenvalue of (A d , D) corresponding to the second largest eigenvalue, which is related to the distance of the nodes in the 1d drawing of the graph.
The preceding analysis suggests running the interacting urn process and clustering neighbor nodes whose difference X i t − X j t is below a threshold.In detail, we consider the vector of By ( 24), we have that b i (t) → tu i 1 + t λ2 u i 1 + • • • + and b i (t) + w i (t) → (deg(i) + 1)t.Therefore, we can write (25) (see Corollary 1), International Journal of Distributed Sensor Networks  We note that a 1 (w)X 1 refers to the generalized eigenvector and λ 2 < 1 but usually close to 1.In other words, we can write This relation allows us to connect neighboring tiny artifacts for which the difference X i 2 − X j 2 is small.

Numerical Results.
A numerical study that validates our theoretical prediction is presented in Figure 1.In the experiment, the schedule of nodes interaction is generated uniformly at random.The time to stop the process was obtained while the clustered network stopped evolving visually, after about 20 draws per node; however, the global formation starts to emerge after 15 draws per node.In Figure 1, we observe that the algorithm behaves as expected, and a global cluster formation emerges.

Pseudogeometric Coordinates.
In very large-scale networks, it is not possible to register the location of all nodes manually, or to equip all tiny artifacts with GPS units (such as [17]).Nevertheless, position-awareness is of great importance for many applications.For example, it is sometimes required or desirable to route without position information and to use virtual coordinates for georouting (see [18][19][20]).The algorithms for virtual coordinates assume that the underlying communication graph has a realization of a unit disk graph.The algorithms extract connectivity information of the communication graph and find a realization of virtual coordinates in the plane.For example, the realization can require that each edge has length at most 1 and that the distance between nonneighbored nodes is more than 1.Rao et al. [18] describe an algorithm for computing virtual coordinates to enable geographic forwarding in a wireless ad hoc network.The mechanism in [18] is related to graph embedding.It is known that finding such a realization from connectivity information only (by using embedding of a unit disk graph) is NP hard (see [21]) and also hard to approximate (see [22]).Some applications do not require the realization of a unit disk graph.For example, georouting can be facilitated by pseudogeometric coordinates (see [23]).An algorithm for pseudogeometric coordinates selects several nodes, a 1 , . . .a k , as anchors, and assigns coordinate of each node, u, as its hop-distance to all anchors, that is, (d(u, a 1 ), . . .d(u, a k )).It is required that the pseudogeometric coordinates uniquely identify each node.Moreover, the pseudogeometric coordinates must facilitate georouting.In this paper we follow an approach similar to the one in [19,24] that uses information about the nodes' connectivity.The algorithm in [19] is an approximation algorithm that runs in polynomial time.In detail, the core of the mechanism in [18, Section 4.1] is described in (14); the values of the x i , y i coordinates of node p i is the mean value of its neighbor coordinates After repeatedly letting each node p i in the system to recalculate the values of the x i , y i coordinates, the eventual values are useful for greedy georouting (see [18,Section 4.1]).We suggest to replace the mechanism in [18, Section 4.1] with a simpler and cheaper mechanism of interacting urn processes.

The Process.
We assume that merely a few anchor nodes have a registered position by some means, for example, using a GPS unit.We aim at letting all others nodes derive a coordinate system through connectivity information.Our approach is similar to that of Wattenhofer et al. [23], however, we are interested in using the interacting process as a heuristic that are applicable for random geometric graphs.(Random geometric graphs are constructed by dropping n points randomly uniformly into the unit square, I = [0, 1] 2 , and adding edges to connect any two points distant at most r from each other (see [25] for the more general form of higher dimensions).)Consider the following process, in which the anchor nodes keep their coordinates unchanged during the entire process, and other nodes choose an initial position randomly.Then, repeatedly, the nodes transmit their positions, collect the coordinates of their neighbors, and assign themselves to the barycentric coordinates.The processes converge, producing pseudogeometric coordinates for the nodes.
We wish to emulate a similar process to the one described above, and let the interacting urn process estimate the mean of the barycentric neighboring values.Therefore, nodes maintain two urns, one for the x-axis and one for the y-axis, each urn composed of black and white balls.The position (x, y) of an anchor node corresponds to the color ratio of balls to be sent to their neighbors, that is, the urn with a constant number of x white balls and y black balls.Other nodes start with one black ball and one white ball in their urn.We let the interacting urn process run before using the content of both urns for producing the coordinates by taking the integer part of a factor of the color ratio in every urn.We identify nodes with the same integer coordinates as belonging to the same cluster, because of their similarity to the clustering application above.

Numerical Results.
The obtained coordinates are presented in Figure 2. Similar to the clustering application, the time to stop the process was obtained while the pseudogeometric coordinate stopped evolving visually, after about 20 draws per node; however, the global formation starts to emerge after 15 drawings per node.
A statistical study is presented in Figure 3.Both charts consider a random geometric graph (Random geometric graphs are constructed by dropping n points randomly uniformly into the unit square, I = [0, 1] 2 , and adding edges to connect any two points distant at most r from each other (see [25] for the more general form of higher dimensions).) of 50 nodes.Five anchor nodes are placed on the coordinate (0.0, 0.0), (0.0, 1.0), (0.5, 0.0), (0.5, 0.5), (0.5, 1.0), (1.0, 0.0), (1.0, 0.5), (1.0, 1.0).We study the statistics using Pearson's coefficient correlation (see [26]).An interesting question to find an answer for is how the number of hops from the anchor nodes to the other nodes statistically correlates to the Euclidian distance over the space of pseudogeometric coordinates.Moreover, we are interested in comparing with the alternative system of coordinates.Therefore, we present the statistical correlation of Euclidian distance over the space of the real coordinates (that where used to generate the communication graph) to the number of hops from them to the anchor nodes.
In more detail, for every two nodes, u and v, let us define dis pseudo (u, v) and dis real (u, v) as the Euclidian distances (u.x pseudo − v.x pseudo ) 2 + (u.y pseudo − v.y pseudo ) 2 , and, respectively, (u.x real − v.x real ) 2 + (u.y real − v.y real ) 2 , where (u.x pseudo , v.y pseudo ) and (u.x real , v.y real ) are the pseudogeometrical, and, respectively, real coordinates of nodes u.Moreover, hop(u, v) is the number of hops on the shortest path between nodes u and v.The statistical correlation between dis pseudo (u, v) and hop(u, v) is presented in the left chart of Figure 3, where u is the anchor node at (0.5, 0.5) and v is any of the 50 nodes on the randomgeometric graph that are not anchored.We see that after 5 rounds, the value of the correlation starts to oscillate around the average value of 0.85 and with small (standard) deviation (of less than 0.01).The left chart of Figure 3 also presents the alternative correlation.Namely, 0.75 is the value of the statistical correlation between dis real (u, v) and hop(u, v), where u is the anchor node at (0.5, 0.5) and v is any of the 50 nodes that are not anchored.
Georouting facilitates the communication between any pair of nodes (that are not necessarily one of the anchor nodes).Therefore, we consider the statistical correlation between dis pseudo (u, v) and hop(u, v), where u and v are any two nodes on the random-geometric graph that are not anchored.The values of the statistical correlation are presented in the right chart of Figure 3 as a function of the number of rounds.Moreover, the right chart also depicts the linear regression of these values.
The correlation values that are presented in Figure 3 suggest that (over time), the pseudogeometric coordinates can facilitate georouting better than real coordinates, because of their stronger statistical coalition to the hop distance.

The Implementation
We present a self-stabilizing implementation of the urn process.The pseudocode of the implementation is given in Algorithm 1.Before we explain the design, we list the key assumptions used in the analysis of interacting urn processes.For instance, it assumes that time is continuous.However, in practice, clock mechanisms are discrete.Fortunately, when considering a stochastic process evolving in continuous Figure 2: Pseudogeometric coordinates obtained with two interacting urn processes.On the left graph, we see the communication graph (n = 300 and r = 0.12) with 8 anchor nodes at (0.0, 0.0), (0.0, 1.0), (0.5, 0.0), (0.5, 0.5), (0.5, 1.0), (1.0, 0.0), (1.0, 0.5), (1.0, 1.0).For the sake of presentation simplicity, the pseudogeometric coordinates are depicted for a representative member of their clusters.The numbers are the colors' ratio multiplied by 100.See Figure 1 for the clusters' description.x real , v.y real ) and hop(u, v) (cf.[27,28]).The x's axes describe the number of communication rounds and the y's axes describe the coefficients.time, it is always possible to conduct a discrete process by considering merely the produced successive events and ignore any reference to continuous time.The transformation from continuous to discrete stochastic model is known as discrete skeleton (see [29]).

Serializable of Algorithm Steps.
Another assumption that we make in our analysis is about the instantiation of the algorithm steps.Namely, the analysis assumes that the algorithm steps are serializable, that is, it takes no time to draw a ball, announce it, and let the drawing tiny artifact and the neighboring tiny artifacts update their urns.
In real distributed systems, these assumptions do not always hold and concurrent algorithm steps can be nonserializable.Therefore, we require that at any time and any neighborhood, there is at most one tiny artifact that takes an algorithm step.In other words, no two nodes that have a path of less than three hops may concurrently take the algorithm steps.
In order to provide serializability of the algorithm steps, we borrow existing self-stabilizing infrastructure.Herman and Tixeuil [30] present a self-stabilizing algorithm for accessing a shared media, such as the communication environment of wireless tiny artifacts.The algorithm assures that starting for an arbitrary configuration of the system, eventually every node has a unique time slot for broadcasting.Namely, no node broadcasts concurrently with a neighboring node.The property of time slot uniqueness facilitates serializable steps of the algorithm that is presented in Algorithm 1.In other words, when the broadcasting time slot of a particular tiny artifact arrives, this tiny artifact can International Journal of Distributed Sensor Networks is followed by the conventional arguments of the technique of floating output (see [8]).
We consider the period that is after the network was deployed and the media access algorithm has stabilized to work correctly.It is required to demonstrate that within a period of T, the variable out put contains the correct output.Let us consider the first timeout of the type FLOAT.Within a period of T after that timeout, the interacting urn processes produce the correct output (by the definition of T).Moreover, at the end of that period, all tiny artifacts assign the correct output to variable out put (see line 30).By similar arguments, all subsequent periods produce the correct output as well.Thus, the variable out put shows the correct output in all of the subsequent periods.

Conclusions
We are interested in simplifying the design of tiny artifacts and bridging the gap between these future networks and existing ones.Existing implementations, say, for sensor networks, often use protocols that assume traditional system settings that require resources that tiny artifacts do not have.Alternatively, when the designers do not assume traditional system settings, they turn to improving performance and reducing resource consumption by using probabilistic algorithms.However, designers that do not consider implementation explicitly do not specify the exact computational power required for each node.In some cases, the implementation requires storing nontrivial quantities of data.
This work presents a self-stabilizing building block that can facilitate infrastructure for tiny artifacts, such as reasonable clustering and efficient georouting.Our analytical and numerical results show that global formations appear rapidly (with the use of small number of transmissions and few bits at a time).

Proposition 3 .
eigenvalues of the Laplacian of the communication graph of the network.Proof.Let Ad be the adjacency matrix of the communication graph (a i j = 1 i∼ j ) and D the diagonal matrix with d ii = deg(i).The matrix A is given by A = (I + D) −1 (I + A d ).Algebraic manipulations show that if x, λ are right eigenvector and eigenvalue of A, then x, 1 − λ are right eigenvector and eigenvalue of the Laplacian D − A d of the communication graph.The result follows since we assume that the communication graph is connected (then the eigenvalue 0 is simple) and by known properties of the spectrum of the Laplacian matrix.This proposition shows that the dominant eigenvalue of the matrix A is 1 and one can check that the corresponding left eigenvector is given by (deg(1) + 1, . . ., deg(N) + 1) T .Let x be the left eigenvector of A corresponding to the eigenvalue 1, then u = (D + I) −1 x is a right generalized eigenvector of (A d , D), that is, it satisfies A d u = Du.

Figure 1 :
Figure 1: Clusters obtained with the interacting urn process.The left graph depicts the communication graph (n = 300 and r = 0.12).The right graph depicts the clusters with their assigned numerical values.For each cluster, we choose a representative node and connect representative nodes of other clusters, whenever there are neighboring nodes belonging to both clusters.
Communicating among nodes that are not anchored