0

Is the complement of a non regular language always a recursive language?

I understand that 1.context-free languages are not closed under complement. 2.recursive enumerable languages are not closed under complement. 3.recursive languages are indeed closed under complement.

But how can I answer the initial question using these facts? How can I tell if a non regular language is recursive or not?

Wanderer
  • 253
  • 1
  • 12

1 Answers1

0

No, the complement of a non-regular language is not always recursive. A counterexample is the halting problem, whose complement (all programs that do not stop) is non-regular. Thus, the halting problem itself, which is not recursive (but recursively enumerable) is the complement of a non-regular language. (I think the mentioned facts wont help you with that problem.)

In general, if you want to show that a problem is not recursive, you have to reduce a non-recursive language (for example the halting problem) to it. If you want to show that is is recursive, you have to show that there is a Turing machine that decides it (accepts it and stops on every input).