5

Take a semi-decidable problem and an algorithm that finds the positive answer in finite time. The run-time of the algorithm, restricted to inputs with a positive answer, cannot be bounded by a computable function. (Otherwise we’d know how long to wait for a positive answer. If the algorithm runs longer than that we know that the answer is no and the problem would be solvable.)

My question is now: Can such an algorithm still have a, say, a run-time bound linear (polynomial, constant,...) in the input size, but with an uncomputable constant? Or would that still allow me to decide the problem? Are there example?

chazisop
  • 158
  • 7

2 Answers2

7

For your sketched decision algorithm to work, it is sufficient that the run-time is majorized by a computable function. Every linear function $n \mapsto c\cdot n$ even for non-computable c is majorized by a computable function, viz., $n \mapsto \lceil c \rceil \cdot n$. Thus the answer to the question is no: a semi-decision procedure for an undecidable problem cannot have linear run-time (or a run-time majorized by any computable function.)

Jan Johannsen
  • 408
  • 3
  • 10
3

No, you cannot bound it. Assume you have a characterization of your bound, in terms of a function. That can be a polynomial, exponential, linear etc. We will denote that function by $f(n)$. Since we work on a deterministic setting, we can define an appropriate class $DTIME(f(n))$. Here note that we get a bound on the number of steps which will be a natural number whereas the bound might be not. We can get past such technicalities as @Jan Johannsen describes in his post. What is important is that all deterministic classes are closed under complement, thus all problems in them are decidable. Thus, so will be the semi-decidable problem under consideration, a contradiction.

chazisop
  • 158
  • 7