If a language X regular, then is the complement of X also a regular language? If yes, then thank you, else can you please explain why
Asked
Active
Viewed 106 times
0
-
2I truly hope this was covered in class. – Yuval Filmus Aug 05 '17 at 22:11
-
1The body of your question doesn't match the title or the tags. Please edit to fix. – D.W. Aug 06 '17 at 04:53
-
https://cs.stackexchange.com/q/13282/755 – D.W. Aug 06 '17 at 04:55
-
@YuvalFilmus how is your comment constructive? If you are not answering the question, what is the point of leaving a comment there? what are you trying to achieve? – nikolaevra Aug 07 '17 at 13:54
-
This is truly bog-standard fare in a first course in automata theory. You should have seen this in class. If not, it is covered (under "closure properties of regular languages") all over the place. – vonbrand Mar 27 '20 at 17:13
1 Answers
1
Yes, the complement of a regular language is regular. If $L$ is regular then there is a DFA accepting that language. In particular, its states can be classified as ACCEPTING states and non-ACCEPTING states. Just turn non-ACCEPTING states into ACCEPTING, and ACCEPTING states into non-ACCEPTING states and you will have a DFA accepting $\overline{L}$.

fade2black
- 9,827
- 2
- 24
- 36
-
1Thank you for the answer, and for explaining how to create a complement of a language (I was thinking of a similar solution, but wasn't 100% sure) – nikolaevra Aug 07 '17 at 13:56