Time-bounded decision on the word RAM #
Time bounds and input encodings may depend on word size. A predicate allowed : α → ℕ → Prop
selects admissible input/width pairs. WordSizeDependentProgram selects code using only width,
with a fixed register count. DecidableInTime requires one instruction-list length bound for all
widths. Literal values may depend on width. Code selection and the input encoding are uncharged.
UniformDecidableInTime uses one fixed program, which may read the width, branch on it,
and have width-dependent execution time.
All contracts are conditional on InputFits. Empty conditions or inputs that never fit can make
them vacuous. A logarithmic lower threshold is not an input-fit certificate: word-count size alone
does not bound input words. An input-dependent width schedule can communicate advice. No effective
code/encoding selection or identification with Turing-machine complexity is asserted.
Main definitions #
WordSizeDependentProgram: code selected by word size, with a fixed register count.WordSizeDependentProgram.BoundedCode: one instruction-list length bound for every word size.DecidableInTime,UniformDecidableInTime: nonuniform and uniform instruction bounds.DecidableInTimeLogWord,UniformDecidableInTimeLogWord: transdichotomous word-size conventions.DecidableInO,UniformDecidableInO: asymptotic time with constants shared by all widths.LinearTime,PolynomialTime,UniformLinearTime,UniformPolynomialTime: size-based classes.
Main results #
UniformDecidableInTime.decidableInTime: constant families give nonuniform certificates.WordSizeDependentProgram.DecidesInTime.mono: increase time and restrict admissible widths.WordSizeDependentProgram.DecidesInTime.of_inputFits: discharge input fitting with a certificate.LinearTime.polynomialTime,UniformLinearTime.polynomialTime: linear time is polynomial.fits_of_lt_pow: polynomially bounded values fit logarithmic words.
References #
- T. H. Cormen et al., Introduction to Algorithms
- M. L. Fredman and D. E. Willard, Surpassing the information theoretic bound with fusion trees
- MIT–ULB CompGeom Group, Undecidability of tiling with a tromino; the fixed-program decision predicate is adapted from its accompanying Lean formalization.
Answering a question #
A program that does not read the word size answers in the same way at every larger word size.
Word sizes and program families #
The word size k (⌊log₂ n⌋ + 1), taking one digit at zero.
Instances For
A big-O bound on a natural-valued width schedule is an eventual upper-width condition
with a fixed positive natural multiplier. Swapping width and bound expresses a big-Omega
bound, as bound n ≤ k * width n; the reciprocal lower constant need not be integral.
Code selected using only word size, with a fixed finite register file.
Instances For
One instruction-list length bound works at every width. Literal values may depend on width; no computability or construction cost for selecting code is asserted.
Instances For
The constant family associated to a uniform program.
Instances For
Constant families have bounded code.
A family answers correctly within a width-dependent bound on every admitted fitting input. The raw contract does not impose a code-length bound.
Instances For
Increase time and restrict admitted input/width pairs.
A fit certificate removes the conditional input-fit premise.
Evaluate a family contract along any admitted width schedule.
Transfer without a charged conversion when the encoded input words agree.
One fixed program answers correctly at every admitted fitting width. Reading word size is allowed; uniformity concerns code selection, not the runtime or execution path.
Instances For
Nonuniform decision: width selects code, with one register count and one code-length bound shared by every width. The time bound and encoding may depend on width.
Instances For
Increase time and restrict admissible widths for a fixed program.
A fixed program gives a bounded nonuniform family.
Increase time and restrict admitted widths without changing code.
Increase time and restrict admitted widths for a uniform certificate.
Transfer nonuniform decision along a map preserving encoded words.
Transfer uniform decision along a map preserving encoded words.
The transdichotomous word-size assumption and asymptotic time #
Nonuniform decision under the transdichotomous word-size assumption: every fitting width above some positive multiple of the logarithmic input size is admitted. This lower threshold is not an input-fit guarantee.
Instances For
Uniform decision under the transdichotomous word-size assumption. The fixed program may read the width and have width-dependent execution time.
Instances For
A uniform logarithmic-threshold certificate is nonuniform as well.
Asymptotic nonuniform time T n w. Correctness holds on every admitted fitting input;
one positive constant and one size threshold bound the runtime at all admitted widths.
Instances For
Uniform asymptotic time, with correctness on all admitted fitting inputs and one eventual runtime estimate shared by every width.
Instances For
Uniform asymptotic decision implies nonuniform asymptotic decision.
Linear and polynomial time #
Uniform linear time implies nonuniform linear time.
Uniform polynomial time implies nonuniform polynomial time.
Linear time is polynomial time, using the same family.
Uniform linear time is uniform polynomial time, using the same program.
Linear time transfers without charged conversion when words and sizes agree.
Uniform linear time transfers when words and sizes agree.
Polynomial time transfers when words and sizes agree.
Uniform polynomial time transfers when words and sizes agree.