An Algorithm for Road Coloring

  • A. N. Trahtman
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7056)


A coloring of edges of a finite directed graph turns the graph into a finite-state automaton. The synchronizing word of a deterministic automaton is a word in the alphabet of colors (considered as letters) of its edges that maps the automaton to a single state. A coloring of edges of a directed graph of uniform outdegree (constant outdegree of any vertex) is synchronizing if the coloring turns the graph into a deterministic finite automaton possessing a synchronizing word.

The road coloring problem is the problem of synchronizing coloring of a directed finite strongly connected graph of uniform outdegree if the greatest common divisor of the lengths of all its cycles is one. The problem posed in 1970 has evoked noticeable interest among the specialists in the theory of graphs, automata, codes, symbolic dynamics as well as among the wide mathematical community.

A polynomial time algorithm of O(n 3) complexity in the worst case and quadratic in the majority of studied cases for the road coloring of the considered graph is presented below. The work is based on the recent positive solution of the road coloring problem. The algorithm was implemented in the freeware package TESTAS.


algorithm road coloring graph deterministic finite automaton synchronization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Adler, R.L., Goodwyn, L.W., Weiss, B.: Equivalence of topological Markov shifts. Israel J. of Math. 27, 49–63 (1977)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Adler, R.L., Weiss, B.: Similarity of automorphisms of the torus. Memoirs of the Amer. Math. Soc. 98 (1970)Google Scholar
  3. 3.
    Aho, A., Hopcroft, J., Ulman, J.: The Design and Analisys of Computer Algorithms. Addison-Wesley (1974)Google Scholar
  4. 4.
    Béal, M.P., Perrin, D.: A quadratic algorithm for road coloring. arXiv:0803.0726v2 [cs.DM] (2008)Google Scholar
  5. 5.
    Budzban, G., Mukherjea, A.: A semigroup approach to the Road Coloring Problem. Probability on Alg. Structures. Contemporary Mathematics 261, 195–207 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Carbone, A.: Cycles of relatively prime length and the road coloring problem. Israel J. of Math. 123, 303–316 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Černy, J.: Poznamka k homogenym eksperimentom s konechnymi automatami. Math.-Fyz. Čas. 14, 208–215 (1964)Google Scholar
  8. 8.
    Černy, J., Piricka, A., Rosenauerova, B.: On directable automata. Kybernetika 7, 289–298 (1971)MathSciNetzbMATHGoogle Scholar
  9. 9.
    Culik, K., Karhumaki, J., Kari, J.: A note on synchronized automata and Road Coloring Problem. In: 5th Int. Conf. on Developments in Language Theory, Vienna, pp. 459–471 (2001); J. of Found. Comput. Sci.13, 459–471 (2002)Google Scholar
  10. 10.
    Friedman, J.: On the road coloring problem. Proc. of the Amer. Math. Soc. 110, 1133–1135 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Gocka, E., Kirchherr, W., Schmeichel, E.: A note on the road-coloring conjecture. Ars Combin. 49, 265–270 (1998)MathSciNetzbMATHGoogle Scholar
  12. 12.
    Hegde, R., Jain, K.: Min-Max theorem about the Road Coloring Conjecture. In: EuroComb 2005, DMTCS Proc., AE, pp. 279–284 (2005)Google Scholar
  13. 13.
    Jonoska, N., Karl, S.A.: A molecular computation of the road coloring problem. DNA Based Computers II, DIMACS Series in DMTCS 44, 87–96 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Kari, J.: Synchronizing Finite Automata on Eulerian Digraphs. In: Sgall, J., Pultr, A., Kolman, P. (eds.) MFCS 2001. LNCS, vol. 2136, p. 432. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  15. 15.
    Mateescu, A., Salomaa, A.: Many-Valued Truth Functions, Černy’s Conjecture and Road Coloring. Bull. of European Ass. for TCS 68, 134–148 (1999)zbMATHGoogle Scholar
  16. 16.
    O’Brien, G.L.: The road coloring problem. Israel J. of Math. 39, 145–154 (1981)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Perrin, D., Schutzenberger, M.P.: Synchronizing prefix codes and automata, and the road coloring problem. Symbolic Dynamics and Appl. Contemp. Math. 135, 295–318 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Rauff, J.V.: Way back from anywhere: exploring the road coloring conjecture. Math. and Comput. Education 01 (2009)Google Scholar
  19. 19.
    Roman, A.: Decision Version of the Road Coloring Problem Is NP-Complete. In: Kutyłowski, M., Charatonik, W., Gębala, M. (eds.) FCT 2009. LNCS, vol. 5699, pp. 287–297. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  20. 20.
    Rystsov, I.C.: Quasioptimal bound for the length of reset words for regular automata. Acta Cybernetica 12, 145–152 (1995)MathSciNetzbMATHGoogle Scholar
  21. 21.
    Tarjan, R.E.: Depth first search and linear graph algorithms. SIAM J. Comput. 1, 146–160 (1972)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Trahtman, A.N.: A subquadratic algorithm for road coloring. arXiv:0801.2838 v1 [cs.DM] (2008)Google Scholar
  23. 23.
    Trahtman, A.N.: Synchronizing Road Coloring. In: 5-th IFIP WCC-TCS, vol. 273, pp. 43–53. Springer, Heidelberg (2008)Google Scholar
  24. 24.
    Trahtman, A.N.: The road coloring problem. Israel Journal of Math. 172(1), 51–60 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  25. 25.
    Trahtman, A.N., Bauer, T., Cohen, N.: Linear visualization of a Road Coloring. In: 9th Twente Workshop on Graphs and Comb. Optim. Cologne, pp. 13–16 (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • A. N. Trahtman
    • 1
  1. 1.Dep. of Math.Bar-Ilan UniversityRamat GanIsrael

Personalised recommendations