Is $\{\langle M \rangle \mid \exists K \forall w\; \text{M(w) halt with less than K steps}\} \in RE$?

59 Views Asked by At

Is $L=\{\langle M \rangle \mid \exists K \forall w\; \text{M(w) halt with less than K steps}\} \in RE$ ?

I can prove that $L \notin coRE$, but I don't know what to do about $RE$...

($L \in coRE \Rightarrow \overline{L} \in RE$
By find reduction $f$ from $\overline{HP}$ to $\overline{L}$ we show that $L \notin coRE$.
Let $f(M,w)=M_w$ such that for each input $x$, $M_w$ do:
1. Run M with input w
2. Accept
With this function $\langle M,w \rangle \in \overline{HP} \Leftrightarrow M_w \in \overline{L}$ )

1

There are 1 best solutions below

1
On BEST ANSWER

Hint. Whether $M$ halts in less than $K$ steps can only depend on the first $K$ symbols of the input -- the machine will not have time to move further right anyway. So for each $K$ it is enough to check whether $M$ halts quickly for every $w$ of length $\le K$.