首页> 外文会议>International Conference on Algorithmic Applications in Management >Improved Algorithms for Ranking and Unranking (k, m)-Ary Trees
【24h】

Improved Algorithms for Ranking and Unranking (k, m)-Ary Trees

机译:改进的(k,m)-Ary树排序和不排序算法

获取原文

摘要

Du and Liu (2007) introduced (k,m)-ary trees as a generalization of k-ary trees. In a (k, m)-ary tree, every node on even level has degree k (i.e., has A: children), and every node on odd level has degree m (which is called a crucial node) or is a leaf. In particular, a (k, m)-axy tree of order n has exactly n crucial nodes. Recently, Amani and Nowzari-Dalini (2019) presented a generation algorithm to produce all (k,m)-ary trees of order n in B-order using Zaks' encoding, and show that the generated ordering of this encoding results in a reverse-lexicographical ordering. They also proposed the corresponding ranking and unranking algorithms for (k, m)-ary trees according to such a generated ordering. These algorithms take O(kmn~2) time and space for building a precomputed table in which (k, m)-Catalan numbers (i.e., a kind of generalized Catalan numbers) are stored in advance. In this paper, we revisit the ranking and unranking problems. With the help of an encoding scheme called 'right-distance' introduced by Wu et al. (2011), we propose new ranking and unranking algorithms for (k, m)-ary trees of order n in B-order using Zaks' encoding. We show that both algorithms can be improved in O(kmn) time and O(n) space without building the precomputed table.
机译:Du和Liu(2007)引入了(k,m)元树作为k元树的推广。在(k,m)元树中,偶数级上的每个节点都具有度k(即具有A:子级),奇数级上的每个节点都具有度m(称为关键节点)或是叶子。特别地,阶数为n的(k,m)轴树恰好具有n个关键节点。最近,Amani和Nowzari-Dalini(2019)提出了一种生成算法,以使用Zaks编码生成B阶n阶的所有(k,m)进制树,并表明该编码的生成顺序相反-字典顺序。他们还根据这样生成的顺序为(k,m)元树提出了相应的排序和非排序算法。这些算法花费O(kmn〜2)的时间和空间来构建预先计算的表,在该表中预先存储了(k,m)-加泰罗尼亚数字(即一种广义的加泰罗尼亚数字)。在本文中,我们将重新讨论排名和未排名问题。借助Wu等人介绍的一种称为“右距”的编码方案。 (2011年),我们提出了使用Zaks编码对B阶n阶(k,m)一元树进行排序和不排序的新算法。我们表明,两种算法都可以在O(kmn)时间和O(n)空间中得到改进,而无需构建预先计算的表。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号