Finite State Automation (DFA) Starts With |Examples|
1. Construct finite state automation (DFA) that starts with 'abb'.
Solution :Σ: inputs = {a, b}
q0 = initial state
q1 = string starts with a
q2 = string starts with ab
q3 = string starts with abb
Q: set of all states (q0, q1, q2, q3,qФ)
F: Final State
Transition Matrix
| f | |||
|---|---|---|---|
| a | b | ||
| ε | p0 | p1 | qФ |
| a | p1 | qФ | p2 |
| ab | p2 | qФ | p3 |
| abb | p3 | p3 | p3 |
| p4 | qФ | qФ | |
| Transition Graph |
2. Construct finite state automation (DFA) that starts with 'aab'.
Solution :Σ: inputs = {a, b}
q0 = initial state
q1 = string starts with a
q2 = string starts with aa
q3 = string starts with aab
Q: set of all states (q0, q1, q2, q3,qФ)
F: Final State
Transition Matrix
| f | |||
|---|---|---|---|
| a | b | ||
| ε | p0 | p1 | qФ |
| a | p1 | p2 | qФ |
| ab | p2 | qФ | p3 |
| abb | p3 | p3 | p3 |
| p4 | qФ | qФ | |
| Transition Graph |
3. Construct finite state automation (DFA) that starts with 'aba'.
Solution :Σ: inputs = {a, b}
q0 = initial state
q1 = string starts with a
q2 = string starts with ab
q3 = string starts with aba
Q: set of all states (q0, q1, q2, q3,qФ)
F: Final State
Transition Matrix
| f | |||
|---|---|---|---|
| a | b | ||
| ε | p0 | p1 | qФ |
| a | p1 | qФ | p2 |
| ab | p2 | p3 | qФ |
| abb | p3 | p3 | p3 |
| p4 | qФ | qФ | |
| Transition Graph |
4. Construct finite state automation (DFA) that starts with ''.
Solution :Σ: inputs = {a, b}
q0 = initial state
q1 = string starts with a
q2 = string starts with aa
q3 = string starts with aab
q4 = string starts with aabb
Q: set of all states (q0, q1, q2, q3, q4, qФ)
F: Final State
Transition Matrix
| f | |||
|---|---|---|---|
| a | b | ||
| ε | p0 | p1 | qФ |
| a | p1 | p2 | qФ |
| aa | p2 | qФ | p3 |
| aab | p3 | qФ | p4 |
| aabb | p4 | p4 | p4 |
| p5 | qФ | qФ | |
| Transition Graph |