DFA Machine Simulator
Language that accepts binary strings containing 00 or 11.
L = {xyyz | x,z ∈ {0,1}*, y ∈ {0,1}}
DFA Diagram
q3 is the accepting state
0
1
1
0
1
0
0,1
q0start
q1last symbol = 0
q2last symbol = 1
q3found 00 or 11
Test a String
Only symbols 0 and 1 are allowed.
Result will appear here.
Transition Table
| Current State | Input 0 | Input 1 |
|---|---|---|
| q0 | q1 | q2 |
| q1 | q3 | q2 |
| q2 | q1 | q3 |
| q3 | q3 | q3 |
Step-by-Step Trace
No trace yet. Click Analyze String.
Easy explanation:
The machine only needs to remember the previous symbol. If the previous symbol and current symbol are the same, it means the string contains 00 or 11, so the machine moves to q3 and accepts.