I feel the notion "there are countably many Turing machines" is wrong. Suppose there is a Turing machine whose input alphabet is {0}. If we replace the input alphabet {0} with {a} and replace every occurrence of "0" with "a" in the transition table, then we get another Turing machine. Obviously, these two machines are different beacause they recognize different languages, but using any one reasonable encoding sheme, they could be encoded into the same string. So claiming Turing machines are countable only by enumerating their encodings is wrong, because actually there isn't a bijection between Turing machines and their encodings. Is my opinion right?
3 Answers
You are technically right. The correct phrasing should be that there are countably many TMs up to isomorphism of the tape alphabet and the state-space.
Indeed, if you say that a TM with states $\{q,r\}$ is different than the same TM with states named $\{1,2\}$, then not only are TMs not a countable collection, they are not even a set in the ZFC axiom system. This follows from the fact that the collection of all sets is not a set itself.
- 17,814
- 1
- 41
- 67
Maybe a more straightforward illustration of the "up to isomorphism" thing: take a TM with 1 state and no transitions, then you can generate uncountably many TMs by assigning the state some subset of $\mathbb{N}$ as its label. Since you get uncountably many labels this way, you have uncountably many, obviously isomorphic TMs.
- 2,019
- 1
- 17
- 27
I believe neither of the other two answers are correct, they are falling prey to the same logical mistake : that there are
"uncountably many labels this way"
in the collection of subsets of $\mathbb{N}$.
However, only finite subsets should count. If the subset/language is finite, (or even finitely describable,) there are only countably many of them. See Wikipedia in particular: this sentence.
Theorem: The set of all finite subsets of the natural numbers is countable.
So
Indeed, if you say that a TM with states {q,r} is different than the same TM with states named {1,2}, then not only are TMs not a countable collection, they are not even a set in the ZFC axiom system.
is wrong.
The way I like to think of countable is
If every element of the set can be theoretically written down unambiguously in a large enough finite book, then the set is countable. This should be self evident:)
Examples:
The set of rationals. Every rational can be written down finitely.
The set of algebraic numbers. Every algebraic number can be described by writing out the equation along with a number and an ordering scheme to define which value is meant.(I.e $x^2=0$ has both $x=\sqrt{2}$ and $x=-\sqrt{2}$.)
So unless you are using languages that cannot be defined finitely and therefore shouldn't count, your set of Turing machines is still countable.
If anyone can think of a reason why a machine that fails this test of "finitely describable" should count in a set of Turing machines when it can't be built and run, I'd be happy to hear about it.