平衡绳的串联复杂度是多少?

发布于 2024-09-26 09:42:44 字数 659 浏览 0 评论 0原文

我查看了不同的论文,以下是我收集的信息:

那么,串联的时间复杂度是多少呢?何时执行重新平衡以确保这种串联复杂性,同时保持树平衡?在谈论这种复杂性时是否假设了一些特定的使用模式?

I've looked at different papers and here is the information that I've gathered:

  • SGI implementation and C cords neither guarantee O(1) time concatenation for long ropes nor ~log N depth for shorter ones.
  • Different sources contradict each other. Wikipedia claims O(1) concatenation. This page says that concatenation is O(1) only when one operand is small and O(log N) otherwise.

So, what is the time complexity of concatenation? When exactly rebalancing is performed to ensure this concatenation complexity while maintaining tree balance? Are some specific usage patterns assumed when talking about this complexity?

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

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

发布评论

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

评论(1

匿名。 2024-10-03 09:42:44

维基百科文章不清楚,论文 “绳子:弦的替代品”它没有引用任何地方,声称这样的复杂性结果。

另一方面,最近的这篇论文(作者:Gerth Stølting Brodal、Christos Makris 和 Kostas Tsichlas)确实“纯函数式最坏情况常数时间可连接排序列表”。他们还有 O(logn) 搜索,所以实际上你可以将其标记为“平衡”,但我还没有阅读详细信息,只是阅读结果。

“绳索”是一个在实践中(相对)常见的术语,但在研究中并不常见。相反,我搜索了可连接队列(或列表),特别是 Tarjan、Okasaki、Kaplan 等人所做的研究,我认为这就是您真正的答案。

The wikipedia article is unclear, the paper "Ropes: an Alternative to Strings" that it cites nowhere, claims such a complexity result.

On the other hand, this recent paper (by Gerth Stølting Brodal, Christos Makris and Kostas Tsichlas) does: "Purely Functional Worst Case Constant Time Catenable Sorted Lists". They also have O(logn) search, so indeed you can tag it "balanced", I haven't read the details though, just the results.

"Rope" is a term that is (relatively) common in practice, but not in research. Instead, I searched for catenable queues (or lists), especially research done by people as Tarjan, Okasaki, Kaplan and others, I think that's where your real answer is.

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