scispace - formally typeset
Search or ask a question

Showing papers by "Gerth Stølting Brodal published in 2005"


BookDOI
01 Jan 2005

163 citations


Proceedings ArticleDOI
06 Jun 2005
TL;DR: The first cache-oblivious data structure for planar orthogonal range counting is presented, and a general four-sided range searching structure is presented that uses O(N log22 N/log2 log2 N) space and answers queries in O(logB N + T/B) memory transfers.
Abstract: We present the first cache-oblivious data structure for planar orthogonal range counting, and improve on previous results for cache-oblivious planar orthogonal range searching.Our range counting structure uses O(N log2 N) space and answers queries using O(logB N) memory transfers, where B is the block size of any memory level in a multilevel memory hierarchy. Using bit manipulation techniques, the space can be further reduced to O(N). The structure can also be modified to support more general semigroup range sum queries in O(logB N) memory transfers, using O(N log2 N) space for three-sided queries and O(N log22 N/log2 log2 N) space for four-sided queries.Based on the O(N log N) space range counting structure, we develop a data structure that uses O(N log2 N) space and answers three-sided range queries in O(logB N+T/B) memory transfers, where T is the number of reported points. Based on this structure, we present a general four-sided range searching structure that uses O(N log22 N/log2 log2 N) space and answers queries in O(logB N + T/B) memory transfers.

27 citations


Journal ArticleDOI
TL;DR: Three schemes are presented that improve the running time to O(1) time for managing dynamic allocation of memory blocks whose sizes are powers of two, where the time bound for deallocation is amortized for the first two schemes.
Abstract: We propose several modifications to the binary buddy system for managing dynamic allocation of memory blocks whose sizes are powers of two. The standard buddy system allocates and deallocates blocks in $\Theta(\lg n)$ time in the worst case (and on an amortized basis), where n is the size of the memory. We present three schemes that improve the running time to O(1) time, where the time bound for deallocation is amortized for the first two schemes. The first scheme uses just one more word of memory than the standard buddy system, but may result in greater fragmentation than necessary. The second and third schemes have essentially the same fragmentation as the standard buddy system, and use $O(2^{(1 + \sqrt{\lg n}) \lg \lg n})$ bits of auxiliary storage, which is $\omega(\lg^k n)$ but $o(n^\varepsilon)$ for all $k \geq 1$ and $\varepsilon > 0$ . Finally, we present simulation results estimating the effect of the excess fragmentation in the first scheme.

23 citations


Book ChapterDOI
11 Jul 2005
TL;DR: This work derives I/O-optimal cache-aware and cache-oblivious adaptive sorting algorithms which perform an optimal number of comparisons with respect to the number of inversions in the input.
Abstract: Two new adaptive sorting algorithms are introduced which perform an optimal number of comparisons with respect to the number of inversions in the input. The first algorithm is based on a new linear time reduction to (non-adaptive) sorting. The second algorithm is based on a new division protocol for the GenericSort algorithm by Estivill-Castro and Wood. From both algorithms we derive I/O-optimal cache-aware and cache-oblivious adaptive sorting algorithms. These are the first I/O-optimal adaptive sorting algorithms.

21 citations


Book ChapterDOI
15 Aug 2005
TL;DR: It is proved that a sorting algorithm using O(dn log n) comparisons performs Ω(n logdn) branch mispredictions, and it is shown that Multiway MergeSort achieves this tradeoff by adopting a multiway merger with a low number of branch mis Predictions.
Abstract: Branch mispredictions is an important factor affecting the running time in practice. In this paper we consider tradeoffs between the number of branch mispredictions and the number of comparisons for sorting algorithms in the comparison model. We prove that a sorting algorithm using O(dn log n) comparisons performs Ω(n logdn) branch mispredictions. We show that Multiway MergeSort achieves this tradeoff by adopting a multiway merger with a low number of branch mispredictions. For adaptive sorting algorithms we similarly obtain that an algorithm performing O(dn(1 + log(1 + Inv/n))) comparisons must perform Ω(n logd(1 + Inv/n)) branch mispredictions, where Inv is the number of inversions in the input. This tradeoff can be achieved by GenericSort by Estivill-Castro and Wood by adopting a multiway division protocol and a multiway merging algorithm with a low number of branch mispredictions.

18 citations


Journal ArticleDOI
TL;DR: The problem of longest common weakly-increasing (or non-decreasing) subsequences (LCWIS), for which an O(m + n log n) time algorithm is presented for the 3-letter alphabet case, for which comparable speedups have not been achieved for small alphabets.
Abstract: 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 l) log log sigma + Sort) and O(m) space, where l is the length of an LCIS, sigma 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 running time O(min{k r^2, r log^{k-1} r} + Sort), 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.

9 citations


01 Jan 2005
TL;DR: In this article, a deterministic 3-approximation algorithm for the problem of scheduling n jobs to m machines of different speeds s.t. the makespan is minimized (Q||Cmax).
Abstract: We consider the problem of scheduling n jobs to m machines of different speeds s.t. the makespan is minimized (Q||Cmax). We provide a fast and simple, deterministic monotone 3-approximation algorithm for Q||Cmax Monotonicity is relevant in the context of truthful mechanisms: when each machine speed is only known to the machine itself, we need to motivate that machines declare their true speeds to the scheduling mechanism. As shown by Archer and Tardos, such motivation is possible only if the scheduling algorithm used by the mechanism is monotone. The best previous monotone algorithm that is polynomial in m, was a 5-approximation by Andelman et al. A randomized 2-approximation method, satisfying a weaker definition of truthfulness, is given by Archer. As a core result, we prove the conjecture of Auletta et al., that the greedy algorithm (Lpt) is monotone if machine speeds are all integer powers of 2.

6 citations


01 Jan 2005
TL;DR: In this paper, it was shown that the running time of Quicksort is adaptive with respect to the presortedness measure Inv, where Inv denotes the number of inversions in the input sequence.
Abstract: Quicksort was first introduced in 1961 by Hoare. Many variants have been developed, the best of which are among the fastest generic-sorting algorithms available, as testified by the choice of Quicksort as the default sorting algorithm in most programming libraries. Some sorting algorithms are adaptive, i.e., they have a complexity analysis that is better for inputs, which are nearly sorted, according to some specified measure of presortedness. Quicksort is not among these, as it uses Ω(n log n) comparisons even for sorted inputs. However, in this paper, we demonstrate empirically that the actual running time of Quicksort is adaptive with respect to the presortedness measure Inv. Differences close to a factor of two are observed between instances with low and high Inv value. We then show that for the randomized version of Quicksort, the number of element swaps performed is provably adaptive with respect to the measure Inv. More precisely, we prove that randomized Quicksort performs expected O(n(1 + log(1 + Inv/n))) element swaps, where Inv denotes the number of inversions in the input sequence. This result provides a theoretical explanation for the observed behavior and gives new insights on the behavior of Quicksort. We also give some empirical results on the adaptive behavior of Heapsort and Mergesort.

6 citations