Abstract
Y. Li and J. Sawada classified a type of language called a reflectable language [Inform. Process. Lett. 109 (2009) 296-300], and gave a generic recursive algorithm GrayCode to list all strings of length n for any reflectable language in Gray code order. GrayCode runs in O(n) worst-case time per string for any application. Based on Williamson’s algorithm for k-ary strings, a generic non-recursive algorithm GenericNext is proposed in this paper to list all strings of length for any reflectable language in Gray code order, but the worst-case time is O(1) per string for all the applications mentioned in Y. Li and J. Sawada’s paper.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Li, Y., Sawada, J.: Gray codes for reflectable languages. Information Processing Letters 109, 296–300 (2009)
Williamson, S.G.: Combinatorics for Computer Science. Computer Science Press, Rockville (1985)
Xiang, L., Cheng, K., Ushijima, K.: On Gray Code for Set Partitions. In: Proc. Information -MFCSIT 2006, Cork, Ireland, August 1-5, pp. 180–183 (2006)
Xiang, L., Ushijima, K.: On O(1) Time Algorithms for Combinatorial Generation. The Computer Journal 44(4), 292–302 (2001)
Xiang, L., Ushijima, K., Akl, S.G.: Generating regular k-ary trees efficiently. The Computer Journal 43(4), 290–300 (2000)
Xiang, L., Ushijima, K., Tang, C.: Efficient loopless generation of Gray codes for k- ary trees. Information Processing Letters 76, 169–174 (2000)
Xiang, L., Ushijima, K., Tang, C.: Grammar-oriented enumeration of binary trees. The Computer Journal 40(5), 278–291 (1997)
Zaks, S.: Lexicographic generation of ordered trees. Theoret. Comp. Sci. 10, 63–82 (1980)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Xiang, L., Cheng, K., Ushijima, K. (2010). Efficient Generation of Gray Codes for Reflectable Languages. In: Taniar, D., Gervasi, O., Murgante, B., Pardede, E., Apduhan, B.O. (eds) Computational Science and Its Applications – ICCSA 2010. ICCSA 2010. Lecture Notes in Computer Science, vol 6019. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12189-0_37
Download citation
DOI: https://doi.org/10.1007/978-3-642-12189-0_37
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12188-3
Online ISBN: 978-3-642-12189-0
eBook Packages: Computer ScienceComputer Science (R0)