scispace - formally typeset
Search or ask a question

Showing papers on "Splay tree published in 2009"


Proceedings Article
10 Aug 2009
TL;DR: A backwards compatible bounds checking technique that substantially reduces performance overhead and is more than two times faster than the fastest previous technique and about five times faster--using less memory--than recording object bounds using a splay tree.
Abstract: Attacks that exploit out-of-bounds errors in C and C++ programs are still prevalent despite many years of research on bounds checking. Previous backwards compatible bounds checking techniques, which can be applied to unmodified C and C++ programs, maintain a data structure with the bounds for each allocated object and perform lookups in this data structure to check if pointers remain within bounds. This data structure can grow large and the lookups are expensive. In this paper we present a backwards compatible bounds checking technique that substantially reduces performance overhead. The key insight is to constrain the sizes of allocated memory regions and their alignment to enable efficient bounds lookups and hence efficient bounds checks at runtime. Our technique has low overhead in practice--only 8% throughput decrease for Apache-- and is more than two times faster than the fastest previous technique and about five times faster--using less memory--than recording object bounds using a splay tree.

263 citations


Proceedings ArticleDOI
04 Jan 2009
TL;DR: It is shown that there exists an equal-cost online algorithm, transforming the conjecture of Lucas and Munro into the conjecture that the greedy algorithm is dynamically optimal, and achieving a new lower bound for searching in the BST model.
Abstract: We present a novel connection between binary search trees (BSTs) and points in the plane satisfying a simple property. Using this correspondence, we achieve the following results:1. A surprisingly clean restatement in geometric terms of many results and conjectures relating to BSTs and dynamic optimality.2. A new lower bound for searching in the BST model, which subsumes the previous two known bounds of Wilber [FOCS'86].3. The first proposal for dynamic optimality not based on splay trees. A natural greedy but offline algorithm was presented by Lucas [1988], and independently by Munro [2000], and was conjectured to be an (additive) approximation of the best binary search tree. We show that there exists an equal-cost online algorithm, transforming the conjecture of Lucas and Munro into the conjecture that the greedy algorithm is dynamically optimal.

79 citations


Book ChapterDOI
01 Jan 2009
TL;DR: A set of self-adjusting tree filters is conceived by combining the scheme of binary search on prefix length with the splay tree model to optimize the early rejection of unwanted flows, which is important for many filtering devices such as firewalls.
Abstract: Many researches are about optimizing schemes for packet classification and matching filters to increase the performance of many network devices such as firewalls and QoS routers. Most of the proposed algorithms do not process dynamically the packets and give no specific interest in the skewness of the traffic. In this paper, we conceive a set of self-adjusting tree filters by combining the scheme of binary search on prefix length with the splay tree model. Hence, we have at most 2 hash accesses per filter for consecutive values. Then, we use the splaying technique to optimize the early rejection of unwanted flows, which is important for many filtering devices such as firewalls. Thus, to reject a packet, we have at most 2 hash accesses per filter and at least only one.

19 citations


Book ChapterDOI
24 Jul 2009
TL;DR: It is shown that both bottom-up and top-down rebalancing modify nodes exponentially infrequently in their heights, so the rank-balanced tree is introduced, a relaxation of AVL trees.
Abstract: Since the invention of AVL trees in 1962, a wide variety of ways to balance binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the design space of balanced trees has not been fully explored. We introduce the rank-balanced tree , a relaxation of AVL trees. Rank-balanced trees can be rebalanced bottom-up after an insertion or deletion in O(1) amortized time and at most two rotations worst-case, in contrast to red-black trees, which need up to three rotations per deletion. Rebalancing can also be done top-down with fixed lookahead in O(1) amortized time. Using a novel analysis that relies on an exponential potential function, we show that both bottom-up and top-down rebalancing modify nodes exponentially infrequently in their heights.

9 citations


01 Jan 2009
TL;DR: This algorithm is primarily intended to serve as an alternate proof that the dynamic optimality conjecture implies the dynamic finger conjecture—in view of the fact that the earlier explicit proof of this implication is the highly-nontrivial proof of the dynamicfinger theorem due to Cole.
Abstract: This thesis introduces the concept of heterogeneous decompositions of a degree-balanced search tree and applies this concept to establish the following three results. (1) Any leaf-store or node-store degree-balanced search tree can support a constant number of dynamic fingers in the worst case without storing extra pointers in its nodes nor restructuring after a finger search. Each dynamic finger is represented as a logarithmic-sized data structure that contains pointers pointing into the tree, which is maintained using dictionary algorithms that exploit this representation of dynamic fingers. (2) By construction, there exists a static binary search tree algorithm with the dynamic finger property in the worst case. This algorithm is primarily intended to serve as an alternate proof that the dynamic optimality conjecture implies the dynamic finger conjecture—in view of the fact that the earlier explicit proof of this implication is the highly-nontrivial proof of the dynamic finger theorem due to Cole. (3) By construction, there exists a static O(lg lg n)-competitive binary search tree algorithm with the dynamic finger property in the amortized case. As a corollary, if the splay trees of Sleator and Tarjan are O(1)-competitive even in the presence of splits and joins, then the multi-splay trees of Wang, Derryberry, and Sleator have the dynamic finger property in the amortized case.

4 citations


Book
15 Apr 2009
TL;DR: This solid foundation in the basics of C++ programming will allow readers to create efficient, elegant code ready for any production environment.
Abstract: This solid foundation in the basics of C++ programming will allow readers to create efficient, elegant code ready for any production environment. KEY TOPICS: Introduction to Computers, Programs, and C++; Elementary Programming; Selections; Loops; Function Basics; Advanced Function Features; Single-Dimensional Arrays; Multidimensional Arrays; Objects and Classes; Class Design; Pointers and Dynamic Memory Management; Templates and Vectors; File I/O; Operator Overloading; Inheritance and Polymorphism; Exception Handling; Recursion; Algorithm Efficiency; Sorting; Linked Lists, Stacks, and Queues. The following bonus chapters are on the books Web site: Binary Search Trees; STL Containers; STL Algorithms; Graphs and Applications; Weighted Graphs and Applications; AVL Trees and Splay Trees. MARKET: Ideal for beginning programmers.

2 citations


Journal IssueDOI
TL;DR: Semi-splaying is conceptually simpler than splaying, has the same asymptotic amortized complexity and, as will be clear from empirical data presented in this paper, the practical performance is better for a very broad variety of access patterns.
Abstract: Splay trees are widely considered as the classic examples of self-adjusting binary search trees and are part of most courses on data structures and algorithms. Already in the first seminal paper on splay trees (J. Assoc. Comput. Mach. 1985; 32(3):652–686) alternative operations were introduced, among which is semi-splaying. On the one hand, the analysis of semi-splaying gives a smaller constant for the amortized complexity, but on the other hand the authors write: Whether any version of semi-splaying is an improvement over splaying depends on the access sequence. Semi-splaying may be better when the access pattern is stable, but splaying adapts much faster to changes in usage. Maybe this sentence was the reason that nobody seriously ran tests to compare the performance of semi-splaying and splaying. Semi-splaying is conceptually simpler than splaying, has the same asymptotic amortized complexity and, as will be clear from empirical data presented in this paper, the practical performance is better for a very broad variety of access patterns. Therefore, its efficiency is a good reason to use semi-splaying for applications instead of its more prominent brother. Moreover, its simplicity also makes it very attractive for teaching purposes. Copyright © 2008 John Wiley & Sons, Ltd.

1 citations


Posted Content
TL;DR: It is shown how layered working-set trees can be used to achieve the unified bound to within a small additive term in the amortized sense while maintaining in the worst case an access time that is both logarithmic and within asmall multiplicative factor of the working- set bound.
Abstract: The working-set bound [Sleator and Tarjan, J. ACM, 1985] roughly states that searching for an element is fast if the element was accessed recently. Binary search trees, such as splay trees, can achieve this property in the amortized sense, while data structures that are not binary search trees are known to have this property in the worst case. We close this gap and present a binary search tree called a layered working-set tree that guarantees the working-set property in the worst case. The unified bound [Badoiu et al., TCS, 2007] roughly states that searching for an element is fast if it is near (in terms of rank distance) to a recently accessed element. We show how layered working-set trees can be used to achieve the unified bound to within a small additive term in the amortized sense while maintaining in the worst case an access time that is both logarithmic and within a small multiplicative factor of the working-set bound.