Abstract. The multiple selection problem asks for the elements of rank r1, r2, . . . , r k from a linearly ordered set of n elements. Let B denote the information theoretic lower bound on the number of element comparisons needed for multiple selection. We first show that a variant of multiple quickselect -a well known, simple, and practical generalization of quicksort -solves this problem with B + O(n) expected comparisons. We then develop a deterministic divide-and-conquer algorithm that solves the problem in O(B) time and B + o(B) + O(n) element comparisons.
We explain the counterintuitive observation that finding "good" pivots (close to the median of the array to be partitioned) may not improve performance of quicksort. Indeed, an intentionally skewed pivot improves performance. The reason is that while the instruction count decreases with the quality of the pivot, the likelihood that the direction of a branch is mispredicted also goes up. We analyze the effect of simple branch prediction schemes and measure the effects on real hardware.
We present algorithms for finding a longest common increasing subsequence of two or more input sequences. For two sequences of lengths m and n, where m ≥ n, we present an algorithm with an output-dependent expected running time of O((m + n ) log log σ + Sort ) and O(m) space, where is the length of a LCIS, σ is the size of the alphabet, and Sort is the time to sort each input sequence.For k ≥ 3 length-n sequences we present an algorithm which improves the previous best bound by more than a factor k for many inputs. In both cases, our algorithms are conceptually quite simple but rely on existing sophisticated data structures.Finally, we introduce the problem of longest common weakly-increasing (or non-decreasing) subsequences (LCWIS), for which we present an O(m+ n log n) time algorithm for the 3-letter alphabet case. For the extensively studied Longest Common Subsequence problem, comparable speedups have not been achieved for small alphabets.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.