# Solving the parity problem in one-dimensional cellular automata

## Abstract

The parity problem is a well-known benchmark task in various areas of computer science. Here we consider its version for one-dimensional, binary cellular automata, with periodic boundary conditions: if the initial configuration contains an odd number of 1s, the lattice should converge to all 1s; otherwise, it should converge to all 0s. Since the problem is ill-defined for even-sized lattices (which, by definition, would never be able to converge to 1), it suffices to account for odd-sized lattices only. We are interested in determining the minimal neighbourhood size that allows the problem to be solvable for any arbitrary initial configuration. On the one hand, we show that radius 2 is not sufficient, proving that there exists no radius 2 rule that can solve the parity problem, even in the simpler case of prime-sized lattices. On the other hand, we design a radius 4 rule that converges correctly for any initial configuration and formally prove its correctness. Whether or not there exists a radius 3 rule that solves the parity problem remains an open problem; however, we review recent data against a solution in radius 3, thus providing strong empirical evidence that there may not exist a radius 3 solution even for prime-sized lattices only, contrary to a recent conjecture in the literature.

## Keywords

Elementary cellular automata Emergent computation Parity problem Density classification De Bruijn graphs## Notes

### Acknowledgements

This work came out of a sabbatical period of P. P.B. de Oliveira at the University of Ottawa, thanks to a grant provided by MackPesquisa – Fundo Mackenzie de Pesquisa, and also benefitted from travel grant 2012/15804-5 provided to him by FAPESP – Fundação de Amparo à Pesquisa do Estado de São Paulo. This work was also supported in part by the Natural Sciences and Engineering Research Council of Canada (Discovery Grant) and by Dr. Flocchini’s University Research Chair.

## References

- Acerbi L, Dennunzio A, Formenti E (2009) Conservation of some dynamical properties for operations on cellular automata. Theoret Comput Sci 410(38–40):3685–3693MathSciNetMATHCrossRefGoogle Scholar
- Angluin D (1980) Local and global properties in networks of processors. In: Proceedings of the 28th Symposium on Theoretical Aspects of Computer Science (STACS), p 82–93Google Scholar
- Angluin D, Aspnes J, Eisenstat D, Ruppert E (2007) The computational power of population protocols. Distrib Comput 20(4):279–304MATHCrossRefGoogle Scholar
- Betel H, Flocchini P (2011) On the relationship between fuzzy and boolean cellular automata. Theoret Comput Sci 412(8-10):703–713MathSciNetMATHCrossRefGoogle Scholar
- Boccara N, Cheong K (1993) Automata network epidemic models. In Boccara N et al. (eds) Cellular automata and cooperative systems, vol. 396, Kluwer Academic, Dordrecht, p 29–44. Google Scholar
- Cattaneo G, Dennunzio A, Margara L (2004) Solution of some conjectures about topological properties of linear cellular automata. Theoret Comput Sci 325(2):249–271MathSciNetMATHCrossRefGoogle Scholar
- Chaudhuri P, Chowdhury D, S SN, Chattopadhyay S (1997) Additive cellular automata: Theory and applications, vol. 1. IEEE Computer Society Press, Los AlamitosGoogle Scholar
- Dennunzio A, Di Lena P, Formenti E, Margara L (2009) On the directional dynamics of additive cellular automata. Theoret Comput Sci 410(47–49):4823–4833MathSciNetMATHCrossRefGoogle Scholar
- Fatès, N (2011) Stochastic cellular automata solve the density classification problem with an arbitrary precision. In: Proceedings of the 28th Symposium on Theoretical Aspects of Computer Science (STACS), p 284–295Google Scholar
- Fukś H (1997) Solution of the density classification problem with two cellular automata rules. Phys Rev E 55(3):R2081–R2084CrossRefGoogle Scholar
- Griffeath D, Moore C (eds) (2003) New constructions in cellular automata, (Santa Fe institute Sstudies on the sciences of complexity). Oxford University Press, New YorkGoogle Scholar
- Haykin S (2008) Neural networks and learning machines. 3rd edn. Prentice Hall, Englewood CliffsGoogle Scholar
- Hopcroft J, Motwani R, Ullman J (2006) Introduction to Automata Theory, Languages, and Computation. 3rd edn. Addison-Wesley, ReadingGoogle Scholar
- Kurka P (2003) Topological and Symbolic Dynamics. vol 11, 3rd edn. IEEE Computer Society Press, Los AlamitosMATHGoogle Scholar
- Langton CG (1986) Studying artificial life with cellular automata. In: Evolution, Games, and Learning. North HollandGoogle Scholar
- Lee K, Xu H, Chau H (2001) Parity problem with a cellular automaton solution. Phys Rev E 64(2):026,702/1–026,702/4Google Scholar
- Lenzen C, Oswald Y, Wattenhofer R (2008) What can be approximated locally?: case study: dominating sets in planar graphs. In: Proc. 20th Annual ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), p 46–54Google Scholar
- Martins C, de Oliveira P (2009) Improvement of a result on sequencing elementary cellular automata rules for solving the parity problem. Electron Notes Theoret Comput Sci 252:103–119MathSciNetCrossRefGoogle Scholar
- de Oliveira P, Bortot J, Oliveira G (2006) The best currently known class of dynamically equivalent cellular automata rules for density classification. Neurocomputing 70(1-3):35–43CrossRefGoogle Scholar
- Peleg D (2000) Distributed computing: a locality-sensitive approach. SIAM Monographs on discrete mathematics and applicationsGoogle Scholar
- Sipper M (1998) Computing with cellular automata: Three cases for nonuniformity. Physical Review E 57(3):3589–3592CrossRefGoogle Scholar
- Voorhees B (2009) Additive cellular automata. In: Meyers R (ed.) Encyclopedia of Complexity and Systems Science. Elsevier, New York, p 101, 17Google Scholar
- Wolz D, de Oliveira P (2008) Very effective evolutionary techniques for searching cellular automata rule spaces. J Cell Autom 3(4):289–312MathSciNetMATHGoogle Scholar