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

Introduction

Uploaded by

moses4yao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Introduction

Uploaded by

moses4yao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Introduction

Automata is the study of mathematical machinery or systems. The finite Automata Machine(FA)
is the most basic machine used for pattern recognition. The finite Automata, also known as the
finite state machine, is an abstract machine with five elements or tuples. It has a set of states
and rules for moving from one state to the next state, but it is dependent on the input symbol
used. It is primarily an abstract model of a digital computer.

The diagram above depicts the following characteristics of Automata:

Input: In this, all the input strings or numbers are given i.e I1, I2, I3…In.
Output: In the output state, the possible outputs are mentioned for the respective inputs i.e. O1,
O2, O3….On.
Automata states: In this, all the states of the DFA are mentioned i.e. q1, q2, q3…qn.
State relation: In this state relation, the relationship between various states is described.

The following are the most important points to remember:

Here there is a fixed set of states that the machine can be in at any given time.
The machine can be in one state at a particular time.
The machine receives a series of inputs.
Every state has a sequence of transitions, and each transition has an input and points to a
state.

Finite Automata are divided into two main categories.

Deterministic Finite Automaton (DFA)


Non-deterministic Finite Automaton (NDFA / NFA)

Formal Definition of Finite Automata


A finite automaton is a collection of 5-tuple.

Q: a finite set of states


∑: a finite set of the input symbol
q0: initial state
F: final state
δ: Transition function

The formal specification of a finite automata machine is { Q, Σ, q0, F, δ }

Deterministic Finite Automaton (DFA)


A DFA is a state machine built up of states and transitions that can accept or reject a finite string
made up of a series of symbols and evaluate it to a predefined language across a predefined
set of characters. We represent states with circles and transitions with directed arrows. Every
state must have each symbol radiating from it, or it will not be characterized as a DFA. The
machine is known as a Deterministic Finite Machine since it has a finite number of states.

Let us take an example to understand it in a better way:

Consider a machine that accepts strings containing at least one a from the alphabets a and b.

In the above picture, the initial state of the machine is q0, and the final state of the machine is
qf, the state which determines whether the string is accepted or not.

Assume we have the string 'ba.'

The letter 'b' is the first to enter the system.

As it can be seen in the diagram above when b enters the system, it is accepted by q0 and
remains there. When we give the machine the symbol a, we can see that when q0 accepts a, it
proceeds to the final state, qf. (The double circles represent the final state.)

The string a is accepted by the machine and the string has ended, we can conclude that the
given string is accepted by the DFA.

Transition table
The transition table is a table that shows how the transition function works. It takes two inputs (a
state and a symbol) and outputs a state (the "next state").

The following elements make up a transition table:

The input symbols are represented by columns.


States are represented by rows.
The next state corresponds to the entries.
An arrow with no source denotes the start state.
A star indicates the accepted state.

The transition table for the same DFA is following:

Formal Definition of DFA


A DFA can be expressed by the same 5-tuple (Q, ∑, δ, q0, F) that we used to
express Finite Automata where:

Q: Set of finite states (for eg: {q0,q1,q2,……,qf})

𝛿: Transition Function (function applied/ condition applied onto the string)


Σ: Set of symbols (for eg: a,b....1,0…..)

q0: Initial/start state


F: Set of final states (here, qf but there can be multiple final states)

Each input symbol must have one transition for each state.

The transition function can be defined as δ: Q x ∑→Q.

Also See, Moore Machine

Need of Deterministic Finite Automata


DFAs make it much easier to use certain projects and applications that switch between valid
and invalid states. DFAs are useful in the functionality of applications such as

Vending Machines
Traffic Lights
Video Games
Text Parsing
Regular Expression Matching
CPU Controllers
Protocol Analysis
Natural Language Processing
Speech Recognition

Let us see one more example to understand DFA.

Design a DFA over the input alphabets {a,b} which accepts all strings that end with a.
Step 1: Consider the strings {a,aa,ba,aba,bba………} that follow the above condition.

We can derive from the preceding example that any number of alphabets can come before a.

Step 2: Design the DFA for the lowest possible string.

As we can see, in order to answer the question, we need a machine that accepts strings that
end in a, it doesn’t matter what is the starting of the string, only the ending string should be a.
Because our condition only involves one symbol, we have only one necessary transition, so we
take two states. In this case, the string can begin with any symbol but must end with an a. As a
result, any presence of b is directed to q0, which is our initial state, whereas a's are directed to
the final state qf, which is the final state of the DFA.

The transition table for the above DFA is as followed:

Dead state in DFA


If the machine has successfully progressed to the final string accepting state, we can say that
the string has been accepted by the DFA.

However, if we arrive at a point where the machine can no longer progress to its final state, we
have arrived at a dead state. A Dummy state is another name for a dead state.

Let us look at the following example to understand the dead state in a better way

In this example, the machine will begin, and if we want to read strings that begin with 0, the
machine will reach its final state B, which will allow it to accept a string.
However, if we start the machine with 1, it will not be able to advance to the final state. It will
reach another intermediate state which is C. We are now in a dead state after reading 1. And
the string will not be accepted by DFA.

The transition table for the above DFA is as followed:

Frequently Asked Questions


Why are Finite state machines needed?
Finite-state machines (FSMs) are optimum computation models for small amounts of memory
because they don't keep track of it. Its primary use is in the analysis of mathematical problems.

Can DFA be converted to NFA?


Yes, any DFA can be transformed into (and is already) an NFA.

Which language is accepted by deterministic finite automata?


A language L is accepted by a DFA < Q , , q0 , , A > , if and only if L = { w | *( q0 , w ) A } . That
is, the language accepted by a DFA is the set of strings accepted by the DFA.

Conclusion
To sum up, we covered the notion of finite automata, its significance, formal definition, and
types. Deterministic finite automata were also addressed, their formal definition and
representation in graphical form. Lastly, we saw examples of DFA to understand it in a better
way.

You might also like