We have a language W over the alphabet {a,b,c,d,e,f,g} that is defined by, starting with :
<A> ::= <A> <Z> 'c' | <A> <X> 'd' | 'b'
<Z> ::= <Y'> 'e' <Z> | ''
<Y'> ::= 'f' | 'g'
<X> ::= <X> 'a' | 'e'
What are the rules when it comes to make a DFA that regocnizes the complement language of W? With other words a DFA that recognizes all the string over the given alphabet that is not in W.
I have attempted it and from what I have read it says that the complement language of a given language in a DFA is just to change the accepting states to non accepting states and then you are good, but i cant seem to correctly understand the transitions between the different states.
What you list is a grammar and not a DFA, and finding a grammar for the complement of a regular language is not quite as immediate as finding a DFA for the complement given a DFA for the language.
If you have a DFA M for language L, the then to construct a DFA M' for the complement L' of L, you do just swap the accepting states to non-accepting and vice versa... so M' is defined as:
If you want a grammar for the complement, you can: