涵盖 Dec 数字 0-99 的最短二进制序列

发布于 2024-07-18 10:02:36 字数 71 浏览 2 评论 0原文

考虑包含数字 0 到 99 的二进制表示形式的字符串 S 的集合。使得 S 的每个元素都是 T 的子串的最短字符串 T 是多少?

Consider the set of strings S that contains the binary representation of the numbers 0 to 99. What is the shortest string T such that every element of S is a substring of T?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁许谁一生繁华 2024-07-25 10:02:36

您所要求的与二进制De Bruijn 序列非常相似。 该问题的算法使用欧拉循环,可以轻松地适应来解决您的问题。

What you're asking for is very similar to the binary De Bruijn sequence. The algorithm for that problem, which uses Eulerian cycles, can easily be adapted to solve your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文