SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
Finite Automata

                                       Abhineet Anand
                                      Assistant Professor

                              Dept. of Computer Science And Engineering,
                                     College of Engineering Studies.
                         University of Petroleum and Energy Studies, Dehradun.


                                          March 1, 2013




Abhineet Anand (UPES, Dehradun)              Finite Automata                     March 1, 2013   1 / 19
Outline
1   Introduction
2   Definition
3   Processing of String by DFA
4   Preferred Notation for FA
      Transition Diagram
      Transition Table
5   Facts in Designing procedure of DFA
6   Question from FA
7   Why Nondeterminism
8   Definition
9   Transformation of NFA to DFA

 Abhineet Anand (UPES, Dehradun)   Finite Automata   March 1, 2013   2 / 19
Introduction

       Finite Automata
              Finite - Finite Number of states and Alphabet, and
              Automata - change of state govern by input symbol.




P0 , P1 , P2 , P3 , are the states.
x,y are the symbols on input tape.



 Abhineet Anand (UPES, Dehradun)      Finite Automata              March 1, 2013   3 / 19
Definition of Finite Automata

       A deterministic finite automata is a quintuple
       M=(Q, Σ, δ , q0 , F)
          1   Q : Is a non-empty finite set of states presents in the finite control.
              (q0 , q1 , q2 , q3 , ...)
          2   Σ : Is a non-empty finite set of input symbols which can be passed to
              the finite state machine. (a, b, c, d, ....)
          3   q0 : Is a Starting state, One of the state in Q.
          4   F : Is a non-empty set of final states or accepting states, set of final
              states belongs to Q.
          5   δ : Is a Function called transition function that takes two argument : a
              state and input symbol, and it return a single state.
              that is Q x (Σ) → Q

Let ’q’ is the state and ’a’ be input symbol passed to the transition function
                                  as : δ (q,a)=q



 Abhineet Anand (UPES, Dehradun)        Finite Automata                  March 1, 2013   4 / 19
Finite Automata

Let ’q’ is the state and ’a’ be input symbol passed to the transition function
                                 as : δ (q,a)=q .

q is the output of the function. Like




 Abhineet Anand (UPES, Dehradun)   Finite Automata              March 1, 2013   5 / 19
Processing of String by DFA
       Suppose a1 , a2 , a3 , a4 , ........ an is a sequence of input symbols.
       DFA is having q0 , q1 , q2 , q3 , q4 , ........ qn states where q0 is the initial
       state and qn is the final state and transition function processed as
                                       δ (q0 , a1 ) = q1
                                       δ (q1 , a2 ) = q2
                                       δ (q2 , a3 ) = q3
                                                .
                                                .
                                                .
                                                .
                                      δ (qn−1 , an ) = qn
       Input a1 , a2 , a3 , a4 , ........ an is said to be ”accepted”
       ”So a string is said to be accepted by the given DFA only when it
       is processed by transition function δ in such a manner that it
       ends at the final state”.
 Abhineet Anand (UPES, Dehradun)        Finite Automata                   March 1, 2013   6 / 19
Preferred Notation for FA




There are two Preferred Notation for describing auotmata:
       Transition Diagram
       Transition Table




 Abhineet Anand (UPES, Dehradun)   Finite Automata          March 1, 2013   7 / 19
Transition Diagram



A Transition diagram for a DFA M=(Q , Σ, δ, q0 , F ) is a graph defined as :
       For each state in Q there is a node.
       For each state q in Q and each input Symbol a in Σ, let δ (q, a )=p.



       There is an arrow into the start state q0 . This arrow does not originate
       at any node.
       Final State(s) will be marked by a double circle.




 Abhineet Anand (UPES, Dehradun)    Finite Automata               March 1, 2013   8 / 19
Transition Table

       A Transition table is a conventional, tabular representation of a
       function like δ that takes two arguments and return a state.
       The rows of the table correspond to the states, and the columns
       correspond to the input.
       The entry for one row corresponding to state q and the column
       corresponding to input a is the state δ (q, a ). For Example:




 Abhineet Anand (UPES, Dehradun)    Finite Automata               March 1, 2013   9 / 19
Facts/observation for DFA




  1    In the designing of the FA, first of all it is to find the language or
       strings which is accepted by the FA.
  2    Make sure that no state must have two different output state for a
       signal input symbol.
  3    Make sure, that there is one initial state and at least one final state in
       transition diagram of FA.




 Abhineet Anand (UPES, Dehradun)     Finite Automata               March 1, 2013   10 / 19
Question from FA

 1    Design a FA that accept a word LION.
 2    Design a FA that accept set of string such that every string ends in
      00, over alphabet {0, 1}.
 3    Design a FA that accept a substring aab over alphabet {a , b }.
 4    Design a FA, which ends with b if it start with a and ends with a if start
      with b, over alphabet {a , b }.
 5    Construct a FA that accepts set of strings where the number of 0’s in
      every string is multiple of three over alphabet Σ = {0, 1}.
 6    Design a FA which accepts the set of string either start with 01 or end
      with 01.
 7    Design a FA which accepts the language L = {w/w has both an even
      numbers of 0’s and an even number of 1’s over alphabet Σ = {0, 1}}.



Abhineet Anand (UPES, Dehradun)    Finite Automata               March 1, 2013   11 / 19
Nondeterministic




       Nondeterministic means a choice of moves for an auotmaton.
       Set of possible moves is given rather than unique move.
       Formally, it is achieved by defining the transition function so that its
       range is a set of possible states.




 Abhineet Anand (UPES, Dehradun)    Finite Automata               March 1, 2013   12 / 19
Why Nondeterministic



      A ”nondeterministic” finite automation(NFA) has the power to be in
      several states at once.
      Each NFA accepts a language that is also accepted by some DFA.
      NFA can be converted to DFA.
      Though nondeterministic is a feature which is normally not associated
      with real computers, it is an extension of the behaviour of DFA.
      Moreover, nondeterministic is an essential feature of FA, every NFA is
      equivalent to FA.




Abhineet Anand (UPES, Dehradun)   Finite Automata             March 1, 2013   13 / 19
Definition

A non deterministic finite automata is a quintuple
M=(Q, Σ, δ , q0 , F)
  1    Q : Is a non-empty finite set of states presents in the finite control.
       (q0 , q1 , q2 , q3 , ...)
  2    Σ : Is a non-empty finite set of input symbols which can be passed to
       the finite state machine. (a, b, c, d, ....)
  3    q0 : Is a Starting state, One of the state in Q.
  4    F : Is a non-empty set of final states or accepting states, set of final
       states belongs to Q.
  5    δ : Is a Function called transition function that takes two argument : a
       state and input symbol, and it return a a sub set of state Q.
       that is Q x (ΣU {ϸ }) → 2Q



 Abhineet Anand (UPES, Dehradun)      Finite Automata            March 1, 2013   14 / 19
Non Deterministic Finite Automata

                      The transition function is : Q x (ΣU {ϸ }) → 2Q .




Transition Table for this automata:




 Abhineet Anand (UPES, Dehradun)         Finite Automata                  March 1, 2013   15 / 19
Transformation of NFA to DFA




       For every NFA there exist an equivalent DFA.
       NFA is finite automata in which zero, one or more transition on an
       input symbol is permitted.
       It is possible to create a FA which will simulate all moves of NFA on a
       particular input symbol in parallel and get the FA which will have only
       one move for an input symbol.
       Transition of NFA to DFA is called subset construction.




 Abhineet Anand (UPES, Dehradun)    Finite Automata              March 1, 2013   16 / 19
NFA with ϸ −Transition




       If a FA is modified to permit transition without input symbols, along
       with zero, one or more transition on input symbols, then we get a NFA
       with ϸ −transition.
       The transition made without symbols are called as ϸ − transition.




 Abhineet Anand (UPES, Dehradun)   Finite Automata              March 1, 2013   17 / 19
Acceptance of a string by NFA with ϸ −Transition
       A string w will be accepted by NFA with ϸ − transition, if there exist at
       least one path corresponding w, which start in an initial state, and
       ends in one of the final states.
       The function ϸ − transition(q) is defiind is
       ϸ −closure(q) = set of all those states of the automata (NFA with
       ϸ −transition) which can be reached from q on a path labeled byϸ − i.e.
       without consuming any input symbol.




       ϸ −closure(q0 ) = {q0 , q1 , q2 }
       ϸ −closure(q1 ) = {q1 , q2 }
       ϸ −closure(q2 ) = {q2 }

 Abhineet Anand (UPES, Dehradun)           Finite Automata        March 1, 2013   18 / 19
THANK YOU




Abhineet Anand (UPES, Dehradun)     Finite Automata   March 1, 2013   19 / 19

Mais conteúdo relacionado

Mais procurados

Finite Automata in compiler design
Finite Automata in compiler designFinite Automata in compiler design
Finite Automata in compiler designRiazul Islam
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsShiraz316
 
Automata
AutomataAutomata
AutomataGaditek
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)Sagar Kumar
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
language , grammar and automata
language , grammar and automatalanguage , grammar and automata
language , grammar and automataElakkiyaS11
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFAMaulik Togadiya
 
Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Ra'Fat Al-Msie'deen
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory Rajendran
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Srimatre K
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examplesankitamakin
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonkanikkk
 
Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languagesSOMNATHMORE2
 
Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Akila Krishnamoorthy
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDAAshish Duggal
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
 

Mais procurados (20)

Finite automata
Finite automataFinite automata
Finite automata
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 
Finite Automata in compiler design
Finite Automata in compiler designFinite Automata in compiler design
Finite Automata in compiler design
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Automata
AutomataAutomata
Automata
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
language , grammar and automata
language , grammar and automatalanguage , grammar and automata
language , grammar and automata
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFA
 
Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"Theory of Computation "Chapter 1, introduction"
Theory of Computation "Chapter 1, introduction"
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1Formal Languages and Automata Theory Unit 1
Formal Languages and Automata Theory Unit 1
 
Finite automata examples
Finite automata examplesFinite automata examples
Finite automata examples
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
 
Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languages
 
Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)Automata theory - Push Down Automata (PDA)
Automata theory - Push Down Automata (PDA)
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
 

Destaque

Finite automata intro
Finite automata introFinite automata intro
Finite automata introlavishka_anuj
 
Finite Automata
Finite AutomataFinite Automata
Finite AutomataShiraz316
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite AutomataAdel Al-Ofairi
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of AutomataFarooq Mian
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 
Process Algebra
Process AlgebraProcess Algebra
Process Algebrajonecx
 
Finite automata
Finite automataFinite automata
Finite automataPusp Sunar
 
Pumping Lemma
Pumping LemmaPumping Lemma
Pumping Lemmaeburhan
 
Decidability
DecidabilityDecidability
Decidabilityandrejko
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Farwa Ansari
 

Destaque (20)

Finite automata intro
Finite automata introFinite automata intro
Finite automata intro
 
Finite automata
Finite automataFinite automata
Finite automata
 
Deterministic Finite Automata
Deterministic Finite AutomataDeterministic Finite Automata
Deterministic Finite Automata
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Finite automata
Finite automataFinite automata
Finite automata
 
Nondeterministic Finite Automata
Nondeterministic Finite AutomataNondeterministic Finite Automata
Nondeterministic Finite Automata
 
String
StringString
String
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Dfa h11
Dfa h11Dfa h11
Dfa h11
 
Process Algebra
Process AlgebraProcess Algebra
Process Algebra
 
Introduction
IntroductionIntroduction
Introduction
 
Final fa part1
Final fa part1Final fa part1
Final fa part1
 
Finite automata
Finite automataFinite automata
Finite automata
 
Pumping Lemma
Pumping LemmaPumping Lemma
Pumping Lemma
 
Syntax
SyntaxSyntax
Syntax
 
Decidability
DecidabilityDecidability
Decidability
 
Pumping lemma
Pumping lemmaPumping lemma
Pumping lemma
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
 

Semelhante a Finite automata

Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introductionNAMRATA BORKAR
 
1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton1.3.1 deterministic finite automaton
1.3.1 deterministic finite automatonSampath Kumar S
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdfFariyaTasneem1
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfAmayJaiswal4
 
Theory of automata
Theory of automataTheory of automata
Theory of automataArslan905905
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automatonSampath Kumar S
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite AutomatAdel Al-Ofairi
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptxssuser47f7f2
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxamara jyothi
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxranjan317165
 
Finite Automata fgyft rtrt rr uuy y.pptx
Finite Automata fgyft rtrt  rr uuy y.pptxFinite Automata fgyft rtrt  rr uuy y.pptx
Finite Automata fgyft rtrt rr uuy y.pptxAsadBaig49
 
Mba ebooks ! Edhole
Mba ebooks ! EdholeMba ebooks ! Edhole
Mba ebooks ! EdholeEdhole.com
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! EdholeEdhole.com
 

Semelhante a Finite automata (20)

Automata theory introduction
Automata theory introductionAutomata theory introduction
Automata theory introduction
 
1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton1.3.1 deterministic finite automaton
1.3.1 deterministic finite automaton
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Unit iv
Unit ivUnit iv
Unit iv
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdf
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton1.3.2 non deterministic finite automaton
1.3.2 non deterministic finite automaton
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptx
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
Finite Automata fgyft rtrt rr uuy y.pptx
Finite Automata fgyft rtrt  rr uuy y.pptxFinite Automata fgyft rtrt  rr uuy y.pptx
Finite Automata fgyft rtrt rr uuy y.pptx
 
Lec1.pptx
Lec1.pptxLec1.pptx
Lec1.pptx
 
Fsa
FsaFsa
Fsa
 
NFA and DFA
NFA and DFANFA and DFA
NFA and DFA
 
flat unit1
flat unit1flat unit1
flat unit1
 
Mba ebooks ! Edhole
Mba ebooks ! EdholeMba ebooks ! Edhole
Mba ebooks ! Edhole
 
Free Ebooks Download ! Edhole
Free Ebooks Download ! EdholeFree Ebooks Download ! Edhole
Free Ebooks Download ! Edhole
 

Mais de Dr. Abhineet Anand (10)

Software Engineering Introduction
Software Engineering IntroductionSoftware Engineering Introduction
Software Engineering Introduction
 
Function in C
Function in CFunction in C
Function in C
 
Key concept
Key conceptKey concept
Key concept
 
Arrays
ArraysArrays
Arrays
 
C language preliminaries
C language preliminariesC language preliminaries
C language preliminaries
 
Ndfa
NdfaNdfa
Ndfa
 
Micro program
Micro programMicro program
Micro program
 
Memory organization
Memory organizationMemory organization
Memory organization
 
Instruction, interrupts & io processing
Instruction, interrupts & io processingInstruction, interrupts & io processing
Instruction, interrupts & io processing
 
Instruction code
Instruction codeInstruction code
Instruction code
 

Finite automata

  • 1. Finite Automata Abhineet Anand Assistant Professor Dept. of Computer Science And Engineering, College of Engineering Studies. University of Petroleum and Energy Studies, Dehradun. March 1, 2013 Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 1 / 19
  • 2. Outline 1 Introduction 2 Definition 3 Processing of String by DFA 4 Preferred Notation for FA Transition Diagram Transition Table 5 Facts in Designing procedure of DFA 6 Question from FA 7 Why Nondeterminism 8 Definition 9 Transformation of NFA to DFA Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 2 / 19
  • 3. Introduction Finite Automata Finite - Finite Number of states and Alphabet, and Automata - change of state govern by input symbol. P0 , P1 , P2 , P3 , are the states. x,y are the symbols on input tape. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 3 / 19
  • 4. Definition of Finite Automata A deterministic finite automata is a quintuple M=(Q, Σ, δ , q0 , F) 1 Q : Is a non-empty finite set of states presents in the finite control. (q0 , q1 , q2 , q3 , ...) 2 Σ : Is a non-empty finite set of input symbols which can be passed to the finite state machine. (a, b, c, d, ....) 3 q0 : Is a Starting state, One of the state in Q. 4 F : Is a non-empty set of final states or accepting states, set of final states belongs to Q. 5 δ : Is a Function called transition function that takes two argument : a state and input symbol, and it return a single state. that is Q x (Σ) → Q Let ’q’ is the state and ’a’ be input symbol passed to the transition function as : δ (q,a)=q Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 4 / 19
  • 5. Finite Automata Let ’q’ is the state and ’a’ be input symbol passed to the transition function as : δ (q,a)=q . q is the output of the function. Like Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 5 / 19
  • 6. Processing of String by DFA Suppose a1 , a2 , a3 , a4 , ........ an is a sequence of input symbols. DFA is having q0 , q1 , q2 , q3 , q4 , ........ qn states where q0 is the initial state and qn is the final state and transition function processed as δ (q0 , a1 ) = q1 δ (q1 , a2 ) = q2 δ (q2 , a3 ) = q3 . . . . δ (qn−1 , an ) = qn Input a1 , a2 , a3 , a4 , ........ an is said to be ”accepted” ”So a string is said to be accepted by the given DFA only when it is processed by transition function δ in such a manner that it ends at the final state”. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 6 / 19
  • 7. Preferred Notation for FA There are two Preferred Notation for describing auotmata: Transition Diagram Transition Table Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 7 / 19
  • 8. Transition Diagram A Transition diagram for a DFA M=(Q , Σ, δ, q0 , F ) is a graph defined as : For each state in Q there is a node. For each state q in Q and each input Symbol a in Σ, let δ (q, a )=p. There is an arrow into the start state q0 . This arrow does not originate at any node. Final State(s) will be marked by a double circle. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 8 / 19
  • 9. Transition Table A Transition table is a conventional, tabular representation of a function like δ that takes two arguments and return a state. The rows of the table correspond to the states, and the columns correspond to the input. The entry for one row corresponding to state q and the column corresponding to input a is the state δ (q, a ). For Example: Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 9 / 19
  • 10. Facts/observation for DFA 1 In the designing of the FA, first of all it is to find the language or strings which is accepted by the FA. 2 Make sure that no state must have two different output state for a signal input symbol. 3 Make sure, that there is one initial state and at least one final state in transition diagram of FA. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 10 / 19
  • 11. Question from FA 1 Design a FA that accept a word LION. 2 Design a FA that accept set of string such that every string ends in 00, over alphabet {0, 1}. 3 Design a FA that accept a substring aab over alphabet {a , b }. 4 Design a FA, which ends with b if it start with a and ends with a if start with b, over alphabet {a , b }. 5 Construct a FA that accepts set of strings where the number of 0’s in every string is multiple of three over alphabet Σ = {0, 1}. 6 Design a FA which accepts the set of string either start with 01 or end with 01. 7 Design a FA which accepts the language L = {w/w has both an even numbers of 0’s and an even number of 1’s over alphabet Σ = {0, 1}}. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 11 / 19
  • 12. Nondeterministic Nondeterministic means a choice of moves for an auotmaton. Set of possible moves is given rather than unique move. Formally, it is achieved by defining the transition function so that its range is a set of possible states. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 12 / 19
  • 13. Why Nondeterministic A ”nondeterministic” finite automation(NFA) has the power to be in several states at once. Each NFA accepts a language that is also accepted by some DFA. NFA can be converted to DFA. Though nondeterministic is a feature which is normally not associated with real computers, it is an extension of the behaviour of DFA. Moreover, nondeterministic is an essential feature of FA, every NFA is equivalent to FA. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 13 / 19
  • 14. Definition A non deterministic finite automata is a quintuple M=(Q, Σ, δ , q0 , F) 1 Q : Is a non-empty finite set of states presents in the finite control. (q0 , q1 , q2 , q3 , ...) 2 Σ : Is a non-empty finite set of input symbols which can be passed to the finite state machine. (a, b, c, d, ....) 3 q0 : Is a Starting state, One of the state in Q. 4 F : Is a non-empty set of final states or accepting states, set of final states belongs to Q. 5 δ : Is a Function called transition function that takes two argument : a state and input symbol, and it return a a sub set of state Q. that is Q x (ΣU {ϸ }) → 2Q Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 14 / 19
  • 15. Non Deterministic Finite Automata The transition function is : Q x (ΣU {ϸ }) → 2Q . Transition Table for this automata: Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 15 / 19
  • 16. Transformation of NFA to DFA For every NFA there exist an equivalent DFA. NFA is finite automata in which zero, one or more transition on an input symbol is permitted. It is possible to create a FA which will simulate all moves of NFA on a particular input symbol in parallel and get the FA which will have only one move for an input symbol. Transition of NFA to DFA is called subset construction. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 16 / 19
  • 17. NFA with ϸ −Transition If a FA is modified to permit transition without input symbols, along with zero, one or more transition on input symbols, then we get a NFA with ϸ −transition. The transition made without symbols are called as ϸ − transition. Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 17 / 19
  • 18. Acceptance of a string by NFA with ϸ −Transition A string w will be accepted by NFA with ϸ − transition, if there exist at least one path corresponding w, which start in an initial state, and ends in one of the final states. The function ϸ − transition(q) is defiind is ϸ −closure(q) = set of all those states of the automata (NFA with ϸ −transition) which can be reached from q on a path labeled byϸ − i.e. without consuming any input symbol. ϸ −closure(q0 ) = {q0 , q1 , q2 } ϸ −closure(q1 ) = {q1 , q2 } ϸ −closure(q2 ) = {q2 } Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 18 / 19
  • 19. THANK YOU Abhineet Anand (UPES, Dehradun) Finite Automata March 1, 2013 19 / 19