CSE437 Assignment 2
CSE437 Assignment 2
The language of a DFA is defined as the set of all strings over Σ that, starting from q 0 and
following the transitions as the string is read left to right, will reach an accepted state.
For example, if a simple DFA is constructed to accept all strings that contain 1 as a substring,
then we can trace the states for any string. E.g. if 0001 is the input string,
(qe, 0001) → qe
(qe, 001) → qe
(qe, 01) → qe
(qe, 1) → q1
(q1, ε); As qe ∈ F, this string is accepted.
If another DFA were constructed that only accepts strings that begin with 1,
we can see when the state “die” is reached, it is impossible to reach a final state. This is known
as a dead state.
H/W: Construct a DFA over the alphabet {0, 1} that accepts all strings that end in 101.
DFAs are referred to as deterministic because the transition is predetermined and definite.
There is no room for ambiguity and the paths are fixed. Non-deterministic finite automata
(NFAs) are simple machines that allow us to make guesses and allow for a different
computational approach.
They differ from DFAs as the transition function δ can go into several states simultaneously and
it allows ε-transitions, which can allow us to be present in multiple states and move between
them without reading any part of a string.
Similar to DFAs, the language of an NFA is the set of all strings that the NFA accepts.
Looking at the NFA below as an example,
NFAs may sometimes result in simpler designs but are computationally more expensive than
DFAs, as every possible state is accounted for each step of the way.
References:
[1] Developed by Ivan Zuzak and Vedrana Jankovic, under the Apache License v2.0.
[2] The $ sign is used to represent ε, the empty string, inside the diagrams.