Abstract

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 Ω(n 4/3/logn) time in both the deterministic and the nondeterministic cases.(2) Simulating 1 queue by 1 tape requires Ω(n 2) time in the deterministic case, and Ω(n 4/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 Ω(n 2/(log2 n loglogn)) time and deterministically simulating 2 queues (or 2 tapes) by 1 queue requires Ω(n 2) 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 MachineInput TapeLength PrefixInput HeadWork TapeThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call