4

That is, can you build a Turing Machine that, if given a Turing Machine as input, can decide (or at least recognize) if the inputted Turing Machine has an infinite number of strings in its language?

Similarly, can you recognize or decide if a Turing Machine has an uncountably-infinite language?

Raphael
  • 72,336
  • 29
  • 179
  • 389
user3605801
  • 141
  • 1
  • 2
  • 4
    Hint for the first part: diagonalization / Rice's theorem. Hint for the second part: all languages are countable. – Yuval Filmus May 05 '14 at 23:41
  • Thanks for the hints, but could you elaborate a bit more? 1) How can we use diagonalization to prove part 1 (we didn't learn Rice's Theorem in class) and 2) Suppose a language has 3 characters in it. Then wouldn't the size of the language be 3^N (where N refers to the natural numbers), which is uncountably infinite? – user3605801 May 06 '14 at 00:12
  • ^ What makes languages countably infinite is that they only contain finite strings. In this light, it doesn't matter how large $\Sigma$ is; $\Sigma^*$ will be countably infinite, not uncountable. – Guildenstern May 06 '14 at 00:18
  • Ok thanks that makes sense; I think I buy part 2. But what about part 1? I'm guessing it's both unrecognizable and undecidable because we cannot possibly test all strings. – user3605801 May 06 '14 at 00:25
  • For part 1, you have to use diagonalization, which is the technique you used to prove that the halting problem is undecidable. You take it from here. – Yuval Filmus May 06 '14 at 01:10
  • 1
    What have you tried? Where did you get stuck? We want to help you with your specific problems, not just do your (home-)work. However, as it is we don't know what this problem is and thus how to help. See here for a relevant discussion. If you are uncertain how to improve your question, why not ask around in [chat]? – Raphael May 06 '14 at 06:45
  • Hint: Part 1 can also be solved by reduction. – Raphael May 06 '14 at 06:46
  • 1
    @Guildenstern Assuming $\Sigma$ is countable, but that's of course the usual assumption. ;) – Raphael May 06 '14 at 06:46
  • I think it can't. How could you determine that without falling in The Halting Problem? If you have a certain alphabet Σ, yielding potentially infinite strings implies yielding a potentially infinite string, and it implies determining whether there's a condition to halt, or not. – Luis Masuelli May 06 '14 at 16:13

1 Answers1

1

To elaborate somewhat on Yuval's comment:

(1) Some languages have an infinite number of strings, some do not. This makes the property non-trivial, and Rice's theorem says that recognizing whether the language of a Turing Machine has a non-trivial property is undecidable. This problem is undecidable.

(2) All languages are countable; none are uncountable. This makes the property trivial. Deciding whether the language of a TM has a trivial property is always decidable: if it's a property all languages have, then answer yes; if it's a property no languages have, answer no.

(A word of general caution, though it doesn't apply here. Rice's theorem applies only to properties of languages themselves, not properties of the TMs that might accept them. This is an important distinction. Rice's theorem only works for properties that have to do with the language and strings it contains.)

For reference: Rice's Theorem

Patrick87
  • 12,824
  • 1
  • 44
  • 76
  • Don't know what's Rice theorem but I thought immediately about The Halting Problem XD. – Luis Masuelli May 06 '14 at 16:14
  • 1
    Even worse, the language of TM descriptions $\langle X\rangle$ for which $L(X)$ is infinite is unrecognizable. – Rick Decker May 08 '14 at 00:54
  • Given a solution to the halting problem in hand, I still can't see how to solve it. (In general Rice's theorem means less than we like because we can avoid all of its bad implications by constraining the domain to Turing machines that halt.) – Joshua Oct 19 '15 at 16:14