arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 0907.1295cs.DS
收藏

通过搜索和选择进行在线排序

Online Sorting via Searching and Selection

Ankur Gupta, Anna Kispert, Jonathan P. Sorenson

摘要:

在本文中,我们提出了一个框架的基础上,一个简单的数据结构和参数化算法的问题,发现项目在一个未排序的列表中的线性有序项目的基础上,他们的排名(选择)或价值(搜索)。作为回答这些在线选择和搜索查询的副作用,我们逐步对列表进行排序。我们的算法是基于霍尔的快速选择,并参数化的基础上的枢轴选择方法。例如,如果我们选择枢轴作为子区间中的最后一项,我们的框架产生的算法将在O(n log q)的平均时间内回答q<=n个唯一选择和/或搜索查询。在q=Ω(n)查询之后,列表被排序。每个重复的选择查询需要常数时间,每个重复的搜索查询需要O(log n)时间。这两种查询类型可以自由交叉。通过将不同的主元选择方法插入到我们的框架中,这些结果可以成为随机的期望时间或确定性的最坏情况时间。我们的方法很容易实现,我们表明他们在实践中表现良好。

英文摘要:

In this paper, we present a framework based on a simple data structure and parameterized algorithms for the problems of finding items in an unsorted list of linearly ordered items based on their rank (selection) or value (search). As a side-effect of answering these online selection and search queries, we progressively sort the list. Our algorithms are based on Hoare's Quickselect, and are parameterized based on the pivot selection method. For example, if we choose the pivot as the last item in a subinterval, our framework yields algorithms that will answer q<=n unique selection and/or search queries in a total of O(n log q) average time. After q=Ω(n) queries the list is sorted. Each repeated selection query takes constant time, and each repeated search query takes O(log n) time. The two query types can be interleaved freely. By plugging different pivot selection methods into our framework, these results can, for example, become randomized expected time or deterministic worst-case time. Our methods are easy to implement, and we show they perform well in practice.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑