arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1503.00067cs.DS
收藏

相邻多集组合的O(1)时间生成

O(1) Time Generation of Adjacent Multiset Combinations

Tadao Takaoka

摘要:

我们解决的问题,设计一个O(1)的时间算法产生相邻的多集组合在一个不同的方法从沃尔什。相邻这个词的意思是,两个相邻的多集组合在它们的向量形式上有两处相差一处。以前的多集组合的O(1)时间算法生成非相邻的多集组合。我们的算法在本文中可以从一个通用的框架组合格雷码,我们将其扩展到适合我们的组合和多集组合的需要。其中心思想是一个扭曲的字典树,这是从字典树的组合对象的给定集合通过扭曲分支取决于每个节点的奇偶校验。遍历该树的迭代算法将在恒定时间内生成给定的组合对象集,并且从当前组合对象到下一个组合对象的变化次数固定。

英文摘要:

We solve the problem of designing an O(1) time algorithm for generating adjacent multiset combinations in a different approach from Walsh. By the word adjacent, we mean that two adjacent multiset combinations are different at two places by one in their vector forms. Previous O(1) time algorithms for multiset combinations generated non-adjacent multiset combinations. Our algorithm in this paper can be derived from a general framework of combinatorial Gray code, which we characterise to suit our need for combinations and multiset combinations. The central idea is a twisted lexico tree, which is obtained from the lexicographic tree for the given set of combinatorial objects by twisting branches depending on the parity of each node. An iterative algorithm which traverses this tree will generate the given set of combinatorial objects in constant time as well as with a fixed number of changes from the present combinatorial object to the next.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑