3

Does there exist a non-recursive language, L, such that the cardinality of L is uncountable?

I would really like an explanation as to why this question is true or false because at the moment, I have no idea. My understanding is that all recursive languages have to be countable since the set of all finite strings is countable. But I'm not sure if there is a non-recursive language which is uncountable. Any help would be greatly appreciated,

Raphael
  • 73,212
  • 30
  • 182
  • 400

2 Answers2

7

Definition: a word over an alphabet $A$ is a finite sequence of elements of $A$.
Definition: a language over an alphabet $A$ is a set of words over $A$.

With these definitions, if $A$ is a finite set, then any language is countable (either finite, or countably infinite). This is because any language is a subset of the complete language $A^*$ (set of words over $A$).

Direct proof sketch: you can enumerate all the words in the language, in order of increasing length (and in lexicographic order for each given length, having defined an order of $A$). This process is well-defined because set of words of a given length is finite. This process assigns an index to all the words in the language because all words have a finite length.

Follow-up exercise: if $A$ is countably infinite then a language over $A$ is countable. Adapt the proof above (change the enumeration order to cover the whole language in finite batches).

Gilles 'SO- stop being evil'
  • 44,159
  • 8
  • 120
  • 184
2

Per your comment, you say a language is a collection of words of finite length. So you can encode each word as a natural number (for example interpret is as an integer in base size-of-your-alphabet). As you've just assigned a number to each element of your set, your set is countable.

adrianN
  • 5,991
  • 19
  • 27