Constructible function
Concept in complexity theory
- 2 min read
- 4 chapters
Related on Lably
Through Natural number, Turing machine and Big O notation
Time-constructible
Let the Turing machine be defined in the standard way, with an alphabet that includes the symbols . It has a standard input tape containing zeros except for an input string. Let denote a string composed of ones. That is, it's the unary representation of . Let be the binary representation.
A function is called time-constructible if there exists a Turing machine such that the computation halts in steps with value .
This definition may use instead, since the two can be interconverted in steps.
Fully time-constructable
There is also a notion of a fully time-constructible function.
A function is called fully time-constructible if there exists a Turing machine , such that for all but finitely many , halts in exactly steps. This definition is slightly less general than the first, but for most applications, either definition can be used. The following equivalence theorem shows that these two concepts are equivalent for most functions used in practice:
Theorem. If is a function such that there exists such that, for all but finitely many , (that is, if ), then is time-constructible if and only if it is fully time-constructible.
Sign in to keep reading
3 more chapters are free with a Lably account.
Space-constructible
A function is called space-constructible if there exists a Turing machine such that halts with value (or equivalently ), while using space.
Equivalently, is called space-constructible if there exists a Turing machine , such that for all but finitely many , the computation halts in a configuration in which exactly cells are not blank, and no other cell has been written to during its operation. This is sometimes called "fully space-constructible". However, the two definitions are equivalent.
Properties
All the commonly used functions (such as ) are time- and space-constructible, as long as . The construction is straightforward. For example, is constructed by one nested for-loop, while is constructed by two nested for-loops, etc.
If is time-constructible, then it is eventually constant, since otherwise there is insufficient time to read the entire input.
is space-constructible even though .
For every computable function , there is a computable function that is time constructible and .
Applications
Time-constructible functions are used in results from complexity theory such as the time hierarchy theorem. They are important because the time hierarchy theorem relies on Turing machines that must determine in O(f(n)) time whether an algorithm has taken more than f(n) steps. This is, of course, impossible without being able to calculate f(n) in that time. Such results are typically true for all natural functions f but not necessarily true for artificially constructed f. To formulate them precisely, it is necessary to have a precise definition for a natural function f for which the theorem is true. Time-constructible functions are often used to provide such a definition.
Space-constructible functions are used similarly, for example in the space hierarchy theorem.

