Abstract
Based on order relations inspired by the binary reflected Gray code (BRGC) we define Gray codes and give a generating algorithm for \(q\)-ary words avoiding a prescribed factor. These generalize an early 2001 result and a very recent one published by some of the present authors, and can be seen as an alternative to those of Squire published in 1996. Among the involved tools, we make use of generalized BRGC order relations, ultimate periodicity of infinite words, and word matching techniques.
Similar content being viewed by others
References
Bernini, A., Bilotta, S., Pinzani, R., Vajnovszki, V.: Two Gray codes for \(q\)-ary \(k\)-generalized Fibonacci strings. In: ICTCS13, Palermo-Italy, 9–11 Sept (2013)
Bilotta, S., Pergola, E., Pinzani, R.: A construction for a class of binary words avoiding \(1^j0^i\). Pu.M.A 23(2), 81–102 (2012)
Bilotta, S., Merlini, D., Pergola, E., Pinzani, R.: Pattern \(1^{j+1}0^j\) avoiding binary words. Fund. Inf. 117, 35–55 (2012)
Er, M.C.: On generating the \(N\)-ary reflected Gray code. IEEE Trans. Comput. 33(8), 739–741 (1984)
Gray, F.: Pulse code communication. US Patent 2632058 (1953)
Guibas, L.J., Odlyzko, A.M.: Periods in strings. J. Comb. Theory Ser. A 30(1), 19–42 (1981)
Heubach, S., Mansour, T.: Combinatorics of Compositions and Words. Chapman and Hall/CRC, Taylor & Francis Group, Boca Raton, London, New York (2009)
Joichi, J., White, D.E., Williamson, S.G.: Combinatorial Gray codes. SIAM J. Comput. 9, 130–141 (1980)
Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6, 323–350 (1977)
Li, Y., Sawada, J.: Gray codes for reflectable languages. Inf. Process. Lett. 109(5), 296–300 (2009)
Lothaire, M.: Applied Combinatorics on Words. Cambridge University Press, New York (2005)
Sabri, A., Vajnovszki, V.: Two reflected Gray code based orders on some restricted growth sequences. Comput. J. (to appear)
Squire, M.: Gray codes for \(A\)-free strings. Electr. J. Comb. 3(paper R17) (1996)
Ruskey, F.: Combinatorial Generation (book in preparation)
Vajnovszki, V.: A loopless generation of bitstrings without \(p\) consecutive ones. In: Calude, C.S., Dinneen, M.J., Sburlan, S. (eds.) Combinatorics, Computability and Logic. Discrete Mathematics and Theoretical Computer Science, pp. 227–240. Springer, London (2001)
Vajnovszki, V., Vernay, R.: Restricted compositions and permutations: from old to new Gray codes. Inf. Process. Lett. 111(13), 650–655 (2011)
Vajnovszki, V.: http://v.vincent.u-bourgogne.fr/0ABS/publi.html
Walsh, T.: Generating Gray codes in \(O(1)\) worst-case time per word. In: 4th Discrete Mathematics and Theoretical Computer Science Conference, Dijon-France, 7–12 July 2003 (LNCS), vol. 2731, pp. 73–88 (2003)
Walsh, T.: Loop-free sequencing of bounded integer compositions. J. Comb. Math. Comb. Comput. 33, 323–345 (2000)
Williamson, S.G.: Combinatorics for Computer Science. Computer Science Press, Rockville (1985)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Bernini, A., Bilotta, S., Pinzani, R. et al. Gray code orders for \(q\)-ary words avoiding a given factor. Acta Informatica 52, 573–592 (2015). https://doi.org/10.1007/s00236-015-0225-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-015-0225-2