Generating m-Ary Gray Codes and Related Algorithms

被引:0
|
作者
Bouyuklieva, Stefka [1 ]
Bouyukliev, Iliya [2 ]
Bakoev, Valentin [1 ]
Pashinska-Gadzheva, Maria [2 ]
机构
[1] St Cyril & St Methodius Univ Veliko Tarnovo, Fac Math & Informat, Veliko Tarnovo 5000, Bulgaria
[2] Bulgarian Acad Sci, Inst Math & Informat, Veliko Tarnovo 5000, Bulgaria
关键词
Gray code; m-ary Gray code; combinatorial algorithms; combinatorial generation; ranking; unranking;
D O I
10.3390/a17070311
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
In this work, we systematize several implementations of the Gray code over an alphabet with m >= 2 elements, which we present in C code so that they can be used directly after copying from the text. We consider two variants-reflected and modular (or shifted) m-ary Gray codes. For both variants, we present the ranking and unranking functions, as well as algorithms for generating only a part of the code, more precisely the codewords between two given vectors. Finally, we give algorithms that generate a maximal set of non-proportional vectors of length n over the given alphabet in a Gray code.
引用
收藏
页数:20
相关论文
共 50 条