KoustavChatterjee PDF
KoustavChatterjee PDF
On
Department: CSE3
Semester: 4th
Introduction:
A mathematical model called a deterministic finite automaton (DFA) is used to identify patterns in
strings. DFAs, which are members of the FSM family, are often employed in computer science,
linguistics, and artificial intelligence.
An initial state, an initial state set, a set of final states, a transition function, a set of input symbols,
and a DFA are all components. The transition function generates the following state as an output
from an input symbol and the current state. Until it reaches the end of the input string, the DFA
moves between states as it receives input symbols in accordance with the transition function. The
DFA accepts the input string if the end state is one of the accepting states; if not, it rejects it.
Pattern recognition, natural language processing, compilers, text processing, and many more
applications employ DFAs. They are especially helpful in the analysis of regular languages, or
languages that may be characterized by regular expressions. DFAs are frequently employed as a
theoretical model for investigating the computing capacity of various machine kinds.
In conclusion, DFAs are widely utilized in many areas of computer science and linguistics and are a
crucial tool for identifying patterns in strings. There are several practical uses for the study of DFAs
and their characteristics, which is a significant field of research in computer science.
• Define the set of states: A DFA has a finite set of states, denoted by Q.
• Define the set of input symbols: A DFA reads a finite set of input symbols, denoted by Σ.
• Define the transition function: The transition function takes as input a current state and an input
symbol, and outputs the next state. The transition function is denoted by δ, and is defined as δ: Q × Σ
→ Q.
• Define the initial state: The DFA has a unique initial state, denoted by q0.
• Define the set of final states: The DFA has a set of final states, denoted by F, which is a subset of Q.
• Combine the above elements to form the complete DFA: The complete DFA is denoted by M = (Q,
Σ, δ, q0, F).
To use a DFA to recognize a pattern in a string, we start with the initial state q0, and for each input
symbol in the string, we transition to the next state according to the transition function δ. If we
reach the end of the string and the final state is one of the accepting states in F, then the DFA
accepts the string, otherwise, it rejects it.
The study of deterministic finite automata involves analysing the properties of the DFA, such as its
ability to recognize different types of languages and the computational complexity of the DFA. DFAs
are particularly useful for analysing regular languages, which are languages that can be described by
regular expressions. One of the advantages of DFAs is that they are simple and easy to implement,
both in software and hardware. However, the main limitation of DFAs is that they are not able to
recognize languages that require memory, such as context-free and context-sensitive languages. To
recognize such languages, more powerful models of computation, such as pushdown automata and
Turing machines, are needed.
Example 1:
Solution:
Transition Diagram:
Transition Table:
Present State Next State for Input Next State of Input 1
0
->q0 q0 q1
q1 q2 q1
*q2 q2 q2
Example 2:
DFA with ∑ = {0, 1} accepts all starting with 0.
Solution:
Explanation:
Example 3:
Design a FA with ∑ = {0, 1} accepts those string which starts with 1 and
ends with 0.
Solution:
The FA will have a start state q0 from which only the edge with input 1 will
go to the next state.
In state q1, if we read 1, we will be in state q1, but if we read 0 at state
q1, we will reach to state q2 which is the final state. In state q2, if we read
either 0 or 1, we will go to q2 state or q1 state respectively. Note that if
the input ends with 0, it will be in the final state.
Conclusion:
The different applications of deterministic finite automata are as follows −
Reference:-
2. Theory of Computer Science: Automata, Languages, and Computation, by K.L.P Mishra and N.
Chandrasekaran, Third Edition, 2006.
3. Yazidi, D. Silvestre, and B. J. Oommen, "Solving Two-Person Zero-Sum Stochastic Games with
Incomplete Information Using Learning Automata With Artificial Barriers," in IEEE Transactions on
Neural Networks and Learning Systems, vol. 34, no. 2, pp. 650-661, 2023, doi:
10.1109/TNNLS.2021.3099095