Use . The context-free grammar generates exactly , so it is a context-free language. It is not a regular language: if is a pumping length, any allowed decomposition of has a nonempty pumped segment consisting only of 's. Pumping down leaves fewer 's than 's, contradicting the pumping lemma for regular languages. Thus is a context-free language but not a regular language.
Use . A halting algorithm checks that a word consists of three consecutive blocks in the correct order and compares their lengths, so is a decidable language. If it were a context-free language, apply the pumping lemma for context-free languages to . The segment containing both pumped pieces has length at most , so it cannot meet both the and blocks. Pumping down therefore changes at least one block count but leaves another equal to , or destroys the required block order. Either way the resulting word is not in , a contradiction. Thus is a decidable language but not a context-free language.
Fix an effective numbering of Turing machines and use the diagonal halting setIt is computably enumerable: dovetail all the computations and output each index when its computation halts. It is not a recursive set. Otherwise a machine could, on input , loop if the alleged decider says and halt otherwise. Applying this machine to its own index contradicts either answer. Hence is computably enumerable but not a recursive set.
With the diagonal halting set , defineIf were computably enumerable, its odd-index inverse image would make computably enumerable. If were computably enumerable, its even-index inverse image would do the same. But a set and its complement being computably enumerable would make the set a recursive set: run the two enumerations in parallel until the input appears in one. This contradicts the undecidability of . Thus neither nor its complement is computably enumerable.
Articles by others on the same topic
There are currently no matching articles.