Dr. Valentin Bakoev, Assoc. Prof.
”St. Cyril and St. Methodius” University of Veliko Tarnovo (Bulgaria)
https://doi.org/10.53656/math2023-6-1-mir
Abstract. Here we consider a version of the Binary Reflected Gray Code (BRGC, or Graycode for short), called the mirror Gray code – in parallel and in comparison to the Gray code. We discuss some sources where the two codes are not distinguished and the reasons why. We present our arguments for treating the two codes as distinct, starting with a definition of the mirror Gray code and showing its main properties. Among the most important of these is the relationship between the two codes – the codewords of the mirror Gray code are “left-right mirror images” of those in the Gray code and vice versa. Other arguments we show are the differences in the algorithms for generating the codewords. We also present another approach that involves representing the codewords by integers (their serial numbers), generating and examining the two codes by using their sequences of serial numbers. For this purpose, we use the bijections that relate the pairs of combinatorial objects: binary vectors in a certain order and the corresponding integer sequences and subsets. In this way, we get different algorithms, sequences, and functions for successor and predecessor, for ranking and unranking at the mirror Gray code. We believe that this article provides at least one more perspective, as well as expands and enriches the knowledge of the Gray code.
Keywords: Gray code; mirror Gray code; lexicographic order; binary vector; codeword;
generation algorithm; integer sequence; predecessor; successor; rank; unrank function