arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1310.1649cs.DS
收藏

QuickLexSort:一种有效的数据库嵌套约束字典排序算法

QuickLexSort: An efficient algorithm for lexicographically sorting nested restrictions of a database

David Haws

摘要:

字典排序是一个基本问题,应用于列联表,数据库,贝叶斯网络等。按字典顺序对一般数据进行排序的标准方法是迭代地使用稳定排序--一种保留现有顺序的排序。在这里,我们提出了一种新的字典排序方法称为QuickLexSort。基于稳定排序的字典序排序算法从最不重要的特征到最重要的特征进行排序,而QuickLexSort则从最重要的特征到最不重要的特征进行排序,并不断完善排序。QuickLexSort首先需要一个一次性的适度预处理步骤,其中数据集的每个特征都独立排序。当对数据库进行字典排序时,QuickLexSort(包括预处理)的运行时间与使用基于稳定排序的方法相当。对于具有$m$行和$n$列的数据库,以及在时间$O(mlog(m))$中运行的排序算法,基于字典序排序的稳定排序和QuickLexSort都需要时间$O(nmlog(m))$。然而,在许多应用程序中,需要对嵌套数据进行字典排序,例如\所有可能的子矩阵,直到列的某个基数。在这种情况下,我们显示QuickLexSort提供了一个性能改进的日志因子的数据库长度(矩阵中的行)使用一个标准的稳定排序的方法。例如\为了将所有子矩阵排序到基数$k$,QuickLexSort具有运行时间$O(mn^k)$,而基于字典序排序的稳定排序将花费时间$O(mlog(m)n^k)$。在对整个矩阵只运行一次的预处理步骤之后,QuickLexSort的运行时间与要排序的嵌套子矩阵的数量成线性关系。我们的结论与应用贝叶斯网络评分检测上位性使用SNP标记数据。

英文摘要:

Lexicographical sorting is a fundamental problem with applications to contingency tables, databases, Bayesian networks, and more. A standard method to lexicographically sort general data is to iteratively use a stable sort -- a sort which preserves existing orders. Here we present a new method of lexicographical sorting called QuickLexSort. Whereas a stable sort based lexicographical sorting algorithm operates from the least important to most important features, in contrast, QuickLexSort sorts from the most important to least important features, refining the sort as it goes. QuickLexSort first requires a one-time modest pre-processing step where each feature of the data set is sorted independently. When lexicographically sorting a database, QuickLexSort (including pre-processing) has comparable running time to using a stable sort based approach. For a data base with $m$ rows and $n$ columns, and a sorting algorithm running in time $O(mlog(m))$, a stable sort based lexicographical sort and QuickLexSort will both take time $O(nmlog(m))$. However in many applications one has the need to lexicographically sort nested data, e.g.\ all possible sub-matrices up to a certain cardinality of columns. In such cases we show QuickLexSort gives a performance improvement of a log factor of the database length (rows in matrix) over using a standard stable sort based approach. E.g.\ to sort all sub-matrices up to cardinality $k$, QuickLexSort has running time $O(mn^k)$ whereas a stable sort based lexicographical sort will take time $O(mlog(m)n^k)$. After the pre-processing step that is run only once for the entire matrix, QuickLexSort has a running time linear in the number of nested sub-matrices to sort. We conclude with an application to Bayesian network scoring to detect epistasis using SNP marker data.

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

↑