3

Is this language decidable? {M | M accepts some x in less than |x| steps}

It feels like it should be undecidable but I can't think of a good proof that isn't similar to that of Rice's theorem (which I don't think applies here because this isn't a property of a language). Does rice's apply? Or is there a way to decide this?

Nathaniel
  • 18,309
  • 2
  • 30
  • 58

2 Answers2

2

Rice's theorem doesn't apply because your language isn't semantic. Let's call your language $L$, and assume that both $M_1$ and $M_2$ accept $\Sigma^*$ for some input alphabet $\Sigma$. $M_1$ directly accepts all inputs, but $M_2$ always reads the whole string and then accepts. Then $L(M_1) = L(M_2)$ but $\langle M_1 \rangle \in L$ whereas $\langle M_2 \rangle \notin L$.


Remember, that $$A_\varepsilon = \{\langle M \rangle : M \text{ is a TM that accepts } \varepsilon\}$$

is undecidable. We now try to show that $A_\varepsilon \leq_m L$, from which follows that $L$ must be undecidable as well.

Proof:

For a TM $M = (Q, \Sigma, \Gamma, \delta, q_0, F)$ define $M' = (Q, \Sigma', \Gamma', \delta', q_0, F)$, where

  • $\Sigma' \cap (\Sigma \cup \Gamma) = \emptyset$,
  • $\Gamma' := \Sigma' \cup \Sigma \cup \Gamma$, and
  • $\delta'(q, a) = \begin{cases} \delta(q, \square) & \text{if } a \in \Sigma' \\ \delta(q, a) & \text{otherwise} \end{cases}$, where $\square \in \Gamma$ denotes the blank symbol.

$M'$ essentially behaves like $M$, except that it ignores all of it's input characters, it treats them like $\square$. So the computation of $M'$ on any input is basically the same as $M$ on $\varepsilon$.

Now, if $M$ accepts $\varepsilon$ in $n$ steps, then $M'$ accepts every word $x \in \Sigma'^{n + 1}$ in $n$ steps as well. If $M$ doesn't accept $\varepsilon$, then $M$ accepts nothing. Therefore

$$\langle M \rangle \in A_\varepsilon \iff \langle M' \rangle \in L$$

which implies that $A_\varepsilon \leq_m L$.

Knogger
  • 2,049
  • 3
  • 15
0

There is a notion of Time constructible functions $T: \mathbb{N}\rightarrow \mathbb{N}$ that requires a restriction of $T(n)\leq n$. This is usually encountered while Turing machines are first defined in textbook (page 16, Arora & Barak).

The key idea is to allow a Turing machine to atleast read the input string $x$. This will require atleast $|x|$ steps. After that the machine may either output 0 or 1 as result.

As per OP,

{M | M accepts some x in less than |x| steps}

The Turing machine is not given enough time to read the input.

108_mk
  • 177
  • 2
  • 11