The power of the queue
Queues, stacks (pushdown stores), and tapes are storage models which have direct applications in compiler design and the general design of algorithms. Whereas stacks (pushdown store or last-in-first-out storage) have been thoroughly investigated and are well understood, this is much less the case for queues (first-in-first-out storage). In this paper we present a comprehensive study comparing queues to stacks and tapes. We address off-line machines with a one-way input. In particular, 1 queue and 1 tape (or stack) are not comparable:
(1) Simulating 1 stack (and hence 1 tape) by 1 queue requires Ω(n4/3/logn) time in both the deterministic and the nondeterministic cases.
(2) Simulating 1 queue by 1 tape requires Ω(n2) time in the deterministic case, and Ω(n4/3/logn) in the nondeterministic case;
We further compare the relative power between different numbers of queues:
(3) Nondeterministically simulating 2 queues (or 2 tapes) by 1 queue requires Ω(n2/(log2n loglogn)) time and deterministically simulating 2 queues (or 2 tapes) by 1 queue requires Ω(n2) time. The second bound is tight. The first is almost tight.
(4) We also obtain the simulation results for queues: 2 nondeterministic queues (or 3 pushdown stores) can simulate k queues in linear time. One queue can simulate k queues in quadratic time.
KeywordsTuring Machine Input Tape Length Prefix Input Head Work Tape
Unable to display preview. Download preview PDF.
- [Aa]Aanderaa, S.O., "On k-tape versus (k-1)-tape real-time computation," in Complexity of Computation, ed. R.M. Karp, SIAM-AMS Proceedings, vol. 7, pp. 75–96, American Math. Society, Providence, R.I., 1974.Google Scholar
- [BGW]Book, R., S. Greibach, and B. Wegbreit, "Time-and tape-bound Turing acceptors and AFL's," J. Computer and System Sciences, vol. 4, pp. 606–621, 1970.Google Scholar
- [Ch]Chaitin, G.J., "Algorithmic Information Theory," IBM J. Res. Dev., vol. 21, pp. 350–359, 1977.Google Scholar
- [DGPR]Duris, P., Z. Galil, W. Paul, and R. Reischuk, "Two nonlinear lower bounds for on-line computations," Information and Control, vol. 60, pp. 1–11, 1984.Google Scholar
- [GKS]Galil, Z., R. Kannan, E. Szemeredi, “On nontrivial separators for k-page graphs and simulations by non-deterministic one-tape Turing machines,” in Proceedings 18th Annual ACM Symposium on Theory of Computing, 1986.Google Scholar
- [HS1]Hartmanis, J. and R.E. Stearns, "On the computational complexity of algorithms," Trans. Amer. Math. Soc., vol. 117, pp. 285–306, 1969.Google Scholar
- [HS2]Hennie, F.C. and R.E. Stearns, "Two tape simulation of multitape Turing machines," J. Ass. Comp. Mach., vol. 4, pp. 533–546, 1966.Google Scholar
- [HU]Hopcroft, J.E. and J.D. Ullman, Formal Languages and their Relations to Automata, Addison-Wesley, 1969.Google Scholar
- [Kl]Klawe, M., "Limitations on explicit construction of expanding graphs," SIAM J. Comp., vol. 13, no. 4, pp. 156–166, 1984.Google Scholar
- [Ko]Kolmogorov, A.N., "Three approaches to the quantitative definition of information," Problems in Information Transmission, vol. 1, no. 1, pp. 1–7, 1965.Google Scholar
- [Li1]Li, M., "Simulating two pushdowns by one tape in O(n**1.5 (log n)**0.5) time," 26th Annual IEEE Symposium on the Foundations of Computer Science, 1985.Google Scholar
- [Li2]Li, M., "Lower Bounds in Computational Complexity," Ph.D. Thesis, Report TR-85-663, Computer Science Department, Cornell University, march 1985.Google Scholar
- [Li3]Li, M., "Lower bounds by Kolmogorov-complexity", 12th ICALP, Lecture Notes in Computer Science, 194, pp. 383–393, 1985.Google Scholar
- [LV]Li, M. and P.M.B. Vitanyi, "Tape versus queue and stacks: The lower bounds," Submitted for publication.Google Scholar
- [LS]Leong, B.L. and J.I. Seiferas, "New real-time simulations of mul-tihead tape units," J. Ass. Comp. Mach., vol. 28, pp. 166–180, 1981.Google Scholar
- [Ma]Maass, W., "Combinatorial lower bound arguments for deterministic and nondeterministic Turing machines," Trans. Amer. Math. Soc., 292,2, pp. 675–693, 1985. (Preliminary Version “Quadratic lower bounds for deterministic and nondeterminstic one-tape Turing machines,” pp 401–408 in Proceedings 16th ACM Symposium on Theory of Computing, 1984.)Google Scholar
- [PSS]Paul, W.J., J.I. Seiferas, and J. Simon, "An information theoretic approach to time bounds for on-line computation," J. Computer and System Sciences, vol. 23, pp. 108–126, 1981.Google Scholar
- [Pa]Paul, W.J., "On-line simulation of k+1 tapes by k tapes requires nonlinear time," Information and Control, pp. 1–8, 1982.Google Scholar
- [Vi1]Vitányi, P.M.B., "One queue or two pushdown stores take square time on a one-head tape unit," Computer Science Technical Report CS-R8406, CWI, Amsterdam, March 1984.Google Scholar
- [Vi2]Vitányi, P.M.B., "An N**1.618 lower bound on the time to simulate one queue or two pushdown stores by one tape," Information Processing Letters, vol. 21, pp. 147–152, 1985.Google Scholar
- [Vi3]Vitányi, P.M.B., "On two-tape real-time computation and queues," J. Computer and System Sciences, vol. 29, pp. 303–311, 1984.Google Scholar