∑ = {a, b}
Answer:
When language starts with ‘NOT’ then the negation machine is quite difficult to design in that case we use the complement of the given language.
Not Start with ‘a’ or not end with ‘b’.
Complement of machine:
Start with a and end with b [At complement Not is remove and ‘OR’ replace with AND]
Now we design a machine for Start with a and end with b.
Now to get the original machine of Not Start with ‘a’ or not end with ‘b’ complement the above machine i.e. machine of .
Procedure to complement a machine:
Change all non-final states to final states and corresponding final states to non-final states of the machine. All the moves and directions of the machine remain the same.
Example:
So, complement the machine to get the desired machine of Not Start with ‘a’ or not end with ‘b’.
= {λ, a, b…..}
Regular Expression L = λ + b(a + b)* + (a + b)* a
Grammar of
S → aA | bC | λ
A → aA | bB | λ
B → bB | aA
C → aA | bC | λ
Note: Complement of DFA is possible but complement is not possible for NFA.