Efficient generation of gray codes for reflectable languages

  • Authors:
  • Limin Xiang;Kai Cheng;Kazuo Ushijima

  • Affiliations:
  • Faculty of Information Science, Kyushu Sangyo University, Fukuoka, Japan;Faculty of Information Science, Kyushu Sangyo University, Fukuoka, Japan;Faculty of Information Science, Kyushu Sangyo University, Fukuoka, Japan

  • Venue:
  • ICCSA'10 Proceedings of the 2010 international conference on Computational Science and Its Applications - Volume Part IV
  • Year:
  • 2010

Quantified Score

Hi-index 0.01

Visualization

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.