Constant time factors do matter

The constant speedup theorem, so well known from Turing machine based complexity theory, is shown false for a natural imperative programming language I that manipulates tree-structured data. This relieves a tension between general programming practice, where linear factors are essential, and complexity theory, where linear time changes are traditionally regarded as trivial. Specifically, there is a constant b such that for any a > 0 there is a set X recognizable in time a · b · n but not in time a · n. Thus LIN, the collection of all sets recognizable in linear time by deterministic I-programs, contains an infinite hierarchy ordered by constant coefficients. Constant hierarchies also exist for larger time bounds T (n), provided they are time-constructable. Second, a problem is exhibited which is complete for the nondeterministic linear time sets NLIN with respect to a natural notion of deterministic linear-time reduction. Third, Kleene’s Second Recursion Theorem in essence shows that for any program p defined with self-reference, there is an equivalent nonreflexive program q. This is proven for an extension I↑ of I. Further, q can be simulated by an I program at most constantly slower than p. Language I↑ allows calls to the language’s own interpretation function, and even to its running time function (without the usual high costs for nested levels of interpretation). The results all hold as well for a stronger language I allowing selective updating of tree-structured data. The results are robust in that classes LIN and NLIN are identical for I , Isu↑, Schonhage’s Storage Modification Machines, Knuth/Tarjan’s pointer machines, and successor RAMs [13,14,11]. where n is the size of the input. DIKU, Department of Computer Science, University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen East, Denmark, E-mail: neil@diku.dk. If the “more realistic and precise measure” of SMM computation time is used [13], and similarly for the other models.