better analysis of greedy binary search tree on decomposable … · 2018-09-25 ·...

32
arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of G REEDY Binary Search Tree on Decomposable Sequences Navin Goyal Microsoft Research Bangalore, India [email protected] Manoj Gupta IIT Gandhinagar Gandhinagar, India [email protected] Abstract In their seminal paper [Sleator and Tarjan, J.ACM, 1985], the authors conjectured that the splay tree is dynamically optimal binary search tree (BST). In spite of decades of intensive research, the problem remains open. Perhaps a more basic question, which has also attracted much attention, is if there exists any dynamically optimal BST algorithm. One such candidate is GREEDY which is a simple and intuitive BST algorithm [Lucas, Rutgers Tech. Report, 1988; Munro, ESA, 2000; Demaine, Harmon, Iacono, Kane and Patrascu, SODA, 2009]. [Demaine et al., SODA, 2009] showed a novel connection between a geometric problem and the binary search tree problem related to the above conjecture. However, there has been little progress in solving this geometric problem too. Since dynamic optimality conjecture in its most general form remains elusive despite much effort, researchers have studied this problem on special sequences. Recently, [Chalermsook, Goswami, Kozma, Mehlhorn and Saranurak, FOCS, 2015] studied a type of sequences known as k-decomposable sequences in this context, where k parametrizes easiness of the sequence. Using tools from forbidden submatrix theory, they showed that GREEDY takes n2 Opk 2 q time on this sequence and explicitly raised the question of improving this bound. In this paper, we show that GREEDY takes Opn log kq time on k-decomposable sequences. In contrast to the previous approach, ours is based on first principles. One of the main ingredients of our result is a new construction of a lower bound certificate on the performance of any algorithm. This certifi- cate is constructed using the execution of GREEDY, and is more nuanced and possibly more flexible than the previous independent set certificate of Demaine et al. This result, which is applicable to all sequences, may be of independent interest and may lead to further progress in analyzing GREEDY on k-decomposable as well as general sequences. 1 Introduction Binary search trees (BSTs) are a well-studied and fundamental data access model. We store keys from the universe t1,..., nu in a binary search tree and given an sequence of keys p p 1 ,..., p n q we would like to access these keys (and possibly any associated data) using the tree. We would like to minimize the total cost of accessing the keys in this sequence, where the cost for one key search is the number of nodes touched for accessing that key. Various versions of this problem have been studied and some of them are very well understood, e.g., when the sequence of keys is generated according to some probability distribution with known access probabilities (and some additional restrictions) then optimal search trees are known (see the references in [14]). But what happens for general access sequences? The tree need not be static and can adapt to the access sequence. Such self-adjusting BST algorithms were considered by Sleator and Tarjan in 1

Upload: others

Post on 13-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

arX

iv:1

604.

0699

7v1

[cs.

DS

] 24

Apr

201

6

Better Analysis of GREEDY Binary Search Tree on DecomposableSequences

Navin GoyalMicrosoft Research

Bangalore, [email protected]

Manoj GuptaIIT Gandhinagar

Gandhinagar, [email protected]

Abstract

In their seminal paper [Sleator and Tarjan, J.ACM, 1985], the authors conjectured that thesplay treeis dynamically optimalbinary search tree (BST). In spite of decades of intensive research, the problemremains open. Perhaps a more basic question, which has also attracted much attention, is if there existsanydynamically optimal BST algorithm. One such candidate is GREEDY which is a simple and intuitiveBST algorithm [Lucas, Rutgers Tech. Report, 1988; Munro, ESA, 2000; Demaine, Harmon, Iacono,Kane and Patrascu, SODA, 2009]. [Demaine et al., SODA, 2009]showed a novel connection between ageometric problem and the binary search tree problem related to the above conjecture. However, therehas been little progress in solving this geometric problem too.

Since dynamic optimality conjecture in its most general form remains elusive despite much effort,researchers have studied this problem on special sequences. Recently, [Chalermsook, Goswami, Kozma,Mehlhorn and Saranurak, FOCS, 2015] studied a type of sequences known ask-decomposable sequencesin this context, wherek parametrizes easiness of the sequence. Using tools from forbidden submatrixtheory, they showed that GREEDY takesn2Opk2q time on this sequence and explicitly raised the questionof improving this bound.

In this paper, we show that GREEDY takesOpnlogkq time onk-decomposable sequences. In contrastto the previous approach, ours is based on first principles. One of the main ingredients of our resultis a new construction of a lower bound certificate on the performance of any algorithm. This certifi-cate is constructed using the execution of GREEDY, and is more nuanced and possibly more flexiblethan the previous independent set certificate of Demaine et al. This result, which is applicable to allsequences, may be of independent interest and may lead to further progress in analyzing GREEDY onk-decomposable as well as general sequences.

1 Introduction

Binary search trees (BSTs) are a well-studied and fundamental data access model. We store keys from theuniverset1, . . . ,nu in a binary search tree and given an sequence of keyspp1, . . . , pnq we would like to accessthese keys (and possibly any associated data) using the tree. We would like to minimize the total cost ofaccessing the keys in this sequence, where the cost for one key search is the number of nodes touched foraccessing that key. Various versions of this problem have been studied and some of them are very wellunderstood, e.g., when the sequence of keys is generated according to some probability distribution withknown access probabilities (and some additional restrictions) then optimal search trees are known (see thereferences in [14]). But what happens for general access sequences? The tree need not be static and canadapt to the access sequence. Such self-adjusting BST algorithms were considered by Sleator and Tarjan in

1

Page 2: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

their seminal paper [14], where they introduced splay trees. These trees change dynamically viarotationsafter processing each access request. Sleator and Tarjan showed that the amortized cost of the splay treeis Oplognq. They famously conjectured that splay trees have the much stronger and attractive property ofdynamic optimality: for any (sufficiently long) sequence the total cost of the splay tree algorithm is withina constant factor of the total cost of the optimumoffline binary search tree (i.e. the cost of the best BSTalgorithm that is given the access sequence in advance, and thus can decide how to change the tree based onthis knowledge). Splay trees, by contrast, areonline: the decision of how to change the trees must be basedon the current access request only and cannot depend on the future requests. The above conjecture is calledthedynamic optimality conjecture.

There has been much work on this conjecture, as well as on the more fundamental question of whetherthere existsanydynamically optimal BST algorithm (see [9] for a recent review). In the past decade progresswas made on this latter question and BST algorithms with better competitive ratio were discovered: Tangotrees [6] was the firstOplog lognq-competitive BST; Multi-Splay trees [15] and Zipper trees [1] also havethe same competitive ratio along with some additional properties. Analyses of these trees use lower boundsfor the total cost to process a request sequence. Wilber [16]gave two different lower bounds. Wilber’sfirst lower bound is used in [6, 15, 1] to obtainOplog lognq-competitive ratio for the respective trees. Thesetechniques based on Wilber’s bound have so far failed to giveoplog lognq-competitiveness. Researchers havealso proved conjectures implied by dynamic optimality; some of these can be interpreted as pertaining toeasysequences, e.g. for splay trees the amortized access cost islogarithmic in the distance in the key spaceto the previous key accessed (dynamic finger theorem) [3, 4],and amortized accesses cost is logarithmic inthe temporal distance to the previous access to the current key (working set theorem) [14].

It turns out that even the problem of designing offline optimal BST algorithm has seen limited progress.Lucas [10] and Munro [11] designed a simple offline greedy BSTalgorithm and conjectured its cost to beclose to the cost of optimum offline BST algorithm. Demaine etal. [6], using a novel geometric point of viewof the problem, showed that surprisingly the offline greedy algorithm can in fact be turned into an onlinealgorithm called GREEDY with only a constant factor loss in the competitive ratio (the ratio between thecost of the online algorithm to the cost of the offline optimumfor the worst case access sequence). Thus theconjecture about the the offline greedy would imply that GREEDY is dynamically optimal. The geometricview of the BST problem mentioned above leads to a completelydifferent looking clean problem aboutpoint sets in the plane. This raises the possibility of new lines of attack that might be harder to conceivein the BST view. Unfortunately, so far success has been limited even with the geometric view. The currentstate of the art by Fox [8] shows that GREEDY takesOpnlognq time for any arbitrary sequenceX .

Given this state of affairs, it has been suggested by severalresearchers to study the problem for easysequences (see [2] and references therein). Just as for splay trees, the question arises about the perfor-mance of GREEDY on easysequences; in particular, does the geometric approach help? In this context,Chalermsook et al. [2] initiated the study of GREEDY ondecomposable sequencesand brought to bear tech-niques fromforbidden submatrix theoryto this problem and some other problems. (Some of the tools fromforbidden submatrix theory have been used previously by Pettie [12, 13] to achieve better bounds for splaytrees on deque sequences and a new proof of the sequential access theorem for splay trees.) They showedthat GREEDY takesn2Opk2q time onk-decomposable sequences. Furthermore, they showed optimal offlinecost fork-decomposable sequences isΘpnlogkq. We quote from their paper:

“A question directly related to our work is to close the gap between OPT “ Opnlogkq andn2Opk2q byGREEDY on k-decomposable sequences (whenk “ ωp1q). Matching the optimum (if at all possible) likelyrequires novel techniques: splay is not even known to be linear on preorder sequences with preprocessing,and with forbidden-submatrix-arguments it seems impossible to obtain bounds beyondOpnkq.”

2

Page 3: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Though the authors mention that forbidden submatrix theorymay give anOpnkq bound, it is not clearhow to achieve this goal. We solve the above open problem by showing

Theorem 1.1. GREEDY takes Opnlogkq time on k-decomposable sequences(with preprocessing1).

Our approach is based on first principles and does not use tools from forbidden submatrix theory. Wecarefully analyze execution of GREEDY on k-decomposable sequences and discover some new structuralproperties of GREEDY. Our proof also uses the aforementioned general technique of constructing lowerbound certificates on the cost of the optimum and relating this lower bound to the cost of the algorithmbeing analyzed. One such lower bound,independent setlower bound was provided by Demaine et al. [6].It was, however, not clear how to relate it, or its close relatives, to the cost of GREEDY. Our lower boundcertificate is derived from the execution of GREEDY; it builds upon the ideas of independent set lower bound,but provides a more nuanced and possibly more flexible certificate. Our certificate construction works forgeneral sequences and not just fork-decomposable sequences. We are hopeful that our approach will lead tofurther progress in understanding the performance of GREEDY on k-decomposable and general sequences.

2 The Geometric Problem

Let rns “ t1,2, . . . ,nu denote the set of keys. Letpp1, p2, . . . , pnq denote a permutation onn keys, i.e.,pi ‰ p j

for i ‰ j. We can represent this permutation by a set ofn points in the plane: Keypi is represented by thepoint ppi , iq. For a pointp, let p.x denote itsx-coordinate and letp.y denote itsy-coordinate. We will denotesets of points obtained from permutations of keys in this wayby X . There is exactly one point ofX on theline x “ i, for i P rns; and there is exactly one point fromX on the liney “ i, for i P rns. Clearly, there is aone-to-one correspondence between the permutations and sets of points as defined above. For the most partwe will use the point set view.

In our paper, the positivex-axis (representing key space) moves from left to right and the positivey-axis(representing time) moves fromtop to bottom(this latter convention is different from most previous papersin this area). For a pair of pointsp andq not on the same horizontal or vertical line, the (closed) axis-alignedrectangle formed byp andq is denoted byqlp if q.y ă p.y andq.x ă p.x andplq if q.y ă p.y andp.x ă q.x.

key

time

1 2 3 4 5

1

2

3

4

5

Figure 1: The first picture shows the point setX={3,1,2,5,4}. In the remainder of the paper we do not showthe x-axis and the y-axis (along with the first row and column of the grid). The execution of GREEDY isshown from the second picture onwards.

1The preprocessing step is the same as in [6, 2], that is, insert all elements into asplit treebefore processing any requests.Preprocessing is independent of the access sequence. See [6, 2] for more details

3

Page 4: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Definition 2.1. A pair of pointspp,qq is said to be arborally satisfied with respect to a point set P,if (1)p and q lie on the same horizontal or vertical line or, (2)Dr P Pztp,qu such that r lies in the interior orboundary ofqlp (or plq).

We say that the rectangleqlp (or plq) is arborally satisfied if condition (2) holds, otherwise itis arbo-rally unsatisfied. Consider the following problem:Given a point setX , find a minimum cardinality pointsetY such that each pair of point in the setX Y Y is arborally satisfied.

If each pair of points inX Y Y is arborally satisfied then we say that the setX Y Y is an arborallysatisfied set otherwise it is not. In their remarkable paper,Demaine et al. [5] formulated the above problem.They showed a novel connection between thisgeometricproblem and binary search tree (BST) problem,and designed a simple algorithm, henceforth called GREEDY, for the above geometric problem. LetG bethe set of points added by this algorithm described as follows:

Sweep the point setX with a horizontal line by increasing the y-coordinates. Letthe point p beprocessed at time p.y. At time p.y, place the minimal number of points on line y“ p.y to satisfy the rectanglewith p as one endpoint and other endpoint inX Y G having their y-coordinate less than p.y. This minimalset of points Mp is uniquely defined: for any arborally unsatisfied rectangleformed with p in one corner,add a point at the other corner at y“ p.y in G . Please see Figure 1 for the execution ofGREEDY.One can show that theX Y G is an arborally satisfied set; see [5] for details.

3 Overview

We give a brief overview of our techniques in this section. Our goal is to prove|G | “ Opnlogkq whichimmediately implies Theorem 1.1. The starting point of our approach was an attempt to construct an in-dependent set of rectangles of original points certifying alower bound on the number of points that mustbe marked. We attempt to construct such a certificate by analyzing the execution of GREEDY. Our finalcertificate will not be an independent set however.

In Sec. 6, for each point inG we associate a tuple of points (which we also think of as a rectangle) fromX using a map called PAIRp¨q. At a high level, this can be thought of looking for a reason for why thepoint inG was marked by GREEDY. We partition PAIRpG q into two sets called (pronounced zig) and(pronounced zag). The visual notationand depicts how PAIRppq is located w.r.t.p P G . In Sections 7we show that| | “ Opnkq and in Sec. 8 we improve it to| | “ Opnlogkq; this has a relatively short proofand uses properties of andk-decomposable sequences.

We then show| | “ Opnkq. The proof of this is in two parts. First we construct the partition “GOODp q Y BADp q (Sec. 9.1). The set GOODp q consists of rectangles from that do not haveany original points in their interior (thus this set can presumably be quite different from an indepen-dent set). In Sections 9.2 and 9.3, we analyze GOODp q and show that it provides a lower bound cer-tificate for |OPTpX q| similar to the independent set certificate of Demaine et al. [5]: |GOODp q|{2 `|X | ď |OPTpX q Y X |. We remark that this result holds for allX and not just fork-decomposable se-quences, and hence may be of use in future work on the general problem. Chalermsook et al. have proven|X Y OPTpX q| ď Opnlogkq for k-decomposable sequences, which implies|GOODp q| “ Opnlogkq. Fi-nally, in Sec. 10 we show|BADp q| “ Opnkq and then in Sec. 11 improve it to|BADp q| “ Opnlogkq. Forthis, we use some structural properties of BADp q, , andk-decomposable sequences. The above resultstogether imply our desired bound|G | “ |PAIRpG q| “ Opnlogkq (Sec. 12).

4

Page 5: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

4 Basic Properties of GREEDY

In all our diagrams, a point inX is denoted by a black circle and a point inG is denoted by a blue circle. Apoint in pX YG q is denoted by a gray circle. A point inX will be called anoriginal point and a point inGwill be called amarkedpoint. When we refer to a point without specifying whether its marked or original,then it is a point frompX Y G q. We use following notation:

1. p is above q(or q is belowp) orpÙq

if p.y ă q.y andp.x “ q.x.

2. p is to theleft of q (or q is to the right ofp) or pØq if p.x ă q.x andp.y “ q.y.

3. q is to thesouth-eastof p (or p is to the north-west ofq) or pŒÔq if p.y ă q.y andp.x ă q.x.

4. q is to thenorth-eastof p (or p is to the south-west ofq) or pÖÕq if p.y ą q.y andp.x ă q.x.

5. pplqq˝ denotes the interior ofplq.

6. While processingp P X , GREEDY may put marked points on the liney “ p.y (there is no otheroriginal point on this line asX comes from a permutation sequence). For any such marked point qwe define its original point OPpqq to bep. We also set OPppq :“ p.

7. Forq P X Y G , define UPpqq :“ q if q P X , and UPpqq :“ p if q P G , wherep P X is the uniqueoriginal point aboveq (see the discussion before Observation 4.1 below).

q

p

qlp

p

q

plq

p

q

q below p orp aboveq or

pÙq

p q

q right of p orp left of q or

pØq

p

q

q south-east ofp orp north-west ofq or

pŒÔq

p

q

q north-east ofp orp south-west ofq or

pÖÕq

Figure 2: Basic Notations

We now show some basic properties and lemmas related to the execution of GREEDY.While preprocessingp, GREEDY adds a marked point at the bottom right (bottom left) corner of rect-

angleplq pqlpq only if it is an arborally unsatisfied rectangle. This implies that whenever GREEDY putsa marked point there exists another point (marked or original) above it. Using this property, we claim thatthe top point on the linex “ i (1 ď i ď n) must be an original point, i.e., a point fromX . The followingobservation follows:

Observation 4.1. For any point pP X , GREEDY does not put any marked point above p.

We now prove some lemmas regarding the execution of GREEDY:

Lemma 4.2. Consider a rectangleplq where p,q P pX YG q. Then there exists a point rP pX YG qztp,qu

such that (1) rP plq, and (2)rÙp

or pØ r.

5

Page 6: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Remark 4.3. This lemma is a special case of Observation 2.1 in [5]. The lemma is true for any point setYfor whichpX Y Y q is an arborally satisfied set.

p

q

(i)

p

q

s

(ii)

Figure 3: (1) Lemma 4.2 states that there exists a point inpX Y G qztp,qu on the thick lines adjacent top.(2) Illustration of the case argued in the proof wheres is the closest point top in plq.

Proof. SincepX Y G q is an arborally satisfied set, there exists another point from pX Y G qztp,qu in plq.

Let s be the closest point top in plq (closest in Euclidean distance) (See Figure 3(ii)). IfsÙp

or pØ s, then

we are done. Else, look at the rectanglepls. Sinces is the closest point top, pls does not contain any otherpoint frompX Y G qztp,su. This implies thatpls is not arborally satisfied. This leads to a contradiction aspX Y G q is an arborally satisfied set.

Similarly, we can also prove a symmetric version of the abovelemma:

Lemma 4.4. Consider a rectangleqlp where p,q P pX YG q. Then there exists a point rP pX YG qztp,qu

such that (1) rP qlp, and (2)rÙp

or r Ø p.

We now move on to another important property of GREEDY.

Definition 4.5. A point r hidesq from p where p,q, r P X YG andqŒÔp, if either (1) qØ r and r P qlp, or(2) r P pqlpq˝.

For p,q such thatpÖÕq the definition is symmetric.

In other words,r hidesq from p, if it’s different from p,q and lies in the union of the “top-line” and theinterior of qlp (or plq).

q

p

r

r

p

q

Figure 4:r hidesq from p P X

Lemma 4.6. Let r hide q from p where p,q, r P X Y G andqŒÔp. Assume that there exists a point s belowq such thatsÖÕ

r . Moreover, let s be the first point below q with this property.ThenOPpsqÖÕr .

6

Page 7: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

p

q

r

OPpsqs

Figure 5: Illustration of bad case in the proof of Lemma 4.6 when rŒÔOPpsq

Proof. Assume thatr lies in pqlpq˝ (the argument below applies even ifq Ø r). By Observation 4.1,GREEDY does not put any marked point above any original point. So OPpsq cannot lie belowr. Assumethen for contradiction thatrŒÔOPpsq (See Figure 5). Since GREEDY putss while processing OPpsq, it musthave encountered an unsatisfied rectangletlOPpsq such thatt is the first point aboves. We claim thatt cannotlie to the north-west or left ofr as thentlOPpsq is arborally satisfied byr. This implies thattÖÕ

r . But thentis the first point belowq such thattÖÕ

r , which contradicts the assumption of the lemma. So our assumptionthat rŒÔOPpsq must be false.

We also state the symmetric version of the above lemma:

Lemma 4.7. Let r hide q from p where p,q, r P X Y G and pÖÕq. Assume that there exists a point s belowq such thatrŒÔs. Moreover, let s be the first point below q with this property.ThenrŒÔOPpsq.

5 Decomposable Sequences

Given a permutation of the keyspp1, p2, . . . , pnq, represented by point setX in the plane as described above,we call a setri, js :“ ti, i ` 1, . . . , ju a block ofX if tpi , pi`1, . . . , p ju “ tc,c` 1, . . . ,du for somec,d P rns.In words, a block represents a contiguous time interval thatis mapped to a contiguous key interval by thepermutation. We say thatX is decomposable intok-blocks if there exist disjoint blocksra1,b1s, . . . , rak,bkssuch thatYℓraℓ,bℓs XN “ rns.

We can recursively decomposeX till singleton blocks are obtained. This recursive decompositioncan be naturally represented as a rooted tree where each noderepresents a block. At the root of the treeis the blockX “ pp1, p2, . . . , pnq. Let us call this tree adecomposition treeof X . We say thatX isk-decomposableif there exists a decomposition tree TREEDECOMPOSITIONpX q such that the number ofchildren of each internal node in this tree is at mostk.

Figure 6: The point setX ={3,1,2,5,4} and its decomposition

7

Page 8: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Let PARENTpBq denote the parent ofB in TREEDECOMPOSITIONpX q, and let SIBLING pBq denote theset of children of PARENTpBq exceptB. Let TOPpBq :“ a if a P B anda.y ď p.y for all p P B. In words,TOPpBq denotes the first (in time) key in blockB. Note that a keya can be the first key of multiple blocks(at different levels). In Fig. 6 , TOP(3,1,2,5,4q “ TOPp3,1,2q “ TOPp3q “ 3. Let TOPBLOCKpaq be theblock B that is closest to the root and satisfies TOPpBq “ a. In Fig. 6, TOPBLOCKp3q “ p3,1,2,5,4q.

In the rest of this paper we deal withk-decomposable permutationsX , or more precisely, with pointsetsX representing such permutations. We fix some TREEDECOMPOSITIONpX q such that every internalnode has at mostk children. Henceforth when we talk about blocks, it will be with respect to this fixedTREEDECOMPOSITIONpX q.

For a blockB, let BOXpBq :“ tr | Dp,q P B s.t. r.x “ p.x and r.y “ q.yu. In words, BOXpBq containsthose pointsr in the plane such that both the horizontal and vertical linespassing throughr have at least onepoint fromB.

Define UPPERBOXpBq :“ tr | r.y ă TOPpBq.y andDp P B such thatp.x “ r.xu. In words, UPPERBOXpBqis the set of points in the plane that come before all points inB in time, but share the key with some point inB. Please see the Figure 7.

BOXpBq

UPPERBOXpBq

Figure 7: BOXpBq and UPPERBOXpBq contains the set of all the points in the two region shown in the figure.

By definition, a block represents a contiguous key interval.Hence, there exists no pointq P X inUPPERBOXpBq. Also by Observation 4.1, for any pointq P X , GREEDY does not put any point aboveq,so we have

Lemma 5.1. There is no point frompX Y G q in UPPERBOXpBq.

Remark 5.2. For brevity, our definitions and theorem and lemma statements do not explicitly quantifyover X , but there is always an underlying “For a permutation sequence X ”. In Sections 6 and 9, thisquantification is over allX of size n; and in Sections 7, 10, and 12, it is over all k-decomposableX of sizen.

6 Pairs

We define a map fromG to pairs of points inX .

Definition 6.1. Let pP G . The mapPAIR : G Ñ X 2 is defined as follows: Let q be a the first point abovep, thenPAIRppq :“ pOPppq,OPpqqq.

8

Page 9: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Note that if PAIRppq “ pOPppq,OPpqqq, then OPppq.y ą OPpqq.y.Our goal is to upper bound|G |. We do this by connecting|G | to the set of allpairs PAIRpG q :“

tPAIRppq | p P G u, partitioning the set PAIRpG q into two sets and , and then bounding| | and| |from above.

Definition 6.2 ( ). Subset of PAIRpG q, pronouncedzig, is defined as follows. For pP G , let q be the firstpoint above p andPAIRppq “ pOPppq,OPpqqq. We say thatPAIRppq P if (1) OPppqØ p andOPpqqŒÔOPppq,

or its symmetric version (2) pØ OPppq andOPppqÖÕOPpqq.

OPppq p

qOPpqq

(i)

OPppqp

q OPpqq

(ii)

Figure 8: PAIRppq P . In Figure (i) PAIRppq P Rp q and in Figure (ii) PAIRppq P Lp q

Note that the symbol mimics Fig. 8(i). Let Rp q “ tPAIRppq | PAIRppq P and OPppq Ø pu.Similarly, Lp q “ tPAIRppq | PAIRppq P andpØ OPppqu.

Definition 6.3 ( ). Subset of PAIRpG q, pronouncedzag, is defined as follows. For pP G , let q be the

first point above p andPAIRppq “ pOPppq,OPpqqq. We say thatPAIRppq P if (1) OPppqØ p and (OPpqq

Ùp

or

pÖÕOPpqq), or its symmetric version (2) pØ OPppq and (OPpqq

Ùp

or OPpqqŒÔp).

OPppqp

q

(i)

OPppqp

q OPpqq

(ii)

OPppqp

q

(iii)

OPppqp

qOPpqq

(iv)

Figure 9: PAIRppq P .

Note that the symbol mimics Fig. 9(ii).The following observation follows from the definition of :

Observation 6.4. If PAIRppq “ pOPppq,OPpqqq andPAIRppq P , then p lies to the left(right) of OPppq inOPpqqlOPppqpOPppql

OPpqqq.

Henceforth, we will abuse notation and use PAIRpp1q (with PAIRpp1q P ) as an ordered pairpp,qq aswell asqlp (or plq). This makes sense as there is a one-to-one correspondence between the tuples fromX and rectangles with endpoints inX asX comes from a permutation sequence.

We now show some properties of PAIRp¨q. Let RG :“ tp P G | OPppqØ pu; define LG similarly.

9

Page 10: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Lemma 6.5. Let p1, p2 P RG . If p1 ‰ p2 thenPAIRpp1q ‰ PAIRpp2q.

Proof. Assume for contradiction that PAIRpp1q “ PAIRpp2q. Then p1 and p2 are on the same horizontalline. Assume w.l.o.g. thatp1 Ø p2 and OPpp1q “ OPpp2q “ p. Assume that while processingp P X ,GREEDY marks pointp1 and p2 due to unsatisfied rectangleplq1 and plq2. This implies thatq1ŒÔq2

, asotherwiseplq2 is satisfied byq1 (since p1 Ø p2, q1 Ø q2). Also note that PAIRpp1q “ pp,OPpq1qq andPAIRpp2q “ pp,OPpq2qq. Sinceq1.y ‰ q2.y, OPpq1q ‰ OPpq2q. So PAIRpp1q ‰ PAIRpp2q, contradicting ourassumption.

This implies that|RG | ď |PAIRpG q|. By symmetry, we also have|LG | ď |PAIRpG q|. This gives

Corollary 6.6. |G | “ |LG | ` |RG | ď 2|PAIRpG q|.

We now show that for anyp P G , PAIRppq is either in or in (thus the third possibility of pairs inFig. 10, or its symmetric version, does not arise):

Lemma 6.7. For p P G , eitherPAIRppq P or PAIRppq P .

OPppqp

qOPpqq

Figure 10: Illustration of the bad case which arises in case (3) of the proof of Lemma 6.7

Proof. W.l.o.g., let OPppqØ p and letq be the first point abovep. So, PAIRppq “ pOPppq,OPpqqq. We havePAIRppq R and PAIRppq R only if OPppqÖÕ

OPpqq and OPpqqŒÔp (see Fig. 10). So, OPpqq hidesq from

OPppq (as OPpqq Ø q in OPppqlq) and p is the first point belowq such thatOPpqqŒÔp (this follows from the

definition of PAIRppq where we said thatq is the first point abovep). Then by Lemma 4.7,OPpqqŒÔOPppq.

This contradicts our assumption thatOPppqÖÕOPpqq. So our assumption on the position of OPpqq must befalse.

This shows that PAIRpG q is partitioned by and :

Corollary 6.8. | | ` | | “ |PAIRpG q|.

We now show some properties of PAIRp¨q when the sequenceX is decomposable. The followingproperty is independent of whether PAIRp¨q is in or .

Lemma 6.9. Let p1 P G and p,q P X andPAIRpp1q “ pp,qq. If p P B but p‰ TOPpBq, then qP B.

pr

p1

q1

q

Figure 11: Lemma 6.9 shows that the scenario depicted in the figure cannot occur, i.e.,p ‰ TOPpBq,PAIRpp1q “ pp,qq andq R B

10

Page 11: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Proof. Assume for contradiction that PAIRpp1q “ pp,qq such thatq R B (see Fig. 11 for an illustration).W.l.o.g., letpØ p1. Let plq1 be the unsatisfied rectangle, that made GREEDY markp1 while processingp P X . Note that OPpq1q “ q can lie to the right or left ofq1 or it can be same asq1 (though in Fig. 11 itlies to the right ofq1).

Let TOPpBq “ r. Note thatr cannot lie abovep (as points fromX come from a permutation sequence)or to the north-east ofp as thenplq1 is already arborally satisfied due tor. SorŒÔp as shown in Fig. 11. ByLemma 5.1, no point lies in UPPERBOXpBq. This implies that GREEDY should find evenrlq1 unsatisfied.In that case, GREEDY should put another marked point, sayr 1 to the right ofr below q1. However, thiscontradicts our deduction that while processingp, GREEDY found plq1 unsatisfied (because thenplq1 isalready satisfied byr 1). So we arrive at a contradiction and our assumption thatq R B must be false.

In words, the above lemma says that for a blockB all the points marked by GREEDY for p P B have pairslocal to B if T OPpBq ‰ p. However, if TOPpBq “ p, the above claim does not hold. In Section 5, we sawthat there can be many blocks for whichp “ TOPp¨q. Let TOPBLOCKppq “ B. For suchp,B, we now showthat all points marked by GREEDY will have non-localpairs.

Lemma 6.10. Let p,q P X , p1 P G and TOPBLOCKppq “ B. If PAIRpp1q “ pp,qq, then qP B1 whereB1 P SIBLING pBq.

Proof. By definition, if PAIRpp1q “ pp,qq then q.y ă p.y. Since p is the first original point inB withthe leasty-coordinate,q R B. Since TOPBLOCKppq “ B, p ‰ TOPpPARENTpBqq. Hence, by Lemma 6.9,q P PARENTpBq. This implies thatq P B1 such thatB1 P SIBLING pBq.

7 Upper bounding | |

In this section, we prove

Theorem 7.1. | | ď 2npk´ 1q.

Consider a pointp P X . In Section 6, we proved Lemma 6.10 which says that if PAIRpp1q “ pp,q1q andTOPBLOCKppq “ B, thenq1 P B1 whereB1 P SIBLING pBq. We will now prove a certain strengthening ofthis lemma. Let Rp qp “ tPAIRppiq P Rp q | PAIRppiq “ pp,qiq for someqi P X u. In the next section, weprove Lemma 7.3 which essentially says that if PAIRpp1q, . . . ,PAIRppℓq P Rp qp with PAIRppiq “ pp,qiq,then blocksBi containingqi are pairwise distinct. By thek-decomposability ofX , there are at mostk´ 1siblings ofB, hence we haveℓ ď k´1, which gives|Rp qp| ď k´1. The same reasoning holds for Lp qp.And this immediately gives the bound on| |.

The following lemma will be used in proving Lemma 7.3.

Lemma 7.2. For p P X , let p1, p2 P G be two points such that pØ p1 Ø p2 and PAIRpp1q,PAIRpp2q PRp qp. Let plr1 and plr2 be the two unsatisfied rectangles that leadGREEDY to mark p1 and p2, re-

spectively, while processing p (thusr1ŒÔr2). Then there is a point sP X such thatr1ŒÔs and (

sÙr2

or sŒÔr2or

r2ÖÕs).

11

Page 12: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

p p1 p2

r2OPpr2q

r1OPpr1q

(i)

p p1 p2

r2OPpr2q

tr1OPpr1q

(ii)

Figure 12: (i) The setting of Lemma 7.2: (1) PAIRpp1q,PAIRpp2q P Rp qp and (2)plr1 and plr2 are twounsatisfied rectangle encountered while processingp. (ii) Illustration of the case (4) in the proof whenr1ÖÕUPpr2q

.

Proof. Note thatr1, r2 R X since PAIRpp1q,PAIRpp2q P . We consider four cases depending on the posi-tion of UPpr2q:

1. UPpr2q “ r2.

Since PAIRpp2q P , r2 R X . So UPpr2q ‰ r2.

2. r1ŒÔUPpr2q.

In this case we can sets :“ UPpr2q. So, we have found an original pointssuch that (r1ŒÔs andsÙr2

).

3. r1 Ø UPpr2q.

Since PAIRpp1q P and r1 is the first point abovep1, hence OPpr1q Ø r1. So UPpr2q.y ‰ r1.y; inparticularr1 Ø UPpr2q cannot happen.

4. r1ÖÕUPpr2q.

Let t be the first point abover2 such thatr1ÖÕt (see Fig. 12(ii)). Since we assumed thatr1ÖÕUPpr2q,UPpr2q is one such candidate. This implies thatr1 hidest from p(as r1 P ppltq˝). Let t1 be thefirst point belowt such thatr1ŒÔt1 . Such a point exists asr2 is one such candidate. By Lemma 4.7,

r1ŒÔOPpt1q. In that case,t1 ‰ r2 sinceOPpr2qŒÔp (since PAIRpp2q P Rp q). SotÙt1

andt1

Ùr2

. This implies

that eitherOPpt1qŒÔr2or r2ÖÕOPpt1q. So we have found an original points :“ OPpt1q such thatr1ŒÔs and

(sŒÔr2or r2ÖÕs).

The following lemma will allow us to use thek-decomposability ofX to get at upper bound on| |.

Lemma 7.3. Let pP X andTOPBLOCKppq “ B. Let p1 Ø p2 Ø ¨¨¨ Ø pℓ be such thatPAIRppiq P Rp qp

for all 1 ď i ď ℓ. Assume thatGREEDY marks points p1 Ø p2 Ø ¨¨¨ Ø pℓ due to unsatisfied rectangles

plr1,p lr2, . . . ,plrℓ , respectively. By Lemma 6.10,OPpr iq P Bi for Bi P SIBLING pBq. Then Bi ‰ B j for i ‰ j.

12

Page 13: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Proof. Considerpi Ø p j . One can check thatr i .y ă r j .y. By Lemma 7.2, there exists an original points

such thatr i ŒÔs and (sÙr j

or sŒÔr jor r j ÖÕ

s).

SinceOPpr i qŒÔp andOPpr j qŒÔp (as PAIRppiq,PAIRpp jq P ), this implies thatOPpr iqŒÔs andOPpr j qÖÕs. Also,

we havep P B with OPpr iq.x ă p.x ă s.x andp R Bi (sinceBi is a siblings ofB). By the definition of a block,all the points inBi should be contiguous on thex-axis. So,sR Bi.

Thus we havesR Bi and OPpr iq.y ă s.y ă OPpr jq.y. Again, by the definition of a block, all the points inBi should have contiguous time interval. So, OPpr jq does not lie inBi andBi ‰ B j .

Since there are at mostk´1 sibling ofB, by Lemma 7.3,|Rp qp| ď k´1. So,|Rp q| “ř

pPX|Rp qp| ď

npk´ 1q. Similarly, we can show that|Lp q| ď npk´ 1q. Since| | “ |Rp q| ` |Lp q|, we have provedTheorem 7.1.

8 Improving the bound on | |

In this section we prove:

Theorem 8.1. | | ď 14nlogk.

To improve the the bound on| |, we need to show some more properties of a block in TREEDECOMPOSITIONpX q.

8.1 Properties of a Block

Let MAX TIMEpBq :“ argmaxzPBtz.yu. That is, MAX TIMEpBq is an original point inB that has the max-imum y-coordinate. We can similarly define MINTIMEpBq. Note that TOPpBq “ M INTIMEpBq. LetMAX KEYpBq :“ argmaxzPBtz.xu and MINKEYpBq :“ argminzPBtz.xu.

M INKEY(B)

MAX KEY(B)

MAX TIME(B)

Block B

Figure 13: Pictorial representation of MAX TIMEpBq,MAX KEYpBq and MINKEYpBq

Definition 8.2. (Left and Right points of block B) LetTOPBLOCKppq “ B. DefineLEFTpBq to be the firstpoint to the left of p marked byGREEDY while processing p. DefineRIGHTpBq in a symmetric fashion.

Note that LEFTpBq, if it exists, satisfies LEFTpBq.x ă M INKEYpBq.x since by Observation 4.1, GREEDY

cannot put any point above any other original point inB. Similarly RIGHTpBq.x ą MAX KEYpBq.x. Thisimplies that GREEDY does not put any point in BOXpBq while processing TOPpBq.

13

Page 14: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Observation 8.3. GREEDY does not put any marked points inBOXpBq while processingTOPpBq.

Lemma 8.4. Let TOPBLOCKprq “ B1 andPARENTpB1q “ B. So r‰ TOPpBq. While processing r,GREEDY

can put marked point (1)BelowLEFTpBq or/and (2)BelowRIGHTpBq or/and (3) InBOXpBq.

LEFT(B) RIGHT(B)

r

Block B

Figure 14: LEFTpBq and RIGHTpBq of a blockB. Note that GREEDY cannot put any point in BOXpBq whileprocessing TOPpBq. Lemma 8.4 shows that while processing any pointr ‰ TOPpBq, GREEDY can put pointsonly in the rectangles shown in the figure.

Proof. Assume that GREEDY puts a pointr1 while processingr. Consider the following two cases forcontradiction:

1. r1.x ă LEFTpBq.x

UPpr1q cannot satisfy the propertyUPpr1qÖÕLEFTpBq as then UPpr1q.x ă M INKEYpBq.x. By definition of

decomposability, all the original points with time betweenrTOPpBq.y,MAX TIMEpBq.ys should havetheir key valueě M INKEYpBq.x. However, UPpr1q.x ă LEFTpBq.x ă M INKEYpBq.x.

So assume thatUPpr1qŒÔLEFTpBq. Let r 1 be the first point abover1 with the property that (r1ŒÔLEFTpBq

or r 1 Ø LEFTpBq). Such a point exists as UPpr1q is one such candidate. This implies that LEFTpBqhidesr 1 from r as LEFTpBq lies in r 1

lr . Let r2 be the first point belowr 1. Such a point exists asr1

itself is one such candidate. Also, note that due to the wayr 1 is defined,r2ÖÕLEFTpBq. By Lemma 4.6,

UPpr2qÖÕLEFTpBq. This again leads to contradiction as UPpr2q.y is betweenrTOPpBq.y,MAX TIMEpBq.ys

and its key value UPpr2q.x ă LEFTpBq.x ă M INKEYpBq.x.

2. LEFTpBq.x ă r1.x ă M INKEYpBq.x

Let r 1 be a point abover1 with leasty co-ordinate and the property thatLEFTpBqŒÔr 1. If no such pointexists then definer 1 :“ r1. Let GREEDY mark pointr 1 while processing OPpr 1q P Bdue to an unsatisfiedrectangler2

lOPpr 1q. By definition of LEFTpBq, r2 cannot lie to the right of LEFTpBq. So,LEFTpBqÖÕr2

.This implies that there exists a non-top element ofB, OPpr 1q with PAIRpr 1q “ pOPpr 1q,OPpr2qq andOPpr2q R B. This contradict Lemma 6.9

The case whenr1.x ą RIGHTpBq.x and MAX KEYpBq.x ą r1.x ą RIGHTpBq.x are symmetric to above twocases respectively.

We now need to calculate the number of points added by GREEDY in BOXpBq while processingr. Tothis end, we define some notations.

Definition 8.5. LetREGpBq :“ tpa,bq|UPpaq P B and bą MAX TIMEpBq.y and bă MAX TIMEpPARENTpBqq.yu

14

Page 15: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

In words, REGpBq denote the region below BOXpBq till the last original point in PARENTpBq. If B isthe set of blocks, then define REGpBq :“ YBPBREGpBq.

Lemma 8.6. Let TOPBLOCKprq “ B1 and PARENTpB1q “ B. Then while processing r,GREEDY canput marked point only (1)belowLEFTpBq and/or (2)BelowRIGHTpBq and/or (3) inREGpB2q where B2 PSIBLING pB1q.

Proof. By Lemma 8.4, while processingr, GREEDY can put marked point in BOXpBq, below LEFTpBq andbelow RIGHTpBqq. However by observation 8.3, GREEDY cannot put any marked point in BOXpB1q whileprocessingr.

Let B2 P SIBLING pB1q. By Lemma 5.1, GREEDY cannot put any marked point in UPPERBOXpB2qwhile processingr. Also, GREEDY cannot put any marked point in BOXpB2q while processingr. Thisimplies that while processingr, all the points marked by GREEDY in BOXpBq are in REGpB2q whereB2 PSIBLING pB1q.

Block B

Block PARENTpBq

REGpBq

Figure 15:B has four siblings. REGpBq is the region shaded below BOXpBq

We will now describe properties of the points that are added in REGpBq.

Definition 8.7. A point p is a key-new point inREGpBq if there is no point qP REGpBq such that (1)p.x “ q.xand q.y ă p.y, else it is called key-old.

In other words, if no point exists in REGpBq with the same key asp.x before timep.y, thenp is key-new.

Definition 8.8. Let pP X be an original point with least p.y and the property (1) p.y ą MAX TIMEpBq.yand (2)p.x ă LEFTpBq or LEFTpBq ă p.x ă M INKEYpBq. Then we say that p is the left-relative of B orp P LEFT-RELpBq. Similarly defineRIGHT-RELpBq in a symmetric fashion.

In words, LEFT-RELpBq contains the first original point in the sequenceX that comes after all thepoints inB and has key strictly than LEFTpBq.x or in the rangerLEFTpBq.x,M INKEYpBq.xs. Note that thereare at most 2 original points in the set LEFT-RELpBq.

15

Page 16: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Lemma 8.9. Let q be an original point that satisfies q.x ă LEFTpBq and q.y ą p.y where pP LEFT-RELpBqand p.x ă LEFTpBq.x. ThenGREEDY cannot mark any key-new point inREGpBq while processing q.

LEFT(B)

p

q

Block B

Figure 16:p P LEFT-RELpBq. Lemma 8.9 states that while processing any other pointq that arrives afterpand is to the left of LEFTpBq, GREEDY cannot mark any key-new point in REGpBq.

Proof. Assume for contradiction that GREEDY put a key-new points while processingq in REGpBq dueto unsatisfied rectangleqls1

. This implies that PAIRpsq “ pq,OPps1qq. Since we have assumed thats is akey-new points1 cannot lie in REGpBq, so it lies above REGpBq. By Lemma 5.1, no point can lie aboveBOXpBq. Sos1 lies in BOXpBq. We first note that OPps1q ‰ TOPpBq as thenqls1

is satisfied by LEFTpBq.Let us assume that OPps1q ‰ TOPpBq. Sinceqls1

was an unsatisfied rectangle, there exists no point init when GREEDY processesq. Consider the pointp P LEFT-RELpBq with p.x ă LEFTpBq.x. By definition,p.yă q.y. Consider the rectanglepls1

. We claim thatpls1is an unsatisfied rectangle as (1) there are no point

in qls1when GREEDY processesp and (2) By Lemma 8.4, for any pointr ‰ TOPpBq, GREEDY does not

put any point to the left of LEFTpBq and (3) There is no pointr with the property thatr.y ą MAX TIMEpBq.yand pÖÕr andrŒÔq. Indeed, if such a point exists, then definer be a point which satisfy the above property

and has the leasty-coordinate. IfOPprqŒÔq, then OPprq P LEFT-RELpbq and notp which contradicts our

assumption. OPprq cannot lie inqls1and in REGpBq. SoMAX T IMEpBqŒÔOPprq and GREEDY markes the point

r while processing OPprq due to unsatisfied rectangle, sayr 1lOPprq. Note thatr 1ÖÕMAX T IMEpBq, as otherwise

r 1lOPprq is satisfied by MAX TIMEpBq. However, this implies thatr 1 is the point with leasty-coordinate and

the property thatr 1.y ą MAX TIMEpBq.y pÖÕr 1andr 1

ŒÔq. This contradicts the definition ofr.

This implies thatpls1is unsatisfied when GREEDY processesp. So GREEDY should put a point, say

s2 belows1. However, this implies thats2 is a key-new point and nots contradicting the assumption of thelemma.

Similar to the above lemma one can also prove the following lemma.

Lemma 8.10. Let q be an original point that satisfiesLEFTpBq ă q.x ă M INKEYpBq and q.y ą p.y wherep P LEFT-RELpBq and LEFTpBq ă p.x ă M INKEYpBq. ThenGREEDY cannot mark any key-new point inREGpBq while processing q.

Similarly one can prove the symmetric versions of the above two lemmas. We now describe the impli-cations of the above two lemmas. The lemma suggest that at most four points ( 2 in LEFT-RELpBq and 2 inRIGHT-RELpBq) can be responsible for adding key-new points in REGpBq.

16

Page 17: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Corollary 8.11. GREEDY can mark key-new points inREGpBq while processing points inLEFT-RELpBq YRIGHT-RELpBq only.

We define some more properties of the points added to REGpBq.

Definition 8.12. A key b is live inREGpBq at time t if there is a point pP REGpBq such that p.x “ b andp.y ă t and there exists no point p1 P REGpBq such that (1) p1.x ă p.x or p1.x ą p.x and (2) tą p1.y ě p.y.We say that key b is not-live inREGpBq if such a point p1 exists. A point p is said to be key-live at time t inREGpBq if key p.x is live inREGpBq at time t, other-wise it is key-not-live.

Block B

REGpBq

p1

p2

p3

p4

p5

Time t

Figure 17: Keyp1.x, p2.x and p5.x are live at timet and Keyp3.x and p4.x are not live. Similarly pointp1, p2 andp5 are key-live and pointp3 andp4 are key-not-live.

By Lemma 8.9, only points in LEFT-RELpBq Y RIGHT-RELpBq can add key-new points to REGpBq.Let p P LEFT-RELpBq such that GREEDY adds a key-new pointq in REGpBq while processingp due tounsatisfied rectangleplq1

. Sinceq is key-new in REGpBq, q1 must lie in BOXpBq. This implies that OPpq1q PB. Sincep is a left-relative ofB, it lies to the left of MINKEYpBq. This implies that PAIRpqq P . So, wehave proved the following lemma:

Lemma 8.13. All key-new points added by original points inLEFT-RELpBq in REGpBq havePAIRp¨q P .

One can also prove the symmetric version of the above lemma ina similar way.

Lemma 8.14. All key-new points added by original points inRIGHT-RELpBq in REGpBq havePAIRp¨q P .

8.2 Improving the bound on | | to Opnlogkq

Let B be any block of TREEDECOMPOSITIONpX q that has at mostℓpℓ ă kq children. Let these chil-dren beB1,B2, . . . ,Bℓ where MAX KEYpBiq.x ă M INKEYpBi`1q.x, or in words, each key of the block

17

Page 18: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Bi is smaller than each key of blockBi`1. We recursively partitionℓ blocks into two half till a sin-gleton block is obtained. This partition can be representedas a tree called the PARTITIONpBq. At theroot of PARTITIONpBq is the region REGpB1,B2, . . . ,Bℓq. We then divide this region into two half2 :REGpB1,B2, . . . ,Bℓ{2q and REGpBℓ{2`1,Bℓ{2`2, . . . ,Bℓq. In Lemma 8.15, we will show that the total numberof points (with PAIRp¨q P ) added by GREEDY in REGpBℓ{2`1,Bℓ{2`2, . . . ,Bℓq while processing points intTOPpB1q,TOPpB2q, . . . ,TOPpBℓ{2quzTOPpBq is Opℓq. Similarly, the total number of points (with PAIRp¨q P

) added by GREEDY in REGpB1,B2, . . . ,Bℓq while processing original points intTOPpBℓ{2`1q,TOPpBℓ{2`2q, . . . ,TOPpBℓquzTOPpBq is Opℓq. Note that the top element of the blockB is ex-empted as it cannot add any point in the REGpB1,B2, . . . ,Bℓq. In general we have to show the followinglemma:

Lemma 8.15.Let Bi,Bi`1, . . . ,Bi`2m´1 be the set of consecutive children blocks of B inTREEDECOMPOSITIONpX q.The number of points added bytTOPpBiq,TOPpBi`1q, . . . ,TOPpBi`m´1quzTOPpBq in REGpBi`m,Bi`m`1, . . . ,Bi`2m´1qwith PAIRp¨q P is ď 12m.

By symmetry one can also show that the number of points added bytTOPpBi`mq,TOPpBi`m`1q, . . . ,TOPpBi`2m´1quzTOPpBq in REGpBi,Bi`1, . . . ,Bi`m´1q with PAIRp¨q P isď 12m.

LetYpBq :“ TpB1,B2, . . . ,Bℓq be the total number of points (with PAIRp¨q P ) added by GREEDY whileprocessing points intTOPpB1q,TOPpB2q, . . . ,TOPpBℓquzTOPpBq in REGpB1,B2, . . . ,Bℓq. It can be calculatedas follows: YpBq “ TpB1,B2, . . . ,Bℓq = TpB1,B2, . . . ,Bℓ{2q + TpBℓ{2`1,Bℓ{2`2, . . . ,Bℓq + 12ℓ. This wouldimply thatYpBq “ TpB1,B2, . . . ,Bℓq ď 12ℓ logℓ.

We would charge these 12ℓ logℓ points to the followingℓ´ 1 original points:tTOPpB1q,TOPpB2q, . . . ,TOPpBℓquzTOPpBq. That is, each top point of children of blockB except one getsď 13logℓ charge.

We are now ready to prove Theorem 8.1

Proof. Let TOPBLOCKprq “ B1 and PARENTpB1q “ B. By Lemma 8.4, GREEDY can put at most two pointbelow LEFTpBq and RIGHTpBq. And by the analysis above, the amortized number of points (with PAIRp¨q P

) added by GREEDY in BOXpBq while processingr with PAIRp¨q P is 13logℓ ď 13logk whereℓ is thenumber of children ofB. So, amortized number of points added byr “ 2`13logk. So| | ď 14nlogk.

The rest of the section is devoted in proving Lemma 8.15.

8.3 Proof of Lemma 8.15

Let B1,B2, . . . ,Bl be the children ofB in TREEDECOMPOSITIONpX q. Let Bi,Bi`1, . . . ,Bi`2m´1 be theconsecutive 2m children ofB. Let Bℓ “ tBi,Bi`1, . . . ,Bi`m´1u andBr “ tBi`m,Bi`m`1, . . . ,Bi`2m´1u. LetBll “ tB1,B2, . . . ,Bi´1u andBrr “ tBi`2m,Bi`2m`1, . . . ,Bℓu. Let Ct denote the set of key-live points inREGpBrq after GREEDY finished processing all the points till stept.

Lemma 8.16. Let Bj P tBℓ,Bℓℓu. Let NTOPpB j q,RTOPpB j q be the set of key-new and key-old points added byGREEDY in REGpBrq while processingTOPpB jq. ThenCMAX T IMEpB j q.y`1 ďCM INT IMEpB j q.y´maxt0,p|RTOPpBq|´2qu ` 2|tBk P Br |TOPpBq P LEFT-RELpBkqu|.

2we drop the floor notation for readability

18

Page 19: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Proof. Let p1Ø p2Ø. . .Ø pn be the set of points added by GREEDY in REGpBrq while processing TOPpB jq.Note that the keytp1.x, p2.x, . . . , pn.xu are live in REGpBrq at time TOPpB jq.y. By definition, onlyp1 andpn can be live at time TOPpB jq.y` 1 as each other pointpi is hidden by the pointpi´1 and pi`1. p1 andpn can be key-new or key-old point. Consider only the points inRTOPpB j q. All the keys inRTOPpB j q are liveat time TOPpB jq.y and only 2 of these (p1 and pn) can be live at time TOPpB jq.y` 1. So, the number ofkey-live points decrease at least by maxt0, |RTOPpB j q| ´ 2u after processing TOPpB jq.

Consider the points inNTOPpB j q. By Lemma 8.9, if TOPpB jq P LEFT-RELpBkq for Bk P Br , then GREEDY

can add key-new points out of which only only at most two (possibly p1 andpn) are live. So the total numberof key-live points added by GREEDY while processingp is at most 2|tBk P Br |TOPpB jq P LEFT-RELpBkqu|.This impliesCTOPpB j q.y ď CTOPpB j q.y´1 ´maxt0,p|RTOPpB j q|´2qu`2|tBk P Br |TOPpB jq P LEFT-RELpBkqu|.

Consider a pointq P B j such thatq ‰ TOPpB jq. By Lemma 8.4, all the points added by GREEDY whileprocessingq are either in BOXpB jq or below LEFTpB jq and RIGHTpB jq. Note that only RIGHTpB jq canlie in REGpBrq. Whenever GREEDY adds a point below RIGHTpB jq, key RIGHTpB jq.x is live at timeq.y. So GREEDY does not increase or decrease key-live points while processing q. This implies thatCMAX T IMEpB j q.y`1 ď CTOPpB j q.y ´ maxt0,p|RTOPpB j q| ´ 2qu ` 2|tB j P Br |TOPpB jq P LEFT-RELpB jqu|

Similar, we can prove the following lemma.

Lemma 8.17. Let Bj P tBrr u. Let NTOPpB j q,RTOPpB j q be the set of key-new and key-old points added byGREEDY in REGpBrq while processingTOPpB jq. Then CMAX T IMEpB j q.y`1 ďCTOPpB j q.y´maxt0,p|RTOPpB j q|´2qu ` 2|tB j P Br |TOPpB jq P RIGHT-RELpB jqu|.

Lemma 8.18. Let Bj P Br . Then CMAX T IMEpB j q.y`1 ď CM INT IMEpB j q.y ` 4.

Proof. Let p “ TOPpB jq. Let p1 Ø p2 Ø . . .Ø pn be the set of points added by GREEDY in REGpBrqwhile processingp. By definition, onlyp1 andpn can shift their status from key-not-live to key-live at timep.y` 1 as each other pointpi is hidden by the pointpi´1 and pi`1. Let q P B j such thatq ‰ TOPpB jq. ByLemma 8.4, all the points added by GREEDY while processingq are either in BOXpB jq or below LEFTpB jqand RIGHTpB jq. Note that all the points that are added in BOXpB jq are neither key-live or key-not-live asthey do not lie in REGpBrq. So, they cannot change their status from key-not-live to key-live. So afterprocessing point MAX TIMEpB jq, at most 4 keysp1.x, pn.x,LEFTpB jq.x,RIGHTpB jq.x can shift their statusfrom key-live to key-not-live. This implies thatCMAX T IMEpB j q.y`1 ď CM INT IMEpB j q.y ` 4.

By Lemma 8.16, ifB j P Bℓ, CMAX T IMEpB j q.y`1 ď CTOPpB j q.y ´ p|RTOPpB j q| ´ 2q ` 2|tBk P Br |TOPpB jq PLEFT-RELpBkqu|. By Lemma 8.16, ifB j P Bℓℓ, CMAX T IMEpB j q.y`1 ď CTOPpB j q.y ` 2|tBk P Br |TOPpB jq PLEFT-RELpBkqu|. By Lemma 8.17, ifB j P Brr , CMAX T IMEpB j q.y`1 ď CTOPpB j q.y ` 2|tBk P Br |TOPpB jq PRIGHT-RELpBkqu|

The above two sums along with the inequality in Lemma 8.18 aretelescoping sums that starts at the topof the parent block B and ends at MAX TIMEpBq. Adding them gives the following expression.

CMAX T IMEpBq.y`1´CTOPpBq.y ď ´ř

B j PBℓp|RTOPpB j q| ´2q`

ř

B j PtBℓ,Bℓℓu2|tBk P Br |TOPpB jq P LEFT-RELpBkqu|`

ř

B j PBrr2|tBk P Br |TOPpB jq P RIGHT-RELpBkqu|`

ř

B j PBr4. Since, there are no points in REGpBrq at time

TOPpBq.y, CTOPpBq.y “ 0. Also there can at most be two points in LEFT-RELpBkq and RIGHT-RELpBkq, so2|tBk P Br |TOPpB jq P LEFT-RELpBkqu| ` 2|tBk P Br |TOPpB jq P RIGHT-RELpBkqu| ď 4

ř

BkPBr2 “ 8m.

This leads to the following inequality: 0ď ´ř

B j PBℓp|RTOPpB j q|q ` 8m` 4m. So,

ř

B j PBℓp|RTOPpB j q|q ď 12m.

While processing TOPpB jq, all the points added by GREEDY other thanRTOPpB j q are key-new. By Lemma8.13, these points are in . Note that even points inRTOPpB j q can be in . However, we have shown thatnumber of such points isď 12m. Thus we have proved Lemma 8.15.

19

Page 20: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

9 Upper Bounding | |: Good Pairs

To prove that GREEDY has small competitive ratio we need to show that|G |{|X Y OPTpX q| is small. Butour understanding of this ratio remains quite limited with the best upper bound beingOplognq. One wayto prove that GREEDY has small competitive ratio, sidestepping the above issue,would be to prove alowerbound on OPTpX q (the minimum cardinality point set that must be added toX to makepX Y OPTpX qqarborally satisfied) by constructing acertificateof the lower bound and then show that the the ratio between|G | and the lower bound is small. While working with the lower bound might give a worse guarantee, but itmight also allow more flexibility in the proof. This is a standard approach in proving approximation ratiosof algorithms. For the BST problem, there are many lower bounds known (see [5]). One lower bound,called the independent set lower bound from Demaine et al. [5] subsumes the previous ones. It is definedas follows: rectanglespp,qq andpr,sq with p,q, r,s P X , areindependent(in X ) if they are not arborallysatisfied and no corner of either rectangle is strictly inside the other. They showed that the cardinality of anyindependent set of rectangles provides a lower bound on|X Y OPTpX q| as follows:

Claim 9.1 (Claim 4.1, [5]). Let X contain an independent set of rectangles I and letOPTpX q be a min-imum cardinality point set that must be added toX to makepX Y OPTpX qq arborally satisfied, then|X Y OPTpX q| ě |I |{2` |X |.

Though the above lemma gives a lower bound, it is not clear howto construct the setI (lower boundcertificate), or to relate it toG . Demaine et al. provided an alternative lower bound that is efficiently com-putable by a procedure called SIGNEDGREEDY which is very similar to GREEDY and is within a constantfactor of the best independent set lower bound. However, it is not known how to relate this lower bound to|G |, or how to relate the executions of SIGNEDGREEDY and GREEDY despite their close similarity.

Our work provides a lower bound that can be related to|G | on k-decomposable sequences. The lowerbound certificate is constructed by directly looking at the execution of GREEDY. Our construction buildsupon the idea of the independent set lower bound [5], but the final construction does not provide an in-dependent set, but a more nuanced certificate. The above features of our technique give us hope that ourtechniques can be refined to better understand the performance of GREEDY.

In Sec. 6, Observation 6.4 associated each pair inwith a rectangle. The set of rectangles thus formed(associated with the pairs in ) is tightly coupled with the execution of GREEDY. We will first partition

into two parts: (1) GOODp q and (2) BADp q. While the set GOODp q can be quite different fromindependent sets, we show that GOODp q behaves like an independent set in the following sense:

Theorem 9.2. LetX be the original point set and letOPTpX q be the minimum number of points that must

be added toX to make it arborally satisfied. Then|X Y OPTpX q| ě |GOODp q|2 ` |X |.

The rest of this section is devoted in proving Theorem 9.2.

9.1 Good Pairs and their properties

We will now partition into two parts:

Definition 9.3. (Good and bad pairs)PAIRpp1q “ pp,qq with PAIRpp1q P is called agoodpair if r Rpqlpq˝ (or pplqq˝) for all r P X . Otherwise,PAIRpp1q “ pp,qq is called abadpair. Let GOODp q :“|tp P G | PAIRppq is a good pairu| andBADp q :“ |tp P G | PAIRppq is a bad pairu|.

20

Page 21: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Towards the end of proving Theorem 9.2, we will show some properties of good pairs in the next lemma.The definition of a good pair forbids any point fromX being in the interior of the rectangle. The followinglemma proves that points fromG also cannot lie in the interior of the rectangle.

Lemma 9.4. Let PAIRpp1q “ plq (or plq) be a good pair. Then there are no points inpplqq˝ (or pplqq˝).

pp1

qq1

s

t

OPpsq

Figure 18: Illustration of the case dealt in the proof of Lemma 9.4 whens lies in qlp1.

Proof. By symmetry, it suffices to prove the lemma for rectangles of type qlp. Note that no original pointcan be inpqlpq˝ as PAIRpp1q is a good pair. Letq1 be the first point abovep1. This implies that GREEDY

marks pointp1 to the left ofp due to the unsatisfied rectangleq1lp.If q1 “ OPpq1qp“ qq, then there are no points inpqlpq˝ as GREEDY found q1lp arborally unsatisfied.

So let us assume thatqØq1.If there is a points P pqlpq˝ then it must satisfy one of the following three cases (recallthat we must

havesP G ):

1. sP pq1lpq˝.

Again, there exists no point inpq1lpq˝ as GREEDY found q1lp arborally unsatisfied. So this case isnot possible.

2. s lies abovep1 in pqlpq˝.

By the definition of PAIRp¨q, q1 is the first point abovep1. So, such a pointscannot exist.

3. sP pqlp1q˝ (see Fig. 18).

Let us assume thats is the closest point toq in pqlp1q˝. Therefore, no point lies aboves in pqlp1q˝.However, there exists a point aboves that does not lie inpqlp1q˝. UPpsq is one such candidate. Lettbe the first point aboves. Note thatt can lie to the right or north-east ofq (though in Fig. 18 it lies tothe north-east ofq).

Note thatq1 hidest from p (as eitherq1 lie to the right oft in tlp or q1 P ptlpq˝) ands is the firstpoint belowt such thatsÖÕ

q1. Then, by Lemma 4.6,OPpsqÖÕq1. OPpsq cannot lie inpqlp1q˝ asqlp

is a good pair; this impliesOPpsqÖÕq. In that case,q hidest from OPpsq (as eitherq lies to the left of

t in OPpsqlt or q P pOPpsql

tq˝) ands is the first point belowt such thatqŒÔs. Again by Lemma 4.7,qŒÔOPpsq. This leads to a contradiction as we have already deduced that OPpsqÖÕ

q. So our assumptionthatsP pqlp1q˝ must be false.

21

Page 22: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

9.2 Interaction between Good Pairs

The definition ofindependent setsspecifies how two rectangles can intersect each other. The set of goodpairs need not be independent in general. However, there areconstraints on the way good pairs interact.Specifically, we will show that if two good pairs intersect then the point associated with one of them cannotlie in the interior of the rectangle associated with the other pair:

Lemma 9.5. Let PAIRpq1q “ slq andPAIRpq2q “ plq be two good pairs such thatsÖÕp. Assume that the

intersection between the two rectangles is of type. Then q1 cannot lie to the left of q inplq except at thebottom-left corner ofplq.

p

s

qq1 q2

s1

Figure 19: Illustration of the bad case in the proof of 9.5 when q1 lies in to the left ofq in plq (but not at itsbottom left corner).

Proof. The intersection ofplq andslq is of type . Lets1 be the first point aboveq1. If q1 lies to the left ofq in plq (but not at the bottom-left corner ofplq), then it lies to the left or right ofq2 in plq. This impliesthats1 lies in pplqq˝. However, Lemma 9.4 forbids such a situation.

Lemma 9.6. Let PAIRpq1q “ slq and PAIRpr1q “ slr be two good pairs such thatrÖÕq. Assume that the

intersection between the two rectangles is of type. Then q1 R pslrq˝ and q1 cannot be at the bottom-left

corner ofslq.

r

s

qq1

r1

s1

Figure 20: Illustration of the bad case in the proof of 9.6 when q1 lies at the bottom-left corner ofslq.

Proof. By Lemma 9.4,q1 R pslrq˝.

Assume for contradiction thatq1 lies at the bottom-left corner ofslq, that is, it is the first point belows (as PAIRpq1q “ pq,sq). This implies thatr1 cannot lie belowq1 (as then PAIRpr1q ‰ pr,sqq. Soq1ŒÔr1

. Lets1 be the first point abover1. Since PAIRpr1q “ pr,sq, s1 lies to the right ofs. This implies thats1 hidessfrom q (ass1 lies to the right ofs in slq) andq1 is the first point belows. By Lemma 4.6,OPpq1qÖÕ

s1. ButOPpq1q “ q lies to the south-east ofs1. So, we arrive at a contradiction. Soq1 cannot lie at the bottom-leftcorner ofslq

22

Page 23: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

The following two lemmas are also a direct consequence of Lemma 9.4.

Lemma 9.7. Let PAIRpq1q “ slq andPAIRpr1q “ plr be two good pairs such thatpÖÕs,rÖÕq. Assume that

the intersection between the two rectangles is of type. Then q1 R pplrq˝.

Lemma 9.8. Let PAIRpq1q “ slq andPAIRpr1q “ plr be two good pairs such thatsÖÕp,rÖÕ

q. Assume thatthe intersection between the two rectangles is of type. Then q1 R pplrq

˝.

9.3 Putting it together

Let GOODp qn :“ tqlp | qlp P GOODp qu. Similarly we can define GOODp qm. Demaine et al. [5]proved that the size of anindependent setof rectangles provides a lower bound on|OPTpX q| (Claim 9.1).Instead of independent sets we have to argue about GOODp q. Our argument would follow that of Demaineet al. at a high level, but with some important changes. We state three lemmas below which are adaptationsof lemmas from [5] to GOODp q.

Lemma 9.9. (compare Lemma 4.4, [5]) Let q be the point inX with the maximum x-coordinate suchthat there exists a rectangle with q inGOODp qn as one of its diagonal point. Letslq P GOODp qn

be the widest rectangle with q as one of its diagonal point. Then we can find a vertical lineℓ passingthrough the interior ofslq, such that insideslq, ℓ does not intersect the interior of any other rectangle inGOODp qnztslqu.

Proof. Let PAIRpq1q “ slq. Let Sdenote the set of all rectangles in GOODp qnztslqu overlappingslq.Let us assume for contradiction thatSspans the horizontal section ofslq. Let plr be a rectangle inSwithPAIRpr1q “ plr .

Note that any intersection betweenslq andplr can be of type , , or . This is due to the fact thatany other intersection will either force two points fromtp,q, r,su to be on the same horizontal or verticalline (which is forbidden as these points come from a permutation sequence), or it will force a diagonal point(in X ) of one rectangle to be in the interior of the other. Also, by the construction ofslq, plr is the leftrectangle in the intersection typeand the narrower rectangle in intersection type, or .

The right edge of any rectangle in GOODp qn does not intersect even partially with the left edge ofany other rectangle (as points inX come from a permutation sequence). So, if the rectangles inS spanthe horizontal section ofslq, then each boundary point to the left ofq in slq (except maybe its bottom-leftcorner) lies either in the interior of a rectangleplr (intersection type , , ) or to the left ofq in plq

except at the bottom-left corner ofplq (intersection type andr “ q ).Then by Lemmas 9.5, 9.6, 9.7, and 9.8, pointq1 cannot lie to the left ofq in slq, except possibly its

bottom-left corner.As rectangles of intersection type and are narrower thanslq (by the construction ofslq), these

rectangles cannot span horizontal section ofslq. Since we assumed that rectangles inSspan the horizontalsection ofslq, it implies thatScontains a rectangle of typeor . Using Lemmas 9.7 or 9.6 respectively,q1 cannot even lie at the bottom-left corner ofslq. This implies thatq1 does not lie to the left ofq in slq.However, this contradicts Observation 6.4 that states if PAIRpq1q “ slq, thenq1 lies to the left ofq in slq.So we arrive at a contradiction, hence our assumption that “Sspans the horizontal section ofslq” must befalse. So, we can find a vertical lineℓ through the interiorslq, such that insideslq, ℓ does not intersect theinterior of any other rectangle in GOODp qnztslqu.

23

Page 24: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Lemma 9.10. (compare Lemma 4.3, [5]) Givenplq P GOODp qn and a vertical lineℓ at a non-integerx-coordinate intersectingpplqq˝ and a set of pointsY such that each pair of points inX YY is arborallysatisfied. We can find two points a,b P pX YY q in plq such that aØb, a is to the left ofℓ, b is to the rightof ℓ, and there are no points inX Y Y on the horizontal segment connecting a to b.

Proof. Let a andb in pX Y Y q be two closest points inplq such thata is the left of lineℓ andb is to theright of ℓ. Note thata exists (p is one such candidate). Similarlyb exists (q is one such candidate). Byconstruction, there are no points inalb (or alb). If a andb do not lie on the same horizontal line, thenalb

(or alb) is an arborally unsatisfied rectangle, contradicting our assumption thatpX Y Y q is an arborallysatisfied set.

Lemma 9.11. (compare Lemma 4.5, [5]) Given a point setX and another point setY such thatX Y Y

is arborally satisfied, then|X Y Y | ě |GOODp qn| ` |X |.

Proof. This proof is essentially verbatim from [5]. The property ofindependent set of rectangles used in theproof of Lemma 4.5 in [5] is the existence of the lineℓ (proved in Lemma 4.4 there). Our Lemma 9.9 provesthe existence of lineℓ for GOODp qn. Given this, the proofs for independent set and for GOODp qn arethe same.

We apply Lemma 9.9 to find a rectangleslq in GOODp qn and a vertical lineℓ piercing slq withthe property that no other rectangle in GOODp qn intersectsℓ in the interior of slq. Then we applyLemma 9.10 to find two pointsa,b horizontally adjacent inX Y Y and on opposite sides ofℓ in slq. Wemark this pairpa,bq with rectangleslq. Then we removeslq from GOODp qn and repeat the process,until there are no rectangles left in GOODp qn. Whenever we remove a rectangleslq from GOODp qn,if a and b are not on the top or bottom sides ofslq, thena andb do not simultaneously belong to anyother rectangle in GOODp qnztslqu, so they will never be marked again. On the other hand, ifa andbare on the top (bottom) side ofslq, thena andb are neither in the interior nor on the top (bottom) side ofany other rectangle in GOODp qn. Furthermore, since coordinates inX are distinct, the top side of norectangle in GOODp qn coincides even partially with the bottom side of a rectanglein GOODp qn. Thus,each pair of horizontally adjacent points inX Y Y can be marked at most once. Finally, by distinctness ofy-coordinates inX , at most one point in a pair can belong toX . Therefore the number of points inY is atleast|GOODp qn|, proving the lemma.

Similar to Lemma 9.11, we can also show that any arborally satisfied setY satisfies|X Y Y | ě

|GOODp qm| ` |X |. So |X Y Y | ě |GOODp qn|`|GOODp qm|2 ` |X | “ |GOODp q|

2 ` |X |. We have thusproved Theorem 9.2.

10 Upper bounding | |: Bad Pairs

In this section we prove

Lemma 10.1. |BADp q| ď 10npk´ 1q.

For a pointpP X , similar to Rp qp, define RpBADp qqp :“ tPAIRpp1q P BADp q | pØ p1 and PAIRpp1q “pp,qq, whereq P X u. Let PAIRpp1q P RpBADp qqp. To upper bound|BADp q|, we construct Fp¨q thatmaps a pointu (with PAIR P BADp q) to a pointv (with PAIRpvq P ). Fp¨q takes at most 4 points (withPAIRp¨q P BADp q) to a point (with PAIRp¨q P ), and we already proved| | “ Opnkq. This would pro-vide an upper bound on|BADp q|. Unfortunately, Fp¨q is a partial map, and does not map every point (with

24

Page 25: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

PAIRp¨q P BADp q). We show, by an argument similar to the one used for bounding| |, that the numberof unmapped points isOpnkq. This gives our desired bound|BADp q| “ Opnkq.

The rest of this section is devoted to proving Lemma 10.1. In Sec. 10.1 we construct the map mentionedabove; in Sections 10.2, 10.3 we provide upper bounds on the size of the sets of mapped and unmappedpoints; finally, we put these two bounds together to completethe proof.

10.1 Construction of Fp¨q and its properties

We begin by describing the setting used in the proof.

The setting used in the proof. Unless mentioned otherwise, we will assume in this section that TOPBLOCKpBq “p and PAIRpp1q P RpBADp qqp. Let q1 be the first point abovep1. Since GREEDY has put a pointp1 be-low q1 while processingp, it found plq1 arborally unsatisfied (pØ p1 as PAIRpp1q P RpBADp qqp). Thisimplies that there are no points inplq1 exceptp,q1 and p1. If OPpq1q “ q1, then PAIRpp1q P GOODp q.So let us assume that OPpq1q “ q andq1 Øq (since PAIRpp1q P RpBADp qqp we do not haveqØq1).

Since PAIRpp1q P BADp q, there is another point inX ztp,qu and inpplqq˝. Let r P X be a point inpplqq˝ having the smallestx-distance fromp. Let p1

1 be the next point to the right ofp1; that p11 exists is

proven next:

Lemma 10.2. There is a point p11 to the right of p inp1lr but not at the bottom-right corner ofp1lr .

p p1 p1

1

r

q1

q

Figure 21: Lemma 10.2 states thatp11 exists to the right ofp1 such thatp1

1ÖÕr

Proof. Consider the rectangleq1lr . By Lemma 4.4, a pointr 1 lies either to the left or abover in q1lr . Sincer P X , by Observation 4.1, GREEDY does not put any point abover. Also, sinceq1 is the first point abovep1, r 1 cannot lie on the bottom-left endpoint ofq1lr . Sor 1 Ø r andp1ÖÕr 1

.Now consider rectanglep1lr 1

. Again by Lemma 4.2, a pointp11 must exist either to the right or abovep1

in p1lr 1. Sinceq1 is the first point abovep1 (andq1 does not lie inp1lr 1

), p11 cannot lie abovep1 in p1lr 1

.So it must lie to the right ofp1 in p1lr 1

.As r 1 Ø r, we deduce thatp1

1 cannot lie belowr.

We are now ready to describe the construction of the partial map Fp¨q. Its domain istu P G | PAIRpuq PBADp qu and its range istv P G | PAIRpvq P u. Fp¨q is computed by the procedure in Fig. 22.

In the procedure for computing Fpp1q, if we find that PAIRpp11q P , then we look fors1

1, the first pointabovep1

1. We now prove some properties ofs11; these will be used in Sec. 10.3. By Lemma 10.2,p1

1 cannotlie below r. So p1

1ÖÕr (see Fig. 23). Note thats1

1ÖÕr or s1

1ŒÔr or s11 Ø r (though in Fig. 23 we have shown

the cases11ÖÕr). Since GREEDY has put a point belows1

1 while processingp, hencepls11 is an arborally

unsatisfied rectangle. So,q1ŒÔs11

as p1 Ø p11 and GREEDY marked these points due to unsatisfied rectangle

plq1 andpls11 respectively. We make some other observation regardings1

1.

25

Page 26: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

if PAIRpp11q P then

Fpp1q “ p11;

endelse

Let s11 be the first point abovep1

1;if PAIRps1

1q P thenFpp1q “ s1

1;endelse

Fpp1q is not defined;end

end

Figure 22: Procedure to compute Fpp1q mappingp1 with PAIRpp1q P RpBADp qq to a point with PAIRp¨q P. If PAIRpp1q P LpBADp qq, the procedure is symmetric.

Observation 10.3.There are no points to the left of s11 in pls1

1.

The above observation is a direct consequence of the fact that while processingp, GREEDY found pls11

arborally unsatisfied while processingp.

Observation 10.4.There are no points in (1)pq1ls11q˝ and (2) below q1 or to the left of s11 in q1ls1

1.

Again this is due to the facts that (1)p1 andp11 are two consecutive points to the right ofp, (2) GREEDY

found plq1 andpls11 to be arborally unsatisfied while processingp, (3) q1 is the first point abovep1.

Observation 10.5.s11 R X and s11 Ø OPps1

1q.

Sincer is an original point inplq with the smallestx-distance top, s11 R X . Together with our assump-

tion that PAIRpp11q P , this impliess1

1Ø OPps11q.

p p1 p1

1

r

q1

s1

1

q

(i)

Figure 23: In Fpp1q, s11 is the first point abovep1

1

10.2 Bounding the number of points mapped by Fp¨q

Let PAIRppiq P RpBADp qqp. For aqi P G , if Fppiq “ qi , thenqi P G , and eitherqi is the first point to theright of pi or qi is the first point aboveq1

i whereq1i is the first point to the right ofpi . Hence forqi P G , there

are at most two pointspi such that Fppiq “ qi . In other words, for eachqi P G , we have|tpi | Fppiq “ qi andPAIRpqiq P u| ď 2. So,

26

Page 27: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

ÿ

pPX

|tPAIRppiq P RpBADp qqp | pi P domainpFqu| “ÿ

qi PG

|tpi | pi s.t. Fppiq “ qi and PAIRpqiq P u|

ď 2| |.

By symmetry,

ÿ

pPX

|tPAIRppiq P LpBADp qqp | pi P domainpFqu| ď 2| |.

Combining the above two inequalities we get

Lemma 10.6.ř

pPX|tPAIRppiq P BADp qp | pi P domainpFqu| ď 4| |.

10.3 Bounding the number of points not mapped by Fp¨q

We continue with the setting introduced in Sec. 10.1. Since Fp¨q was not able to mapp1, the following mustbe true:

1. PAIRpp11q P ,

2. PAIRps11q P .

Since PAIRpp1q P BADp q, there exists another pointr P X ztp,qu in plq.Let t1

1 be the first point aboves11. So PAIRps1

1q “ pOPps11q,OPpt1

1qq. Since PAIRps11q P ands1

1ØOPps11q

(Observation 10.5), either OPpt11qØ t1

1 or OPpt11q “ t1

1.

Observation 10.7.Either OPpt11qØ t1

1 or OPpt11q “ t1

1.

We first make some claims on the position oft11.

Lemma 10.8. Let t11 be the first point above s11. Thenq1ŒÔt1

1.

p p1 p1

1

r

q1

s1

1

t1

1

q

OPps1

1q

Figure 24: Lemma 10.8 shows that there exists a pointt11 such that (1) it is the first point aboves1

1 and (2)q1ŒÔt1

1

27

Page 28: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Proof. Consider the rectangleq1ls11. By Lemma 4.4, there exists a pointt1

1 to the left or aboves11 in q1ls1

1.

However, by Observation 10.4, there is no point in (1)pq1ls11q˝ and (2) belowq1 or to the left ofs1

1 in q1ls11.

This implies thatt11

Ùs11

andt11 P q1ls1

1.

We now need to show thatq1ŒÔt11. For contradiction, assume thatq1 Ø t1

1. This implies that OPpt11q “ q

andt11 Ø q (sinces1

1.x ă r.x ă q.x andt11

Ùs11

). But we know by Observation 10.7 that OPpt11q cannot lie to the

right of t11. Thus we have arrived at a contradiction. So our assumption thatq1 Øt1

1 must be false, and henceq1ŒÔt1

1.

Our next claim is regarding the position of OPpt11q.

Lemma 10.9. Let t11 be the first point above s11. Then,OPpt1

1q ‰ t11, andOPpt1

1qŒÔp, OPpt11qÖÕ

q1 andOPpt11qŒÔs1

1.

Proof. By Observation 10.7, OPpt11qØ t1

1 or OPpt11q “ t1

1. However, OPpt11q ‰ t1

1 becauser is the the originalpoint in plq with the smallestx-distance fromp. This implies that OPpt1

1qØ t11.

We have to show thatOPpt11qŒÔp. If pÖÕOPpt1

1q (and OPpt11qØ t1

1), it contradicts our assumption thatr is thethe original point inplq with the smallestx-distance fromp (recall thatr.x ą p1

1.x “ t11.x by Lemma 10.2).

By Lemma 5.1, if TOPBLOCKppq “ B, then there are no points in UPPERBOXpBq. HenceOPpt11qŒÔp.

This together witht11

Ùs11

impliesOPpt11qŒÔs1

1. Also sinceOPpt1

1qŒÔp, pÖÕq1, q1ŒÔt11

(Lemma 10.8) and OPpt11qØt1,

henceOPpt11qÖÕ

q1.

We say that a pointp1 is anobservablepoint if Fpp1q is not defined.

Lemma 10.10.Let p1 Ø p2 be observable points such thatPAIRpp1q,PAIRpp2q P RpBADp qqp for p P X .Assume thatGREEDY put these points to arborally satisfyplq1, plq2, respectively, while processing pointp. Then there is a point t such thattÖÕ

q1 and tŒÔq2.

p p1 p2p1

1

s1

1

q1

q2

t

Figure 25: The setting of Lemma 10.10:p1 andp2 are twoobservablepoints. The above figure depicts thecase when the next point to the right ofp1, p1

1 ‰ p2.

Proof. One can check thatq1.y ă q2.y. Let p11 be the first point to the right ofp1. And let s1

1 be the firstpoint abovep1

1 (see Fig. 25 for an illustration). Note that ifp11 “ p2, thens1

1 “ q2. Else if p1 Ø p11 Ø p2,

then one can check thats11ŒÔq2

. GREEDY put p11 and p2 due to the unsatisfied rectanglespls1

1 and plq2,

28

Page 29: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

respectively. By Lemma 10.9, there exists at such thattÖÕq1 and tŒÔs1

1. We can replaces1

1 with q2 in the

previous statement as eithers11 “ q2 or s1

1ŒÔq2.

Continuing the setting that was used in Lemma 10.10, let PAIRppiq,PAIRppi`1q P RpBADp qqp. IfTOPBLOCKppq “ B, then by Lemma 6.10, OPpqiq is in block Bi, whereBi P SIBLING pBq. Similarly,OPpqi`1q P Bi`1 such thatBi`1 P SIBLING pBq. We now prove the following lemma that is similar to Lemma7.3.

Lemma 10.11.Let pP X andTOPBLOCKppq “ B. Let p1 Ø p2 Ø ¨¨¨ Ø pℓ be observable points such thatPAIRppiq P RpBADp qqp for i P rℓs. Assume thatGREEDY puts these points due to arborally unsatisfiedrectanglesplq1, plq2, . . . , plqℓ , respectively, while processing point p. By Lemma 6.10,OPpqiq P Bi suchthat Bi P SIBLING pBq. Then Bi ‰ B j for i ‰ j.

Proof. Consider pointspi Ø p j . Since PAIRppiq,PAIRpp jq P RpBADp qqp, we haveqi Ø OPpqiq andq j ØOPpq jq (OPpqiq ‰ qi as otherwise PAIRpp jq P GOODp q; similarly for OPpq jq). By Lemma 10.10, there isa pointt such thattÖÕ

qi andtŒÔqj. This implies thattÖÕ

OPpqi q andtŒÔOPpqj q. Moreover, by Lemma 10.9 wehavetŒÔp. Hencet.x ă p.x ă OPpqiq.x, andp R Bi (sincep P B andBi is the sibling ofB). Hence,t R Bi asall the points in blockBi should be contiguous in their keys.

SincetÖÕOPpqi q andtŒÔOPpqj q, we also have OPpqiq.y ă t.y ă OPpq jq.y. Sincet R Bi, OPpqiq and OPpq jq

cannot be in the same block, as all the points in a block shouldbe contiguous in time. HenceBi ‰ B j .

10.4 Proof of Lemma 10.1

Since there are at mostk ´ 1 siblings of B, by Lemma 10.11 for eachp P X we have|tPAIRppiq PRpBADp qqp | pi is an observable pointu| ď k´1. By symmetry,|tPAIRppiq P LpBADp qqp | pi is an observable pointu| ďk´ 1 for p P X . So, |tPAIRppiq P BADp qp | pi is an observable pointu| ď 2pk´ 1q for p P X . We arenow ready to upper bound the number of points in BADp q.

|BADp q| “ÿ

pPX

´

|tPAIRppiq P BADp qp | pi P domainpFqu| ` |tPAIRppiq P BADp qp | pi is an observable pointu|¯

ď 4| | ` 2npk´ 1q.

Theorem 7.1 gives| | ď 2npk´ 1q. Hence|BADp q| ď 10npk´ 1q, proving Lemma 10.1.

11 Improving the bound on the number of observable points in

Improving the bound in Lemma 10.1, we prove

Lemma 11.1. |BADp q| ď Opnlogkq.

We again define the notations used in Section 8. LetB1,B2, . . . ,Bl be the children ofB in TREEDECOMPOSITIONpX q.Let Bi,Bi`1, . . . ,Bi`2m´1 be the consecutive 2m children ofB. Let Bℓ “ tBi ,Bi`1, . . . ,Bi`m´1u andBr “tBi`m,Bi`m`1, . . . ,Bi`2m´1u. Let NTOPpB j q and RTOPpB j q be the set of key-new and key-old elements addedby GREEDY in REGpBrq while processing TOPpB jq. In Section 8.3, we proved that

ř

B j PBℓ|RTOPpB j q| ď

12m. Note that these points can be in or . In this section, we need to bound the number of observablepoints inNTOPpB j q. To this end, we will prove the following lemma which is similar to lemma 8.15.

29

Page 30: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

Lemma 11.2.Let Bi,Bi`1, . . . ,Bi`2m´1 be the set of consecutive children blocks of B inTREEDECOMPOSITIONpX q.The number of observable points added bytTOPpBiq,TOPpBi`1q, . . . ,TOPpBi`m´1quzTOPpBq inREGpBi`m,Bi`m`1, . . . ,Bi`2m´1q is Opmq.

Proof. Consider the points inNTOPpB j q whereB j P Bℓ. By Lemma 8.14, these points have PAIRp¨q P . LetOTOPpBq be the set observable points inNTOPpB j q. We will show that

ř

B j PBℓ|OTOPpBq| ď |tBk P Br |TOPpB jq P

LEFT-RELpBkqu|.Consider any blockBk P Br . By Corollary 8.11, only points in LEFT-RELpBkq and RIGHT-RELpBkq can

add key-new points in REGpBkq. Let us assume that TOPpB jq P LEFT-RELpBkq and assume that GREEDY

adds two observable pointp1 Ø p2 in REGpBkq while processing TOPpB jq due to unsatisfied rectangle

TOPpB j qlq1,TOPpB j q lq2 respectively. Sincep1 andp2 are key-new points,q1,q2 lie in BOXpBkq. So OPpq1q,OPpq2q P

Bk. However, this contradicts Lemma 10.11 which states that OPpq1q and OPpq2q are the elements of differ-ent siblings ofBk.

So, the number or observable points|OTOPpB j q| can be bounded by:|tBk P Br |TOPpB jq P LEFT-RELpBkqu|.And,

ř

B j PBℓ|OTOPpBq| ď

ř

B j PBℓ|tBk P Br |TOPpB jq P LEFT-RELpBkqu|. Since there are at most 2 left-

relative of any block, the above inequality can be written as:ř

B j PBℓ|OTOPpBq| ď

ř

BkPBr2 “ 2m.

Since, points inRTOPp¨q may also be observable, the total number of observable points added in REGpBrqwhile processing points intTOPpBiq,TOPpBi`1q, . . . ,TOPpBi`m´1quzTOPpBq “

ř

B j PBℓpRTOPpB j q `OTOPpB j qq ď

12m` 2m“ 14m.

Consider a blockB in TREEDECOMPOSITIONpX q having childrenB1,B2, . . . ,Bℓpℓ ď kq. LetYpBq :“TpB1,B2, . . . ,Bℓq be the total number of observable points added by GREEDY while processing points intTOPpB1q,TOPpB2q, . . . ,TOPpBℓquzTOPpBq in REGpB1,B2, . . . ,Bℓq. Then using lemma 11.2 and its symmet-ric version, we can calculateYpBq as follows:YpBq “ TpB1,B2, . . . ,Bℓq = TpB1,B2, . . . ,Bℓ{2q + TpBℓ{2`1,Bℓ{2`2, . . . ,Bℓq+ 14ℓ. This would imply thatYpBq “ TpB1,B2, . . . ,Bℓq ď 14ℓ logℓ.

We would charge theseOpℓ logℓq points to the followingℓ´1 original points:tTOPpB1q,TOPpB2q, . . . ,TOPpBℓquzTOPpBq.That is, each top point of children of blockB except one gets 15logℓ charge. Similar to Theorem 8.1, wecan bound the number of observable points.

Theorem 11.3.ř

pPX|tPAIRppiq P BADp qp | pi is an observable pointu| “ 16nlogk

Proof. Let TOPBLOCKppq “ B1 and PARENTpB1q “ B. By Lemma 8.4, GREEDY can put at most twopoint below LEFTpBq and RIGHTpBq. And by the analysis above, the amortized number of observablepoints added by GREEDY in BOXpBq while processingp is 15logℓ “ 15logk whereℓ is the number ofchildren ofB. So, amortized number of points added byp“ 2`15logk. So

ř

pPX|tPAIRppiq P BADp qp |

pi is an observable pointu| ď 16nlogk.

11.1 Proof of Lemma 11.1

We are now ready to upper bound the number of points in BADp q.

|BADp q| “ÿ

pPX

´

|tPAIRppiq P BADp qp | pi P domainpFqu| ` |tPAIRppiq P BADp qp | pi is an observable pointu|¯

ď 4| | ` 16nlogk.

Theorem 7.1 gives| | ď 14nlogk. Hence|BADp q| ď 80nlogk, proving Lemma 11.1.

30

Page 31: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

12 Proof of the main result

With all the ingredients at hand, the proof of the main resultTheorem 1.1 is now short:

|G | ď 2|PAIRpG q| (Corollary 6.6)

“ 2p| | ` | |q (Lemma 6.8)

“ 2p| | ` |BADp q| ` |GOODp q|q

ď 188nlogk` 2|GOODp q| (Theorem 7.1 and Lemma 10.1)

ď 188nlogk` 4|X Y OPTpX q|. (Theorem 9.2)

Using Corollary 1.10 in [2], namely|X Y OPTpX q| “ Opnlogkq for k-decomposable sequences, weget |G | “ Opnlogkq, which immediately gives Theorem 1.1.

References

[1] Prosenjit Bose, Karim Douıeb, Vida Dujmovic, and Rolf Fagerberg. AnO(log log n)-competitivebinary search tree with optimal worst-case access times. InAlgorithm Theory - SWAT 2010, pages38–49, 2010.

[2] Parinya Chalermsook, Mayank Goswami, Laszlo Kozma, Kurt Mehlhorn, and Thatchaphol Saranurak.Pattern-avoiding access in binary search trees. InFOCS, volume abs/1507.06953, 2015.

[3] Richard Cole. On the Dynamic Finger Conjecture for SplayTrees. Part II: The Proof.SIAM J. Comput.,30(1):44–85, 2000.

[4] Richard Cole, Bud Mishra, Jeanette P. Schmidt, and Alan Siegel. On the Dynamic Finger Conjecturefor Splay Trees. Part I: Splay Sorting logn-Block Sequences.SIAM J. Comput., 30(1):1–43, 2000.

[5] Erik D. Demaine, Dion Harmon, John Iacono, Daniel M. Kane, and Mihai Patrascu. The geometry ofbinary search trees. InSODA, pages 496–505, 2009.

[6] Erik D. Demaine, Dion Harmon, John Iacono, and Mihai Patrascu. Dynamic Optimality - Almost.SIAM J. Comput., 37(1):240–251, 2007.

[7] Jonathan Derryberry, Daniel Dominic Sleator, and Chengwen Chris Wang. A Lower Bound Frameworkfor Binary Search Trees with Rotations.Tech Report, CMU.

[8] Kyle Fox. Upper bounds for maximally greedy binary search trees. InAlgorithms and Data Structures- 12th International Symposium, WADS, pages 411–422, 2011.

[9] John Iacono. In pursuit of the dynamic optimality conjecture. In Space-Efficient Data Structures,Streams, and Algorithms - Papers in Honor of J. Ian Munro on the Occasion of His 66th Birthday,pages 236–250, 2013.

[10] Joan M. Lucas. Canonical forms for competitive binary search tree algorithms.Tech. Rep. DCS-TR-250, Rutgers University, 1988.

31

Page 32: Better Analysis of GREEDY Binary Search Tree on Decomposable … · 2018-09-25 · arXiv:1604.06997v1 [cs.DS] 24 Apr 2016 Better Analysis of GREEDY Binary Search Tree on Decomposable

[11] J. Ian Munro. On the Competitiveness of Linear Search. In Algorithms - ESA 2000, 8th AnnualEuropean Symposium, Saarbrucken, Germany, September 5-8, 2000, Proceedings, pages 338–345,2000.

[12] Seth Pettie. Splay trees, davenport-schinzel sequences, and the deque conjecture. InSODA, pages1115–1124, 2008.

[13] Seth Pettie. Applications of forbidden 0-1 matrices tosearch tree and path compression-based datastructures. InSODA, pages 1457–1467, 2010.

[14] Daniel Dominic Sleator and Robert Endre Tarjan. Self-Adjusting Binary Search Trees.J. ACM,32(3):652–686, 1985.

[15] Chengwen Chris Wang, Jonathan Derryberry, and Daniel Dominic Sleator.Oplog lognq-competitivedynamic binary search trees. InSODA, pages 374–383, 2006.

[16] Robert E. Wilber. Lower Bounds for Accessing Binary Search Trees with Rotations.SIAM J. Comput.,18(1):56–67, 1989.

32