【24h】

No sorting? Better searching! optimal array organization

机译:没有排序?更好的搜索! 最佳阵列组织

获取原文

摘要

Sorting is commonly meant as the task of arranging keys in increasing or decreasing order (or small variations of this order). Given n keys underlying a total order, the best organization in an array is maintaining them in sorted order. Searching requires /spl Theta/ (log n) comparisons in the worst case, which is optimal. We demonstrate that this basic fact in data structures does not hold for the general case of multidimensional keys, whose comparison cost is proportional to their length. In two papers by Andersson et al. (1994) and Andersson et al. (1995) and the full version in 2001, Andersson et al. study the complexity of searching a sorted array of n keys, each of length k, arranged in lexicographic (or alphabetic) order for an arbitrary, possibly unbounded, ordered alphabet. They give sophisticated arguments for proving a tight bound in the worst case for this basic data organization, up to a constant factor, obtaining /spl Theta/(((k log log n)/(log log (4 + ((k log log n)/log n)))) + k log n) character comparisons (or probes). Note that the bound is /spl Theta/ (log n) when k = 1, which is the case that is well known in algorithmics. We describe a permutation of the n keys that is different from the sorted order, and sorting is just the starting point for describing our preprocessing. When keys are stored according to this "unsorted" order in the array, the complexity of searching drops to /spl Theta/ (k + log n) character comparisons (or probes) in the worst case, which is optimal among all possible permutations of the n keys in the array, up to a constant factor. Again, the bound is /spl Theta/ (log n) when k = 1. Jointly with the aforementioned result of Anders son et al., our finding provably shows that keeping k-dimensional keys sorted in an array is not the best data organization for searching. This fact was not observable before by just considering k = O(1) as sorting is an optimal organization in this case. More implications of our result are commented in the introduction.
机译:排序通常是指按递增或递减顺序(或此顺序的小变化)排列密钥的任务。给定总顺序中的n个键,数组中最好的组织将它们按排序顺序进行维护。在最坏的情况下,搜索需要/ spl Theta /(log n)比较,这是最佳选择。我们证明了数据结构中的这一基本事实并不适用于多维键的一般情况,多维键的比较成本与其长度成正比。在Andersson等人的两篇论文中。 (1994)和Andersson等。 (1995年)和完整版(2001年),Andersson等。研究按字典顺序(或字母顺序)搜索任意(可能是无界的)有序字母的n个键的排序数组的复杂性,每个键的长度为k。他们给出了复杂的论据,以证明在最坏的情况下对于此基本数据组织来说,它是一个恒定因子,直到/ spl Theta /((((k log log n)/(log log(4 +((k log log n)/ log n)))))+ k log n)字符比较(或探针)。注意,当k = 1时,界限为/ spl Theta /(log n),这是算法学中众所周知的情况。我们描述了与排序顺序不同的n个键的排列,排序只是描述预处理的起点。当按此“未排序”顺序将键存储在数组中时,在最坏的情况下,搜索的复杂度下降到/ spl Theta /(k + log n)字符比较(或探针),在所有可能的排列中最佳数组中的n个键,最大为常数。同样,当k = 1时,边界为/ spl Theta /(log n)。与上述Anders son等人的结果一起,我们的发现可证明地表明,将k维键保持在数组中并不是最佳的数据组织。用于搜索。以前仅考虑k = O(1)是无法观察到这一事实的,因为在这种情况下,排序是一种最佳组织。引言中评论了我们结果的更多含义。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号