0

I want to ask about a turing-machine-like construct with an infinite number of states. in this post the claim is that every language is accepted: Can a Turing machine have infinite states?

I understand that we can scan over the input from left to right once, and end up at a unique state for each possible input string. but what if the language is a description like HALT' = {< M,w >|M don't halt on w}, can we know what input in our language? how can we know the encodes that not in our language? how can we know M wont halt on w in the first place?

In addition, can we decide any language with such a machine or just accept any language? for example can we decide HALT = {< M,w >|M halt on w} ?

yaniv
  • 1
  • 1

1 Answers1

2

You can decide any language in linear time. Given a language $L \subseteq \Sigma^*$, consider the following Turing machine:

  • Create a state for every word $w \in \Sigma^*$ and pick the tape alphabet $\Gamma$ as $\Sigma \cup \{ \bot \}$, where $\bot$ denotes the blank symbol. The initial state is $\varepsilon$.
  • When you read an alphabet symbol $\alpha \in \Sigma$ transition from the current state $w$ to $w\alpha$ and move right.
  • When you are in a state $w$ and you read $\bot$ move to an accepting state if $w \in L$ and to a rejecting state otherwise.
Steven
  • 29,724
  • 2
  • 29
  • 49