0% found this document useful (0 votes)
4 views

2021-22-finite-state-automata

The document provides an overview of Finite State Automata (FSA), including its mathematical definition, types (Deterministic and Non-Deterministic), and applications in natural language processing and software development. It explains the structure of FSAs through 5-tuples and illustrates their behavior using state diagrams. Additionally, it discusses the relationship between FSAs, regular expressions, and regular grammars in characterizing regular languages.

Uploaded by

Nathiya Arumugam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

2021-22-finite-state-automata

The document provides an overview of Finite State Automata (FSA), including its mathematical definition, types (Deterministic and Non-Deterministic), and applications in natural language processing and software development. It explains the structure of FSAs through 5-tuples and illustrates their behavior using state diagrams. Additionally, it discusses the relationship between FSAs, regular expressions, and regular grammars in characterizing regular languages.

Uploaded by

Nathiya Arumugam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

lOMoARcPSD|30138265

2021 2.2 Finite State Automata

COMPUTER APPLICATION (University of Madras)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by NATHIYA Arumugam ([email protected])
lOMoARcPSD|30138265

NATURAL LANGUAGE PROCESSING

UNIT 2

Syntax: Formal Grammars of English - Word Level Analysis: Regular Expressions - Finite-
State Automata - Morphological Parsing, Syntactic Parsing, Statistical Parsing
-Spelling Error Detection and correction-Words and Word classes-Part-of Speech
Tagging. Syntactic Analysis: Context-free Grammar-Constituency- Parsing-Probabilistic
Parsing.
2.2 FINITE STATE AUTOMATA
2.1 AUTOMATA
 The term automata, derived from the Greek word "αὐτόματα" meaning "self-acting".
The plural of automata is automaton.
 Automaton may be defined as an abstract self-propelled computing device that
follows a predetermined sequence of operations automatically.
 An automaton having a finite number of states is called a Finite Automaton (FA) or
Finite State automata (FSA).

2.2 FINITE AUTOMATON (FA) or FINITE STATE AUTOMATON (FSA)

Mathematical Definition of Automaton


Mathematically, an automaton can be represented by a 5-tuple (Q, Σ, δ, q0, F), where −
 Q is a finite set of states.
 Σ is a finite set of symbols, called the alphabet of the automaton.
 δ is the transition function
 q0 is the initial state from where any input is processed (q0 ∈ Q).
 F is a set of final state/states of Q (F ⊆ Q).

2.3 TYPES OF FINITE STATE AUTOMATON (FSA)

Finite state automation is of two types. Let us see what the types are.

2.3.1 DETERMINISTIC FINITE AUTOMATON (DFA)

DFA is defined as the type of finite automation wherein, for every input symbol we can
determine the state to which the machine will move. It has a finite number of states that is
why the machine is called Deterministic Finite Automaton (DFA).
Mathematically, a DFA can be represented by a 5-tuple (Q, Σ, δ, q0, F), where −
 Q is a finite set of states.
 Σ is a finite set of symbols, called the alphabet of the automaton.
 δ is the transition function where δ: Q × Σ → Q .

Downloaded by NATHIYA Arumugam ([email protected])


lOMoARcPSD|30138265

 q0 is the initial state from where any input is processed (q0 ∈ Q).
 F is a set of final state/states of Q (F ⊆ Q).

Whereas graphically, a DFA can be represented by diagraphs called state diagrams where −
 The states are represented by vertices.
 The transitions are shown by labeled arcs.
 The initial state is represented by an empty incoming arc.
 The final state is represented by double circle.

Example of DFA

Suppose a DFA be
 Q = {a, b, c},
 Σ = {0, 1},
 q0 = {a},
 F = {c},
 Transition function δ is shown in the table as follows −

Current State Next State for Input 0 Next State for Input 1

A a B

B b A

C c C

The graphical representation of this DFA would be as follows −

Applications of FAs

Although FAs are limited in computational power, they have the virtue of being relatively
easy to understand. Consequently, they are often used by software developers and non-
software system designers as a means of summarizing the behavior of a complex system.

Downloaded by NATHIYA Arumugam ([email protected])


lOMoARcPSD|30138265

Example

Fig. 2.1 Processes in an OS

Fig. 2.1 is a state diagram summarizing the behavior of processes in a typical operating
system. Most operating systems will be running more processes than can be simultaneously
accommodated on the number of physical CPUs. Therefore newly started processes start in
a Ready state and have to wait until the OS scheduler assigns a CPU to them. At that
moment, the process starts Running. It stays in this state until either the scheduler decides to
take back the CPU (because a “time slice” has expired) or because the process has initiated an
I/O operation that, compared to the CPU speed, may take a substantial amount of time. In the
latter case, the process moves into a Blocked state, surrendering the CPU back to the
schedule. When the I/O operation is completed, the process returns to the Ready state until
the scheduler decides to give it some more CPU time.

The notation used in this diagram is that of a UML state diagram. The very fact that the
notation for such state diagrams is part of an industry standard notation should give you a
sense of how common it is for developers to use FAs as a basis for reasoning about software.

2.3.2 NON-DETERMINISTIC FINITE AUTOMATON (NDFA)


It may be defined as the type of finite automation where for every input symbol we cannot
determine the state to which the machine will move i.e. the machine can move to any
combination of the states. It has a finite number of states that is why the machine is called
Non-deterministic Finite Automation (NDFA).
Mathematically, NDFA can be represented by a 5-tuple (Q, Σ, δ, q0, F), where −
 Q is a finite set of states.
 Σ is a finite set of symbols, called the alphabet of the automaton.
 δ :-is the transition function where δ: Q × Σ → 2 Q.
 q0 :-is the initial state from where any input is processed (q0 ∈ Q).
 F :-is a set of final state/states of Q (F ⊆ Q).

Downloaded by NATHIYA Arumugam ([email protected])


lOMoARcPSD|30138265

Whereas graphically (same as DFA), a NDFA can be represented by diagraphs called state
diagrams where −
 The states are represented by vertices.
 The transitions are shown by labeled arcs.
 The initial state is represented by an empty incoming arc.
 The final state is represented by double circle.

Example of NDFA

Suppose a NDFA be
 Q = {a, b, c},
 Σ = {0, 1},
 q0 = {a},
 F = {c},
 Transition function δ is shown in the table as follows –

Current State Next State for Input 0 Next State for Input 1

A a, b B

B C a, c

C b, c C

The graphical representation of this NDFA would be as follows −

2.4 RELATION BETWEEN FA, RG AND FE

 Finite State Automata are the theoretical foundation of computational work


 Any regular expression can be implemented as FSA and
Any FSA can be described with a regular expression
 Regular Expression is a way to characterize a kind of language called Regular
Language. A regular language can be described with the help of both FSA and regular
expression.

Downloaded by NATHIYA Arumugam ([email protected])


lOMoARcPSD|30138265

 Regular grammar a formal grammar that can be right-regular or left-regular, is


another way to characterise regular language.
Following diagram shows that finite automata, regular expressions and regular grammars
are the equivalent ways of describing regular languages.

REFERENCES

1. https://www.cs.odu.edu/~zeil/cs390/latest/Public/fsa/index.html

Downloaded by NATHIYA Arumugam ([email protected])

You might also like