Turing Machine halts for at least $1024$ strings as input

471 Views Asked by At

Consider the language $$L = \{\text{"}M\text{"} \mid \text{Turing Machine } M \text{ halts for at least }1024\text{ input-strings}\}.$$

Is L a recursively enumerable language?

My answer is no based on the definition of a recursively enumerable language. But is it so simple? Any "better"(and mathematical) way to prove it?

2

There are 2 best solutions below

13
On

"Based on the definition of a recursively enumerable language" isn't a proof - why do you think that the answer is no?

In fact, the answer is yes - we can indeed recursively enumerate all the codes for machines which halt on at least $1024$-many strings. Do you see how to do this? (HINT: First see why we can enumerate the codes for machines which halt on at least one string, then generalize.)


As a further hint, the "at least" here is crucial: the set of codes for machines which halt on exactly $1024$-many strings is not r.e.

0
On

It is definitely r.e.

At step $\langle M,n,k\rangle$ enumerate $M$ if Turing machine $M$ halts in $n$ steps for $1024$ inputs less than $k$.

Then any $M$ which halts for at least 1024 inputs will be enumerated.