Greedy Is an Almost Optimal Deque

  • Parinya Chalermsook
  • Mayank Goswami
  • László Kozma
  • Kurt Mehlhorn
  • Thatchaphol Saranurak
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9214)


In this paper we extend the geometric binary search tree (BST) model of Demaine, Harmon, Iacono, Kane, and Pǎtraşcu (DHIKP) to accommodate for insertions and deletions. Within this extended model, we study the online Greedy BST algorithm introduced by DHIKP. Greedy BST is known to be equivalent to a maximally greedy (but inherently offline) algorithm introduced independently by Lucas in 1988 and Munro in 2000, conjectured to be dynamically optimal.

With the application of forbidden-submatrix theory, we prove a quasilinear upper bound on the performance of Greedy BST on deque sequences. It has been conjectured (Tarjan, 1985) that splay trees (Sleator and Tarjan, 1983) can serve such sequences in linear time. Currently neither splay trees, nor other general-purpose BST algorithms are known to fulfill this requirement. As a special case, we show that Greedy BST can serve output-restricted deque sequences in linear time. A similar result is known for splay trees (Tarjan, 1985; Elmasry, 2004).

As a further application of the insert-delete model, we give a simple proof that, given a set U of permutations of [n], the access cost of any BST algorithm is \(\Omega ( \log \vert U \vert + n)\) on “most” of the permutations from U. In particular, this implies that the access cost for a random permutation of [n] is \(\Omega {(n\log {n})}\) with high probability.

Besides the splay tree noted before, Greedy BST has recently emerged as a plausible candidate for dynamic optimality. Compared to splay trees, much less effort has gone into analyzing Greedy BST. Our work is intended as a step towards a full understanding of Greedy BST, and we remark that forbidden-submatrix arguments seem particularly well suited for carrying out this program.




Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Cole, R.: On the dynamic finger conjecture for splay trees. part ii: The proof. SIAM Journal on Computing 30(1), 44–85 (2000)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Cole, R., Mishra, B., Schmidt, J., Siegel, A.: On the dynamic finger conjecture for splay trees. part i: Splay sorting log n-block sequences. SIAM J. Comput. 30(1), 1–43 (2000)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Demaine, E.D., Harmon, D., Iacono, J., Kane, D.M., Patrascu, M.: The geometry of binary search trees. In: SODA 2009, pp. 496–505 (2009)Google Scholar
  4. 4.
    Derryberry, J., Sleator, D., Wang, C.C.: Properties of multi-splay trees (2009)Google Scholar
  5. 5.
    Elmasry, A.: On the sequential access theorem and deque conjecture for splay trees. Theor. Comput. Sci. 314(3), 459–466 (2004)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    Fox, K.: Upper bounds for maximally greedy binary search trees. In: Dehne, F., Iacono, J., Sack, J.-R. (eds.) WADS 2011. LNCS, vol. 6844, pp. 411–422. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  7. 7.
    Iacono, J.: In pursuit of the dynamic optimality conjecture. In: Brodnik, A., López-Ortiz, A., Raman, V., Viola, A. (eds.) Ianfest-66. LNCS, vol. 8066, pp. 236–250. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  8. 8.
    Lucas, J.M.: Canonical forms for competitive binary search tree algorithms. Tech. Rep. DCS-TR-250, Rutgers University (1988)Google Scholar
  9. 9.
    Munro, J.I.: On the competitiveness of linear search. In: Paterson, M. (ed.) ESA 2000. LNCS, vol. 1879, pp. 338–345. Springer, Heidelberg (2000) CrossRefGoogle Scholar
  10. 10.
    Pettie, S.: Splay trees, davenport-schinzel sequences, and the deque conjecture. In: SODA 2008, pp. 1115–1124 (2008)Google Scholar
  11. 11.
    Pettie, S.: Applications of forbidden 0–1 matrices to search tree and path compression-based data structures. In: SODA 2010, pp. 1457–1467 (2010)Google Scholar
  12. 12.
    Pettie, S.: Generalized davenport-schinzel sequences and their 0–1 matrix counterparts. Journal of Combinatorial Theory, Series A 118(6), 1863–1895 (2011)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Sleator, D.D., Tarjan, R.E.: Self-adjusting binary search trees. J. ACM 32(3), 652–686 (1985)MathSciNetCrossRefMATHGoogle Scholar
  14. 14.
    Sundar, R.: On the deque conjecture for the splay algorithm. Combinatorica 12(1), 95–124 (1992)MathSciNetCrossRefMATHGoogle Scholar
  15. 15.
    Tarjan, R.E.: Sequential access in splay trees takes linear time. Combinatorica 5(4), 367–378 (1985)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Wilber, R.: Lower bounds for accessing binary search trees with rotations. SIAM Journal on Computing 18(1), 56–67 (1989)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Parinya Chalermsook
    • 1
  • Mayank Goswami
    • 1
  • László Kozma
    • 2
  • Kurt Mehlhorn
    • 1
  • Thatchaphol Saranurak
    • 3
  1. 1.Max-Planck Institute for InformaticsSaarbrückenGermany
  2. 2.Department of Computer ScienceSaarland UniversitySaarbrückenGermany
  3. 3.KTH Royal Institute of TechnologyStockholmSweden

Personalised recommendations