GENERATING BINARY-TREES BY TRANSPOSITIONS

被引:35
作者
RUSKEY, F
PROSKUROWSKI, A
机构
[1] UNIV VICTORIA,DEPT COMP SCI,VICTORIA V8W 2Y2,BC,CANADA
[2] UNIV OREGON,DEPT COMP & INFORMAT SCI,EUGENE,OR 97403
基金
加拿大自然科学与工程研究理事会;
关键词
D O I
10.1016/0196-6774(90)90030-I
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Let T(n) denote the set of all bitstrings with n 1's and n 0's that satisfy the property that in every prefix the number of 0's does not exceed the number of 1's. This is a well known representation of binary trees. We consider algorithms for generating the elements of T(n) that satisfy one of the following constraints: (a) successive bitstrings differ by the transposition of two bits or (b) successive bitstrings differ by the transposition of two adjacent bits. In case (a) a constant average time generation algorithm is presented. In case (b) we show that such generation is possible if and only if n is even or n < 5. A constant average time algorithm is presented in this case as well. © 1990.
引用
收藏
页码:68 / 84
页数:17
相关论文
共 21 条
[1]   EFFICIENT GENERATION OF BINARY REFLECTED GRAY CODE AND ITS APPLICATIONS [J].
BITNER, JR ;
EHRLICH, G ;
REINGOLD, EM .
COMMUNICATIONS OF THE ACM, 1976, 19 (09) :517-521
[2]   GRAY CODES WITH RESTRICTED DENSITY [J].
BUCK, M ;
WIEDEMANN, D .
DISCRETE MATHEMATICS, 1984, 48 (2-3) :163-171
[3]   SOME HAMILTON PATHS AND A MINIMAL CHANGE ALGORITHM [J].
EADES, P ;
HICKEY, M ;
READ, RC .
JOURNAL OF THE ACM, 1984, 31 (01) :19-29
[4]   COMBINATORIAL GRAY CODES [J].
JOICHI, JT ;
WHITE, DE ;
WILLIAMSON, SG .
SIAM JOURNAL ON COMPUTING, 1980, 9 (01) :130-141
[5]   SOLUTION OF SOME MULTI-DIMENSIONAL LATTICE PATH PARITY DIFFERENCE RECURRENCE RELATIONS [J].
KO, CW ;
RUSKEY, F .
DISCRETE MATHEMATICS, 1988, 71 (01) :47-56
[6]   GENERATING BINARY-TREES OF BOUNDED HEIGHT [J].
LEE, CC ;
LEE, DT ;
WONG, CK .
ACTA INFORMATICA, 1986, 23 (05) :529-544
[7]   RANKING AND UNRANKING OF AVL-TREES [J].
LI, LW .
SIAM JOURNAL ON COMPUTING, 1986, 15 (04) :1025-1035
[8]   THE ROTATION GRAPH OF BINARY-TREES IS HAMILTONIAN [J].
LUCAS, JM .
JOURNAL OF ALGORITHMS, 1987, 8 (04) :503-535
[9]   ENUMERATING, RANKING AND UNRANKING BINARY-TREES [J].
PALLO, JM .
COMPUTER JOURNAL, 1986, 29 (02) :171-175
[10]   BINARY-TREE GRAY CODES [J].
PROSKUROWSKI, A ;
RUSKEY, F .
JOURNAL OF ALGORITHMS, 1985, 6 (02) :225-238