SlideShare a Scribd company logo
3
Most read
9
Most read
11
Most read
In the theory of computation, a branch of theoretical
computer science, a deterministic finite automaton (DFA)—
also known as a deterministic finite acceptor (DFA) and
a deterministic finite state machine (DFSM)—is a finite-state
machine that accepts and rejects strings of symbols and only
produces a unique computation (or run) of the automaton for
each input string.Deterministic refers to the uniqueness of
the computation. In search of the simplest models to capture
finite-state machines, McCulloch and Pitts were among the
first researchers to introduce a concept similar to finite
automata in 1943.
Finite Automata
(a) Nondeterministic finite automata (NFA) have no
restrictions on the labels of their edges. A symbol can
label several edges out of the same state, and E, the
empty string, is a possible label.
(b) Deterministic finite automata (DFA) have, for each
state, and for each symbol of its input alphabet exactly
one edge with that symbol leaving that state.
Nondeterministic Finite Automata
1. A finite set of states S.
2. A set of input symbols C, the input alphabet. We
assume that E, which stands for the empty string, is
never a member of C.
3. A transition function that gives, for each state, and for
each symbol in C U (E) a set of next states.
4. A state so from S that is distinguished as the start state
(or initial state).
5. A set of states F, a subset of S, that is distinguished as
the accepting states (or final states).
The transition graph for an NFA recognizing the language
of regular expression (aJb)*abb is shown in Fig.
Transition Tables
We can also represent an NFA by a transition table,
whose rows correspond to states, and whose columns
correspond to the input symbols and c. The entry for a
given state and input is the value of the transition
function applied to those arguments. If the transition
function has no information about that state-input
pair, we put Q) in the table for the pair
The transition table for the NFA of Fig.
Deterministic Finite Automata
 A deterministic finite automaton (DFA) is a special
case of an NFA where:
DFA
1. There are no moves on input E, and
2. For each state s and input symbol a, there is exactly
one edge out of s labeled a.
If we are using a transition table to represent a DFA,
then each entry is a single state. we may therefore
represent this state without the curly braces that we
use to form sets
In Fig. 3.28 we see the transition graph of a DFA accepting
the language (alb)*abb
From Regular Expressions to Automata
The regular expression is the notation of choice for
describing lexical analyzers and other pattern-processing
software. How- ever, implementation of that software
requires the simulation of a DFA, or perhaps simulation of
an NFA. Because an NFA often has a choice of move on an
input symbol (as Fig. 3.24 does on input a from state 0) or
on e (as Fig. 3.26 does from state 0), or even a choice of
making a transition on E: or on a real input symbol, its
simulation is less straightforward than for a DFA. Thus
often it is important to convert an NFA to a DFA that
accepts the same language.
Conversion of an NFA to a DFA
 shows another NFA accepting (a1 b) *abb

More Related Content

PPTX
Compiler Design Unit 2
PPTX
The Phases of a Compiler
PDF
Cs2303 theory of computation all anna University question papers
PPTX
push down automata
PPTX
Lexical analyzer
PPT
Minimization of DFA
PPTX
Recognition-of-tokens
PPTX
Theory of Automata and formal languages unit 2
Compiler Design Unit 2
The Phases of a Compiler
Cs2303 theory of computation all anna University question papers
push down automata
Lexical analyzer
Minimization of DFA
Recognition-of-tokens
Theory of Automata and formal languages unit 2

What's hot (20)

PPT
Introduction to Compiler design
PPT
Finite automata
PPTX
Lexical analysis - Compiler Design
PDF
Code optimization in compiler design
PPTX
Three Address code
PPTX
Specification-of-tokens
PPTX
Lexical Analysis - Compiler Design
PPTX
Top down parsing
PPTX
Constructor in java
PPTX
Symbol Table
PPTX
Two pass Assembler
PDF
NFA to DFA
PPTX
Top Down Parsing, Predictive Parsing
PPT
Operators in C++
PPTX
Command line arguments
PPT
Type Checking(Compiler Design) #ShareThisIfYouLike
PPT
Chapter 6 intermediate code generation
PPTX
Principal Sources of Optimization in compiler design
PPTX
Relationship Among Token, Lexeme & Pattern
PPTX
Exception handling c++
Introduction to Compiler design
Finite automata
Lexical analysis - Compiler Design
Code optimization in compiler design
Three Address code
Specification-of-tokens
Lexical Analysis - Compiler Design
Top down parsing
Constructor in java
Symbol Table
Two pass Assembler
NFA to DFA
Top Down Parsing, Predictive Parsing
Operators in C++
Command line arguments
Type Checking(Compiler Design) #ShareThisIfYouLike
Chapter 6 intermediate code generation
Principal Sources of Optimization in compiler design
Relationship Among Token, Lexeme & Pattern
Exception handling c++
Ad

Similar to Finite Automata in compiler design (20)

PDF
Finite Automata
PDF
deterministicfiniteautomatondfa-181008145215 (1).pdf
PDF
Theory of computation and automata
PDF
Theory of computation and automata
PPTX
NFA & DFA
PPTX
03-FiniteAutomata.pptx
PPTX
inbound6417574391896884649.pptx
PPTX
Formal language and automata theoryLAT Class notes.pptx
PPTX
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
PPTX
TCS MUBAI UNIVERSITY ATHARVA COLLEGE OF ENGINEERING.pptx
PDF
Regular Expression to Deterministic Finite Automata
PPTX
Chapter-twoChapter-three automata and complexity theory .pptx
PDF
TCS GOLDEN NOTES THEORY OF COMPUTATION .pdf
PPTX
INTRODUTION Formal Language and Automatic Theory.pptx
PDF
Automata theory
PDF
5. NFA & DFA.pdf
PPTX
LectIntroduction to Finite Automata.pptx
PPTX
FiniteAutomata_anim.pptx
PPTX
FiniteAutomata_anim.pptx
PPTX
1.3.1 deterministic finite automaton
Finite Automata
deterministicfiniteautomatondfa-181008145215 (1).pdf
Theory of computation and automata
Theory of computation and automata
NFA & DFA
03-FiniteAutomata.pptx
inbound6417574391896884649.pptx
Formal language and automata theoryLAT Class notes.pptx
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
TCS MUBAI UNIVERSITY ATHARVA COLLEGE OF ENGINEERING.pptx
Regular Expression to Deterministic Finite Automata
Chapter-twoChapter-three automata and complexity theory .pptx
TCS GOLDEN NOTES THEORY OF COMPUTATION .pdf
INTRODUTION Formal Language and Automatic Theory.pptx
Automata theory
5. NFA & DFA.pdf
LectIntroduction to Finite Automata.pptx
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
1.3.1 deterministic finite automaton
Ad

More from Riazul Islam (7)

PPTX
Introduction wireless communication network
PDF
Data link control in computer networks
PDF
Optical communication in communication engineering
PDF
Channel capacity and coding in communication engineering
PPTX
Algorithm in computer science
PPTX
Regular Expression in Compiler design
PPTX
Compiler Design LR parsing SLR ,LALR CLR
Introduction wireless communication network
Data link control in computer networks
Optical communication in communication engineering
Channel capacity and coding in communication engineering
Algorithm in computer science
Regular Expression in Compiler design
Compiler Design LR parsing SLR ,LALR CLR

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Yogi Goddess Pres Conference Studio Updates
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Trump Administration's workforce development strategy
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Classroom Observation Tools for Teachers
PDF
01-Introduction-to-Information-Management.pdf
PPTX
master seminar digital applications in india
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
RMMM.pdf make it easy to upload and study
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Yogi Goddess Pres Conference Studio Updates
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Updated Idioms and Phrasal Verbs in English subject
Trump Administration's workforce development strategy
STATICS OF THE RIGID BODIES Hibbelers.pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Classroom Observation Tools for Teachers
01-Introduction-to-Information-Management.pdf
master seminar digital applications in india
Weekly quiz Compilation Jan -July 25.pdf
Computing-Curriculum for Schools in Ghana
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
What if we spent less time fighting change, and more time building what’s rig...
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Complications of Minimal Access Surgery at WLH
RMMM.pdf make it easy to upload and study
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...

Finite Automata in compiler design

  • 1. In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton (DFA)— also known as a deterministic finite acceptor (DFA) and a deterministic finite state machine (DFSM)—is a finite-state machine that accepts and rejects strings of symbols and only produces a unique computation (or run) of the automaton for each input string.Deterministic refers to the uniqueness of the computation. In search of the simplest models to capture finite-state machines, McCulloch and Pitts were among the first researchers to introduce a concept similar to finite automata in 1943.
  • 2. Finite Automata (a) Nondeterministic finite automata (NFA) have no restrictions on the labels of their edges. A symbol can label several edges out of the same state, and E, the empty string, is a possible label. (b) Deterministic finite automata (DFA) have, for each state, and for each symbol of its input alphabet exactly one edge with that symbol leaving that state.
  • 3. Nondeterministic Finite Automata 1. A finite set of states S. 2. A set of input symbols C, the input alphabet. We assume that E, which stands for the empty string, is never a member of C. 3. A transition function that gives, for each state, and for each symbol in C U (E) a set of next states. 4. A state so from S that is distinguished as the start state (or initial state). 5. A set of states F, a subset of S, that is distinguished as the accepting states (or final states).
  • 4. The transition graph for an NFA recognizing the language of regular expression (aJb)*abb is shown in Fig.
  • 5. Transition Tables We can also represent an NFA by a transition table, whose rows correspond to states, and whose columns correspond to the input symbols and c. The entry for a given state and input is the value of the transition function applied to those arguments. If the transition function has no information about that state-input pair, we put Q) in the table for the pair
  • 6. The transition table for the NFA of Fig.
  • 7. Deterministic Finite Automata  A deterministic finite automaton (DFA) is a special case of an NFA where:
  • 8. DFA 1. There are no moves on input E, and 2. For each state s and input symbol a, there is exactly one edge out of s labeled a. If we are using a transition table to represent a DFA, then each entry is a single state. we may therefore represent this state without the curly braces that we use to form sets
  • 9. In Fig. 3.28 we see the transition graph of a DFA accepting the language (alb)*abb
  • 10. From Regular Expressions to Automata The regular expression is the notation of choice for describing lexical analyzers and other pattern-processing software. How- ever, implementation of that software requires the simulation of a DFA, or perhaps simulation of an NFA. Because an NFA often has a choice of move on an input symbol (as Fig. 3.24 does on input a from state 0) or on e (as Fig. 3.26 does from state 0), or even a choice of making a transition on E: or on a real input symbol, its simulation is less straightforward than for a DFA. Thus often it is important to convert an NFA to a DFA that accepts the same language.
  • 11. Conversion of an NFA to a DFA  shows another NFA accepting (a1 b) *abb