The greedy gray code algorithm

  • Authors:
  • Aaron Williams

  • Affiliations:
  • Department of Mathematics and Statistics, McGill University, Canada

  • Venue:
  • WADS'13 Proceedings of the 13th international conference on Algorithms and Data Structures
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

We reinterpret classic Gray codes for binary strings, permutations, combinations, binary trees, and set partitions using a simple greedy algorithm. The algorithm begins with an initial object and an ordered list of operations, and then repeatedly creates a new object by applying the first possible operation to the most recently created object.