Similar questions 2 more →
Other / Mixed Topics

Answer & solution
Official answer: B
1. A set is countable if its members can be listed using natural-number indices. Finite strings over any finite alphabet can be listed by length and then lexicographic order, so their collection is countable.
2. Each Turing machine has a finite description. There are therefore only countably many such machines and only countably many languages they recognize. Every recursively enumerable language is recognized by a machine, so S1 is countable.
3. Each C program is also a finite string. Restricting the countable set of all strings to those obeying C syntax cannot make it uncountable, so S2 is countable.
4. The set {0,1}* of words is countably infinite, but a language is an arbitrary subset of that set. Its power set is uncountable by Cantor's theorem. Hence S3 is uncountable; confusing words with sets of words is the main trap.
5. Regular languages have finite automaton descriptions, so there are only countably many of them. If S4 were countable too, all languages would be a union of two countable sets, contradicting step 4. Thus S4 is uncountable and the answer is B.