Escolar Documentos
Profissional Documentos
Cultura Documentos
Erik D. Demaine† Dion Harmon‡ John Iacono§ Daniel Kane¶ Mihai Pǎtraşcu†
11
00
11
00
11
00
11 00
00
11 00
00 11
11
11 00
11
00
11
11
00 11
11 00
00 11 11
11
00
11
00
11
00
11
00
11
00
11
00
11
00
each si is revealed, with no knowledge of future accesses.
00 11
11 00 11
00 00
11
11
00
00 00
11 11
00 11
11 00
11
00 11
00
00
11
00
11 00
11
11
00
00
11 11
00
00
11
00
11
11
00
00
11
00
11
11
00
00
11 D EFINITION 2.5. The online arborally satisfied superset
11
00
11
00
11
00
11 00
00
11
00
11 00
11
11 00
00
11 00
00 11 11
00
11
(online ASS) problem is to design an algorithm that re-
11 00
00
11 00
00
11
00
11
00
11
00
11
00
11 00
11
11 00
00
11
11 00
00 11
11
00
11
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
ceives a set of points {(s1 , 1), (s2 , 2), . . . , (sm , m)} in-
crementally. After receiving point i, the algorithm must
11
00 11 00
00
11 00
00 11 11
00
11 11
00
11
00
11
00 11
00 11
00 11
00
11
00
11
00 11
00
11
00 11
00
11
00 11
00
11
00
11
00 11
00
11
00
11
00 11
00
11
00
11
00
11
00
11
00
11 00
00
11
11 00
00 11
11
00
11
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11 00
00
11
00 11 00
00
11
11 00
00
11
00
11
00
11
00
11
11
00
11
11
00
11
00
11
00
11
00
11
00
11
00
11
00
rally satisfied. The cost of the algorithm is i=1 |Pi |.
11
00
11
00 11
00
11
00
11
00 11
00
11
00
11
00
11
00
11 00
00
11
00 11 00
00
11
11 00
00 11
11
00
11
11
00
An online BST algorithm gives an online ASS algorithm
00 11
11
11
00 00
00 11
11
11
00
11
00
11
11
00
00
11
00
11
00
00 00
11
11
00
11
00 11
00
11
00
00
11
11
00
00
11
00
11
11
00
00
11
00
11 00 11
11 00 00
11
00
11
11
00
00
11
00
11
11
00
00
11
00
11
by the standard geometric representation (Lemma 2.1). The
00 00
11
00 11
00 11
00 11
00
00 00
11
00 11
00 11
00
11
11
00
00
11
00
11
11 11
00
11
00
00
11
00
11
11
00
00
11
00
11
00
11 11
11
00
00
11
00
11
11 11
00
11
00
00
11
00
11
11
00
00
11
00
11
00
11
00
11
11
00
00
11
11 00
00
11
11 00
00 11
11
00
11
11
00
00
11
11
00
00
11
11
00
11
00
11
00
11 00
00
11
00 11 00
00
11
11 00
00
00
11
11
00
00
11
11
11
00
11
11
00
00
11
11
00
00
11
11
00
11
00
11
00
times. However, using the following interesting concept, we
00
11
11
00
00
11
00
11
11
00
00
11
will be able to “guess” the shape of the tree dynamically,
11
00
00
11
00
11
11 00
00
11
00
00
11 00
00
11
11 00
11
00
11
11 00
11
11
00
00 00
11
00
11
11
00 11
11
00
11
00
00
11
11
00
11
00
11
00
11
00
11
00
00
11
00
11
11 00
00
11
00 11 00
00
11
11 00
00
11
00
11
11 00
11
11
00
00 00
11
00
11
11
00 11
11
00
11
00
00
11
11
00
11
00
11
00
11
00
with only a constant-factor loss in the running time:
11
00
11
00 11
00
11
00 11
00
11
00 11
00
11
00
11
00 11
00 11
00 11
00
11 00
00 11 00
00 11
00 11
00 11 00
00 11 00
00 11
00 11
00
11
00
11
00
11
00
11
00
11
11 00
00 11 11
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00 11
00
11
00
11
00
11
00
11
11 00
00 11 11
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
11
00
5 Multisearch Is NP-Complete
We do not know whether minASS(X) can be computed
exactly in polynomial time when X = P (S) for an access
sequence S, so that no two points share a y coordinate. We
can show, however, that the general problem of computing
minASS(X), where the set X may have multiple points at
every y coordinate, is NP-complete. This is equivalent to the (c) Crossover gadget. (d) Not-All-Equal clause gadget.
multisearch problem described in the introduction: given a
sequence of sets S1 , S2 , . . . , Sm of elements, visit a subtree Figure 6: NP-hardness reduction from Not-All-Equal 3SAT to the
that includes all elements from S1 , then visit such a subtree offline multiaccess problem. Black dots form the input; squares are
for S2 , etc. The equivalence of Lemmas 2.1 and 2.2 carry possible points to add that satisfy the set. A wire has two equal-
over unchanged for multisearch. cost choices, the light and dark squares, representing false and true,
respectively. A variable can be represented by a wire split into a
T HEOREM 5.1. It is NP-complete to compute the minimum copy for each use. (Extra ends can be ended, taking care to balance
arborally satisfied superset of a set of points in the plane. the light and dark costs.) The shift gadget enables arbitrary fixing
of parities and negation of wires. The crossover gadget lets wires
Proof: The decision version is contained in NP by exhibiting cross. (Planar Not-All-Equal 3SAT can be solved in polynomial
a superset. Figure 6 illustrates the NP-hardness reduction time.) The Not-All-Equal clause gadget has nine squares in the
from Not-All-Equal 3SAT. 2 center (white and doubled), requiring at least d9/2e = 5 to be
added; a total of six of these squares (all three whites) must be
Unfortunately, this reduction seems quite far from being added if and only if all three doubled squares of the same color
relevant to constant-factor approximability, or the restricted have been chosen by the incident wires.
problem with one point per y coordinate.
[Iac05] J. Iacono. Key-independent optimality. Algorithmica,
42(1):3–10, 2005.
References [Knu71] D. E. Knuth. Optimum binary search trees. Acta
Informatica, 1:14–25, 1971.
[BCDI07] M. Bădoiu, R. Cole, E. D. Demaine, and J. Iacono. A [Luc88] J. M. Lucas. Canonical forms for competitive binary
unified access bound on comparison-based dynamic dictio- search tree algorithms. Tech. Rep. DCS-TR-250, Rutgers
naries. Theor. Comput. Sci., 382(2):86–96, 2007. University, 1988.
[CMSS00] R. Cole, B. Mishra, J. P. Schmidt, and A. Siegel. On the [Mun00] J. I. Munro. On the competitiveness of linear search. In
dynamic finger conjecture for splay trees. Part I: Splay sorting ESA, pages 338–345, 2000.
log n-block sequences. SIAM J. Comput., 30(1):1–43, 2000. [Pet08] S. Pettie. Splay trees, Davenport-Schinzel sequences, and
[Col00] R. Cole. On the dynamic finger conjecture for splay trees. the deque conjecture. In SODA, pages 1115–1124, 2008.
Part II: The proof. SIAM J. Comput., 30(1):44–85, 2000. [ST85] D. D. Sleator and R. E. Tarjan. Self-adjusting binary search
[DHIP07] E. D. Demaine, D. Harmon, J. Iacono, and M. Pǎtraşcu. trees. J. ACM, 32(3):652–686, 1985.
Dynamic optimality—almost. SIAM J. Comput., 37(1):240– [STT86] D. D. Sleator, R. E. Tarjan, and W. P. Thurston. Rotation
251, 2007. distance, triangulations, and hyperbolic geometry. In STOC,
[DSW05] J. Derryberry, D. D. Sleator, and C. C. Wang. A lower pages 122–135, 1986.
bound framework for binary search trees with rotations. Tech. [Sun92] R. Sundar. On the deque conjecture for the splay algo-
Rep. CMU-CS-05-187, Carnegie Mellon University, 2005. rithm. Combinatorica, 12(1):95–124, 1992.
[FLN03] R. Fagin, A. Lotem, and M. Naor. Optimal aggregation [Tar85] R. E. Tarjan. Sequential access in play trees takes linear
algorithms for middleware. J. Comput. Syst. Sci., 66(4):614– time. Combinatorica, 5(4):367–378, 1985.
656, 2003. [WDS06] C. C. Wang, J. Derryberry, and D. D. Sleator.
[Har06] D. Harmon. New Bounds on Optimal Binary Search O(log log n)-competitive dynamic binary search trees. In
Trees. PhD thesis, MIT, 2006. SODA, pages 374–383, 2006.
[Iac01] J. Iacono. Alternatives to splay trees with O(log n) worst- [Wil89] R. E. Wilber. Lower bounds for accessing binary search
case access times. In SODA, pages 516–522, 2001. trees with rotations. SIAM J. Comput., 18(1):56–67, 1989.