{"title":"选择从堆,行排序矩阵和X+Y使用软堆","authors":"Haim Kaplan, L. Kozma, Or Zamir, Uri Zwick","doi":"10.4230/OASIcs.SOSA.2019.5","DOIUrl":null,"url":null,"abstract":"We use soft heaps to obtain simpler optimal algorithms for selecting the $k$-th smallest item, and the set of~$k$ smallest items, from a heap-ordered tree, from a collection of sorted lists, and from $X+Y$, where $X$ and $Y$ are two unsorted sets. Our results match, and in some ways extend and improve, classical results of Frederickson (1993) and Frederickson and Johnson (1982). In particular, for selecting the $k$-th smallest item, or the set of~$k$ smallest items, from a collection of~$m$ sorted lists we obtain a new optimal \"output-sensitive\" algorithm that performs only $O(m+\\sum_{i=1}^m \\log(k_i+1))$ comparisons, where $k_i$ is the number of items of the $i$-th list that belong to the overall set of~$k$ smallest items.","PeriodicalId":93491,"journal":{"name":"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)","volume":"152 1","pages":"5:1-5:21"},"PeriodicalIF":0.0000,"publicationDate":"2018-02-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"23","resultStr":"{\"title\":\"Selection from heaps, row-sorted matrices and X+Y using soft heaps\",\"authors\":\"Haim Kaplan, L. Kozma, Or Zamir, Uri Zwick\",\"doi\":\"10.4230/OASIcs.SOSA.2019.5\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We use soft heaps to obtain simpler optimal algorithms for selecting the $k$-th smallest item, and the set of~$k$ smallest items, from a heap-ordered tree, from a collection of sorted lists, and from $X+Y$, where $X$ and $Y$ are two unsorted sets. Our results match, and in some ways extend and improve, classical results of Frederickson (1993) and Frederickson and Johnson (1982). In particular, for selecting the $k$-th smallest item, or the set of~$k$ smallest items, from a collection of~$m$ sorted lists we obtain a new optimal \\\"output-sensitive\\\" algorithm that performs only $O(m+\\\\sum_{i=1}^m \\\\log(k_i+1))$ comparisons, where $k_i$ is the number of items of the $i$-th list that belong to the overall set of~$k$ smallest items.\",\"PeriodicalId\":93491,\"journal\":{\"name\":\"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)\",\"volume\":\"152 1\",\"pages\":\"5:1-5:21\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-02-20\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"23\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4230/OASIcs.SOSA.2019.5\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the SIAM Symposium on Simplicity in Algorithms (SOSA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/OASIcs.SOSA.2019.5","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 23
摘要
我们使用软堆来获得更简单的最优算法,用于从堆排序树、有序列表集合和$X+Y$(其中$X$和$Y$是两个未排序集)中选择$k$ -第一个最小项和$k$最小项集。我们的结果与Frederickson(1993)和Frederickson and Johnson(1982)的经典结果相匹配,并在某些方面进行了扩展和改进。特别是,对于从$m$个排序列表的集合中选择$k$个最小项或$k$个最小项的集合,我们获得了一个新的最优“输出敏感”算法,该算法只执行$O(m+\sum_{i=1}^m \log(k_i+1))$比较,其中$k_i$是$i$个列表中属于$k$个最小项的总体集合的项数。
Selection from heaps, row-sorted matrices and X+Y using soft heaps
We use soft heaps to obtain simpler optimal algorithms for selecting the $k$-th smallest item, and the set of~$k$ smallest items, from a heap-ordered tree, from a collection of sorted lists, and from $X+Y$, where $X$ and $Y$ are two unsorted sets. Our results match, and in some ways extend and improve, classical results of Frederickson (1993) and Frederickson and Johnson (1982). In particular, for selecting the $k$-th smallest item, or the set of~$k$ smallest items, from a collection of~$m$ sorted lists we obtain a new optimal "output-sensitive" algorithm that performs only $O(m+\sum_{i=1}^m \log(k_i+1))$ comparisons, where $k_i$ is the number of items of the $i$-th list that belong to the overall set of~$k$ smallest items.