Documentation

CslibFrontier.Computability.Complexity.Classes.Hierarchy

A decidable problem outside P #

The clocked diagonal Cslib.Complexity.clockedDiagonal J reads a description of a machine framed at the start of its input x (Turing.MultiTapeTM.Universal.decodeDesc), runs the described machine on the whole of x, symbol by symbol under the fixed coding false ↦ 0, true ↦ 1, for J x.length steps with the universal function, and negates the verdict: it returns false exactly when the described machine has halted with output [true] by then. The diagonal function Cslib.Complexity.diagonal is the clocked diagonal with clock 2 ^ n; other clocks give the time hierarchy theorem in CslibFrontier.Computability.Complexity.Classes.Hierarchy.Time.

The diagonal is itself computed, by one fixed machine, within time O(2 ^ (4 * n)) and space O(2 ^ (2 * n)) on inputs of length n (Cslib.Complexity.computableInO_diagonal). The bound charges decoding, converting the input to symbols through the universal input-coding API, writing the clock 2 ^ n in binary, the universal run and the final test. The universal run dominates, within time polynomial in n times 2 ^ (3 * n) and space polynomial in n times 2 ^ n, and one more factor 2 ^ n absorbs the polynomials. The exponents are deliberately loose.

No machine computing a Boolean function in polynomial time decides the diagonal problem, by the diagonal argument of the time hierarchy theorem Arora and Barak, Theorem 3.1. Its description, padded to a length where the machine halts within the exponential clock, is an input on which the diagonal returns the negation of the machine's answer (Cslib.Complexity.diagonal_notMem_P). The argument uses only that the machine halts with its answer within a polynomial time bound, so it applies to plain, not necessarily tidy, machines as well (Cslib.Complexity.not_computableInTimeAndSpace_diagonal). Together, the problem decided by an explicit exponential-time computation is not in P. No time-bounded classes are defined here.

Main definitions #

Main results #

References #

The padded diagonal argument follows the original Complexitylib's Classes/Hierarchy and UTM/Diagonal (Samuel Schlesinger), here on the native universal interpreter of Christian Reitwiessner.

The output test of the diagonal on a result of the universal function: false exactly when the simulated machine has halted with output [true], under the coding Turing.MultiTapeTM.Universal.eBit.

Instances For

    The diagonal with clock J. Run the machine described at the start of x on x, under the coding Turing.MultiTapeTM.Universal.eBit of bits by 0 and 1, for J x.length steps, and return false exactly when it has halted with output [true].

    Instances For

      The diagonal function, the clocked diagonal with clock 2 ^ n: run the machine described at the start of x on x for 2 ^ x.length steps, and return false exactly when it has halted with output [true].

      Instances For

        The diagonal is the clocked diagonal with clock 2 ^ n.

        The diagonal argument. No finite binary machine halts within a polynomially bounded time t x with output [diagonal x] on every input x: on its own description, padded beyond the polynomial, it would answer the negation of its answer.

        The diagonal problem is not in P, by the diagonal argument of the time hierarchy theorem Arora and Barak, Theorem 3.1.

        No plain machine computes the diagonal in polynomial time: the separation does not depend on tidy normal forms.

        The resources of the diagonal #

        The diagonal is decidable in exponential time, within time O(2 ^ (4 * n)) and space O(2 ^ (2 * n)) on inputs of length n, charging decoding, the symbols, the clock, the universal run and the test.