Simple and efficient local codes for distributed stable network construction


In this work, we study protocols so that populations of distributed processes can construct networks. In order to highlight the basic principles of distributed network construction, we keep the model minimal in all respects. In particular, we assume finite-state processes that all begin from the same initial state and all execute the same protocol. Moreover, we assume pairwise interactions between the processes that are scheduled by a fair adversary. In order to allow processes to construct networks, we let them activate and deactivate their pairwise connections. When two processes interact, the protocol takes as input the states of the processes and the state of their connection and updates all of them. Initially all connections are inactive and the goal is for the processes, after interacting and activating/deactivating connections for a while, to end up with a desired stable network. We give protocols (optimal in some cases) and lower bounds for several basic network construction problems such as spanning line, spanning ring, spanning star, and regular network. The expected time to convergence of our protocols is analyzed under a uniform random scheduler. Finally, we prove several universality results by presenting generic protocols that are capable of simulating a Turing Machine (TM) and exploiting it in order to construct a large class of networks. We additionally show how to partition the population into k supernodes, each being a line of \(\log k\) nodes, for the largest such k. This amount of local memory is sufficient for the supernodes to obtain unique names and exploit their names and their memory to realize nontrivial constructions.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8


  1. 1.

    Such a geometrically restricted variant has been studied in [26].

  2. 2.

    The \(G_{n,p}\) random graph model consists of all graphs with node set \(V=\{1,2,\ldots ,n\}\) in which the edges are chosen independently and with probability p (for more details, cf. [10] pp. 34–35).

  3. 3.

    See [29] for a very recently reported system that demonstrates programmable self-assembly of complex two-dimensional shapes with a thousand-robot swarm.

  4. 4.

    An equivalent way is to assume that it is defined at both (abc) and (bac) but require that it satisfies symmetry w.r.t. node-states, i.e., \(\delta _1(a,b,c)=\delta _2(b,a,c)\) and \(\delta _2(a,b,c)=\delta _1(b,a,c)\), and equality w.r.t. edge-states, i.e., \(\delta _3(a,b,c)=\delta _3(b,a,c)\).

  5. 5.

    We should emphasize, in order to avoid confusion, that in this work “time” is sequential, as a time-step consists of a single interaction selected by the scheduler. Such a sequential estimate can then be easily translated to some estimate of parallel time. For example, assuming that \({\varTheta }(n)\) interactions occur in parallel in every step, one could obtain an estimation of parallel time by dividing sequential time by n. In contrast, there are some papers, like [12], that perform their analysis directly in terms of parallel time.

  6. 6.

    To the best of our knowledge, the term “bottleneck” to characterize such types of slow transitions in the context of population protocols, was first used in [12].

  7. 7.

    We should remark that the corresponding protocol in [28] contained a small error (making it fail to construct a ring in a small fraction of its executions) that was detected via experimentation and fixed in this journal version.


  1. 1.

    Angluin, D., Aspnes, J., Chan, M., Fischer, M.J., Jiang, H., Peralta, R.: Stably computable properties of network graphs. In: Proceedings of the 1st IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS), volume 3560 of LNCS, pp. 63–74. Springer, June (2005)

  2. 2.

    Angluin, D., Aspnes, J., Diamadi, Z., Fischer, M.J., Peralta, R.: Computation in networks of passively mobile finite-state sensors. Distrib. Comput. 18(4), 235–253 (2006)

  3. 3.

    Angluin, D., Aspnes, J., Eisenstat, D., Ruppert, E.: The computational power of population protocols. Distrib. Comput. 20(4), 279–304 (2007)

    Article  MATH  Google Scholar 

  4. 4.

    Adleman, L.M.: Molecular computation of solutions to combinatorial problems. Science 266(11), 1021–1024 (1994)

    Article  Google Scholar 

  5. 5.

    Angluin, D.: Local and global properties in networks of processors. In: Proceedings of the 12th Annual ACM Symposium on Theory of Computing (STOC), pp. 82–93. ACM (1980)

  6. 6.

    Aspnes, J., Ruppert, E.: An introduction to population protocols. In: Garbinato, B., Miranda, H., Rodrigues, L. (eds.) Middleware for Network Eccentric and Mobile Applications, pp. 97–120. Springer, Berlin (2009)

    Google Scholar 

  7. 7.

    Barabási, A.-L., Albert, R.: Emergence of scaling in random networks. Science 286(5439), 509–512 (1999)

    MathSciNet  Article  MATH  Google Scholar 

  8. 8.

    Beauquier, J., Burman, J., Clement, J., Kutten, S.: On utilizing speed in networks of mobile agents. In: Proceedings of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC), pp. 305–314. ACM (2010)

  9. 9.

    Blume, L., Easley, D., Kleinberg, J., Kleinberg, R., Tardos, É.: Network formation in the presence of contagious risk. ACM Trans. Econ. Comput. 1(2), 6 (2013)

    Article  Google Scholar 

  10. 10.

    Bollobás, B.: Random Graphs, vol. 73. Cambridge university press, Cambridge (2001)

    Book  MATH  Google Scholar 

  11. 11.

    Bandyopadhyay, A., Pati, R., Sahu, S., Peper, F., Fujita, D.: Massively parallel computing on an organic molecular layer. Nat. Phys. 6(5), 369–375 (2010)

    Article  Google Scholar 

  12. 12.

    Chen, H.-L., Cummings, R., Doty, D., Soloveichik, D.: Speed faults in computation by chemical reaction networks. In: Proceedings of the 28th International Symposium on Distributed Computing (DISC), volume 8784 of LNCS, pp. 16–30. Springer (2014). Also to appear in Distributed Computing

  13. 13.

    Chatzigiannakis, I., Michail, O., Nikolaou, S., Pavlogiannis, A., Spirakis, P.G.: Passively mobile communicating machines that use restricted space. Theor. Comput. Sci. 412(46), 6469–6483 (2011)

    MathSciNet  Article  MATH  Google Scholar 

  14. 14.

    Derakhshandeh, Z., Dolev, S., Gmyr, R., Richa, A.W., Scheideler, C., Strothmann, T.: Brief announcement: amoebot—a new model for programmable matter. In: Proceedings of the 26th ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 220–222. ACM (2014)

  15. 15.

    Das, S., Flocchini, P., Santoro, N., Yamashita, M.: Forming sequences of geometric patterns with oblivious mobile robots. Distrib. Comput. 28(2), 131–145 (2015)

    MathSciNet  Article  MATH  Google Scholar 

  16. 16.

    Dolev, S., Gmyr, R., Richa, A.W., Scheideler, C.: Ameba-inspired self-organizing particle systems. arXiv preprint. arXiv:1307.4259 (2013)

  17. 17.

    Doty, D.: Theory of algorithmic self-assembly. Commun. ACM 55, 78–88 (2012)

    Article  Google Scholar 

  18. 18.

    Doty, D.: Timing in chemical reaction networks. In: Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 772–784 (2014)

  19. 19.

    Erdős, P., Rényi, A.: On random graphs. Publ. Math. Debr. 6, 290–297 (1959)

    MATH  Google Scholar 

  20. 20.

    Feller, W.: An Introduction to Probability Theory and Its Applications, vol. 1, 3rd edn. Revised Printing. Wiley, New York (1968)

  21. 21.

    Guerraoui, R., Ruppert, E.: Names trump malice: tiny mobile agents can tolerate byzantine failures. In: 36th International Colloquium on Automata, Languages and Programming (ICALP), volume 5556 of LNCS, pp. 484–495. Springer (2009)

  22. 22.

    Jackson, M.O.: A survey of network formation models: stability and efficiency. In: Demange, G., Wooders, M. (eds.) Group Formation in Economics: Networks, Clubs and Coalitions, pp. 11–57 (2005)

  23. 23.

    Lynch, N.A.: Distributed Algorithms, 1st edn. Morgan Kaufmann Publishers, Inc., San Francisco, California (1996)

  24. 24.

    Michail, O., Chatzigiannakis, I., Spirakis, P.G.: Mediated population protocols. Theor. Comput. Sci. 412(22), 2434–2450 (2011)

    MathSciNet  Article  MATH  Google Scholar 

  25. 25.

    Michail, O., Chatzigiannakis, I., Spirakis, P.G.: New models for population protocols. In: Lynch, N.A. (ed.) Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool, San Rafael (2011)

    Google Scholar 

  26. 26.

    Michail, O.: Terminating distributed construction of shapes and patterns in a fair solution of automata. In: Proceedings of the 34th ACM Symposium on Principles of Distributed Computing (PODC), pp. 37–46. ACM (2015)

  27. 27.

    Motwani, R., Raghavan, P.: Randomized algorithms. Cambridge University Press, Cambridge (1995)

    Book  MATH  Google Scholar 

  28. 28.

    Michail, O., Spirakis, P.G.: Simple and efficient local codes for distributed stable network construction. In: Proceedings of the 33rd ACM Symposium on Principles of Distributed Computing (PODC), pp. 76–85. ACM (2014)

  29. 29.

    Rubenstein, M., Cornejo, A., Nagpal, R.: Programmable self-assembly in a thousand-robot swarm. Science 345(6198), 795–799 (2014)

    Article  Google Scholar 

  30. 30.

    Rothemund, P.W.K., Winfree, E.: The program-size complexity of self-assembled squares. In: Proceedings of the 32nd Annual ACM Symposium on Theory of Computing (STOC), pp. 459–468 (2000)

  31. 31.

    Schiff, J.L.: Cellular Automata: A Discrete View of the World, vol. 45. Wiley-Interscience, New York (2011)

    Google Scholar 

  32. 32.

    Suzuki, I., Yamashita, M.: Distributed anonymous mobile robots: formation of geometric patterns. SIAM J. Comput. 28(4), 1347–1363 (1999)

  33. 33.

    Vaidya, N., Manapat, M.L., Chen, I.A., Xulvi-Brunet, R., Hayden, E.J., Lehman, N.: Spontaneous network formation among cooperative RNA replicators. Nature 491(7422), 72–77 (2012)

    Article  Google Scholar 

  34. 34.

    Woods, D., Chen, H.-L., Goodfriend, S., Dabby, N., Winfree, E., Yin, P.: Active self-assembly of algorithmic shapes and patterns in polylogarithmic time. In: Proceedings of the 4th Conference on Innovations in Theoretical Computer Science, pp. 353–354. ACM (2013)

  35. 35.

    Winfree, E.: Algorithmic Self-Assembly of DNA. PhD thesis, California Institute of Technology, June (1998)

  36. 36.

    Zhang, S.: Fabrication of novel biomaterials through molecular self-assembly. Nat. Biotechnol. 21(10), 1171–1178 (2003)

    Article  Google Scholar 

Download references


We would like to thank Leslie Ann Goldberg for bringing to our attention the importance of constructing regular networks and Dimitrios Amaxilatis and Marios Logaras for experimenting with our protocols and detecting a bug in the Global-Ring protocol. Finally, we would like to thank the anonymous reviewers of this article, and also those of some previous versions of it, for carefully reading every single line of our manuscript. Their thorough comments have helped us to improve our work substantially.

Author information



Corresponding author

Correspondence to Othon Michail.

Additional information

Supported in part by (i) the project “Foundations of Dynamic Distributed Computing Systems” (FOCUS) which is implemented under the “ARISTEIA” Action of the Operational Programme “Education and Lifelong Learning” and is co-funded by the European Union (European Social Fund) and Greek National Resources and (ii) the FET EU IP project MULTIPLEX under contract no 317532. A preliminary version of the results in this paper has appeared in [28].

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Michail, O., Spirakis, P.G. Simple and efficient local codes for distributed stable network construction. Distrib. Comput. 29, 207–237 (2016).

Download citation


  • Distributed network construction
  • Stabilization
  • Homogeneous population
  • Distributed protocol
  • Interacting automata
  • Fairness
  • Random schedule
  • Structure formation
  • Self-organization