Question: 2. Design a deterministic finite-state automaton (DFA) that accepts exactly the strings over the alphabet {A, B,...,Z} that contain at least one D or I,

2. Design a deterministic finite-state automaton (DFA) that accepts exactly the strings over the alphabet {A, B,...,Z} that contain at least one D or I, and where the letters A and P are not found next to one another. For instance, your DFA should accept the strings VADER ANAKIN DEATHSTAR LIGHTSABER but not the strings LUKE (there is D or I) PALPATINE (A and P appear together) APPLE (there is no D or I, and A and P appear together) Clearly indicate the meaning of each state. Hint: there are two separate conditions accepted strings must meet; states will need to encode whether or not they are met. Our solution uses 7 states
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
