我以前从未见过带有分母中有对数的算法,并且我想知道这种形式是否有任何实际有用的算法?
我了解许多事情可能导致对数因子在运行时成倍增长,例如排序或基于树的算法,但是什么导致您除以对数因子呢?
我以前从未见过带有分母中有对数的算法,并且我想知道这种形式是否有任何实际有用的算法?
我了解许多事情可能导致对数因子在运行时成倍增长,例如排序或基于树的算法,但是什么导致您除以对数因子呢?
Answers:
魔方是一个非常自然的例子(对我来说,是意外的)。一个立方体需要步骤来求解。(请注意,这是theta表示法,因此上下限很严格)。
如本文 [1]所示。
值得一提的是,解决魔方的特定实例的复杂性是开放的,但被认为是NP难的(例如在这里讨论) NP难的 [2]。的算法保证了溶液中,它保证所有解决方案都渐近最优,但它可能不是最佳解决特定实例。您对有用的定义此处可能适用,也可能不会适用,因为此算法通常无法解决Rubik的多维数据集(Kociemba算法通常用于小型多维数据集,因为它在实践中提供了快速,最佳的解决方案)。
[1] Erik D. Demaine,Martin L. Demaine,Sarah Eisenstat,Anna Lubiw和Andrew Winslow。解决魔方的算法。第19届年度欧洲算法研讨会(ESA 2011),2011年9月5-9日,第689-700页
[2] Erik D. Demaine,Sarah Eisenstat和Mikhail Rudoy。最优地解决魔方的问题是NP完全的。第35届计算机科学理论方面的国际学术会议论文集(STACS 2018),2018年2月28日至3月3日,第24:1-24:13页。
出现在分母中而没有位打包技巧的示例是Agarwal,Ben Avraham,Kaplan和Sharir的最新论文,该论文计算了时间O中两个多边形链之间的离散Fréchet距离(n 2 log log n / log n )。虽然我对算法的细节不熟悉,但是一个通用的技巧是将输入分成相对较小的部分,然后巧妙地组合答案(当然这听起来像是分而治之,但您不会得到log n在分母上有一些巧妙的技巧)
并非完全是您的要求,而是分母中出现对数因子的“野外”情况是斯蒂芬·库克,皮埃尔·麦肯齐,达斯汀·韦尔,马克·布拉维曼和斯蒂芬·库克撰写的论文《用于树的卵石和分支程序》。拉胡尔·桑塔南(Rahul Santhanam)。
树评价问题(TEP)是:给定与值注释进制树在{ 1 ,... ,ķ }在叶子和功能{ 1 ,... ,ķ } d → { 1 ,... ,ķ }上的内部节点,评估树。在此,每个内部节点都会根据其子代的值获得其带注释的函数的值。这是一个简单的问题,重点是要证明它不能在对数空间中解决(当树的高度是输入的一部分时)。为此,我们对解决TEP的分支程序的规模感兴趣。
In Section 5, tight bounds are presented for trees of height 3, both for TEP and for the related problem BEP, in which the output is collapsed to in some arbitrary way. For TEP the bound is , while for BEP the bound is , i.e. you get a saving of .
Even though it's not about runtime, I thought it worth mentioning the classical result of Hopcroft, Paul, and Valiant: [1], since it's still in the spirit of "what could cause you to save a log factor."
That gives lots of examples of problems whose best known upper bound on space complexity has a log in the denominator. (Depending on your viewpoint, I would think that either makes this example very interesting - what an amazing theorem! - or very uninteresting - it's probably not "actually useful".)
[1] Hopcroft, Paul, and Valiant. On time versus space. J. ACM 24(2):332-337, 1977.
There are two problems with tight query complexity :
The best known algorithm for computing the edit (a.k.a. Levenshtein) distance between two strings of length takes time:
William J. Masek, Mike Paterson: A Faster Algorithm Computing String Edit Distances. J. Comput. Syst. Sci. 20(1): 18-31 (1980).
appears as the correct bound for a problem considered by Greg and Paul Valiant (no connection to bit tricks):
Gregory Valiant, and Paul Valiant, The power of linear estimators, 2011. In the 52nd Annual IEEE Symposium on the Foundations of Computer Science, FOCS 2011.
Here's another example of a tight bound having a log factor. (This is Theorem 6.17 from Boolean Function Complexity: Advances and Frontiers by Stasys Jukna.)
The formula size (over the full binary basis or the De Morgan basis) of the element distinctness problem is , where is the number of bits in the input.
The reason the log factor appears in the denominator is that representing integers between 1 and requires bits in total, since each integer requires bits. So an upper bound that looks natural in terms of , like , becomes when expressed in terms of , where is the number of bits in the input.
Finding the prime factors of n by trial division when the list of primes is already given. There are primes less than n so if these primes are given to you, then trial division of n by each of them takes time (assuming division is a constant-time operation)
somewhat similar to JG's answer & "thinking outside the box", this seems like a related/relevant/apropos/fundamental negative result. based on diagonalization with a universal TM, there exists a DTIME language that cannot run in DTIME, due to the time hierarchy theorem. so this applies to a linear DTIME algorithm that exists, , that runs impossibly in DTIME.