The greedy Prefer-same de Bruijn sequence construction was first presented by Eldert et al.[AIEE Transactions 77 (1958)]. As a greedy algorithm, it has one major downside: it requires an exponential amount of space to store the length $2^n$ de Bruijn sequence. Though de Bruijn sequences have been heavily studied over the last 60 years, finding an efficient construction for the Prefer-same de Bruijn sequence has remained a tantalizing open problem. In this paper, we unveil the underlying structure of the Prefer-same de Bruijn sequence and solve the open problem by presenting an efficient algorithm to construct it using $O(n)$ time per bit and only $O(n)$ space. Following a similar approach, we also present an efficient algorithm to construct the Prefer-opposite de Bruijn sequence.
翻译:贪婪Prefer-same德布鲁因序列构造方法最初由Eldert等人提出[AIEE Transactions 77 (1958)]。作为一种贪婪算法,其存在一个主要缺陷:需要指数级存储空间来存储长度为$2^n$的德布鲁因序列。尽管过去60年间德布鲁因序列已得到广泛研究,但寻找Prefer-same德布鲁因序列的高效构造方法始终是一个引人入胜的未解难题。本文揭示了Prefer-same德布鲁因序列的底层结构,并通过提出一种高效算法解决了该开放问题——该算法以每比特$O(n)$时间复杂度和仅$O(n)$空间复杂度进行构造。采用类似方法,我们还提出了一种高效构造Prefer-opposite德布鲁因序列的算法。