Day–Stout–Warren algorithm

The Day–Stout–Warren (DSW) algorithm is a method for efficiently balancing binary search trees – that is, decreasing their height to O(log n) nodes, where n is the total number of nodes. Unlike a self-balancing binary search tree, it does not do this incrementally during each operation, but periodically, so that its cost can be amortized over many operations. The algorithm was designed by Quentin F. Stout and Bette Warren in a 1986 CACM paper, based on work done by Colin Day in 1976.

Comment
enThe Day–Stout–Warren (DSW) algorithm is a method for efficiently balancing binary search trees – that is, decreasing their height to O(log n) nodes, where n is the total number of nodes. Unlike a self-balancing binary search tree, it does not do this incrementally during each operation, but periodically, so that its cost can be amortized over many operations. The algorithm was designed by Quentin F. Stout and Bette Warren in a 1986 CACM paper, based on work done by Colin Day in 1976.
Has abstract
enThe Day–Stout–Warren (DSW) algorithm is a method for efficiently balancing binary search trees – that is, decreasing their height to O(log n) nodes, where n is the total number of nodes. Unlike a self-balancing binary search tree, it does not do this incrementally during each operation, but periodically, so that its cost can be amortized over many operations. The algorithm was designed by Quentin F. Stout and Bette Warren in a 1986 CACM paper, based on work done by Colin Day in 1976. The algorithm requires linear (O(n)) time and is in-place. The original algorithm by Day generates as compact a tree as possible: all levels of the tree are completely full except possibly the bottom-most. It operates in two phases. First, the tree is turned into a linked list by means of an in-order traversal, reusing the pointers in the (threaded) tree's nodes. A series of left-rotations forms the second phase.The Stout–Warren modification generates a complete binary tree, namely one in which the bottom-most level is filled strictly from left to right. This is a useful transformation to perform if it is known that no more inserts will be done. It does not require the tree to be threaded, nor does it require more than constant space to operate. Like the original algorithm, Day–Stout–Warren operates in two phases, the first entirely new, the second a modification of Day's rotation phase. A 2002 article by Timothy J. Rolfe brought attention back to the DSW algorithm; the naming is from the section title "6.7.1: The DSW Algorithm" in Adam Drozdek's textbook. Rolfe cites two main advantages: "in circumstances in which one generates an entire binary search tree at the beginning of processing, followed by item look-up access for the rest of processing" and "pedagogically within a course on data structures where one progresses from the binary search tree into self-adjusting trees, since it gives a first exposure to doing rotations within a binary search tree."
Hypernym
Method
Is primary topic of
Day–Stout–Warren algorithm
Label
enDay–Stout–Warren algorithm
Link from a Wikipage to another Wikipage
Amortized analysis
Big-O notation
Binary search tree
Category:Amortized data structures
Category:Search trees
Communications of the ACM
In-order traversal
In-place algorithm
Linked list
Pseudocode
Self-balancing binary search tree
Space complexity
Subroutine
Threaded binary tree
Tree rotation
SameAs
4iXk1
Algorytm DSW
Dej-Stout-Varen algoritam
DSWアルゴリズム
m.05pbjt
Q5243649
الگوریتم دی–استوت–وارن
Subject
Category:Amortized data structures
Category:Search trees
WasDerivedFrom
Day–Stout–Warren algorithm?oldid=1096755376&ns=0
WikiPageLength
5730
Wikipage page ID
1699060
Wikipage revision ID
1096755376
WikiPageUsesTemplate
Template:Reflist
Template:Short description
Template:Snd