In this paper, we present two new ranking and unranking algorithms for z-sequences in Gray-code order. These algorithms are designed based on a loopless generation algorithm which is given for z-sequences corresponding to t-ary trees by Roelants van Baronaigien and Xiang et al. Up to our knowledge no other ranking and unranking algorithms are given for Gray-codes corresponding to t-ary trees. The time complexity of both algorithms for t-ary trees with n nodes is O(n2t).
展开▼
机译:在本文中,我们为格雷码顺序的z序列提供了两种新的排序和不排序算法。这些算法是基于Roelants van Baronaigien和Xiang等人针对与t元树对应的z序列给出的无环生成算法设计的。据我们所知,对于与三进制树对应的格雷码,没有其他排名和排名算法。两种算法在n个节点的三叉树上的时间复杂度均为O(n 2 sup> t)。
展开▼