SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automatadeepinderbedi
 
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
 
NFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikNFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikMudsaraliKhushik
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory Rajendran
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite AutomataArchana Gopinath
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFAkunj desai
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)nikeAthena
 
Simplification of cfg ppt
Simplification of cfg pptSimplification of cfg ppt
Simplification of cfg pptShiela Rani
 

Was ist angesagt? (20)

NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
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
 
NFA to DFA
NFA to DFANFA to DFA
NFA to DFA
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: 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)
 
NFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikNFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushik
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Regular Expression to Finite Automata
Regular Expression to Finite AutomataRegular Expression to Finite Automata
Regular Expression to Finite Automata
 
Pda
PdaPda
Pda
 
Minimization of DFA
Minimization of DFAMinimization of DFA
Minimization of DFA
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Nfa to-dfa
Nfa to-dfaNfa to-dfa
Nfa to-dfa
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Simplification of cfg ppt
Simplification of cfg pptSimplification of cfg ppt
Simplification of cfg ppt
 
Finite automata
Finite automataFinite automata
Finite automata
 
Cs419 lec10 left recursion and left factoring
Cs419 lec10   left recursion and left factoringCs419 lec10   left recursion and left factoring
Cs419 lec10 left recursion and left factoring
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
 
Lexical analysis - Compiler Design
Lexical analysis - Compiler DesignLexical analysis - Compiler Design
Lexical analysis - Compiler Design
 

Andere mochten auch

Finite automata intro
Finite automata introFinite automata intro
Finite automata introlavishka_anuj
 
Finite Automata
Finite AutomataFinite Automata
Finite AutomataShiraz316
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of AutomataFarooq Mian
 
Process Algebra
Process AlgebraProcess Algebra
Process Algebrajonecx
 
Finite automata
Finite automataFinite automata
Finite automataPusp Sunar
 
Pumping Lemma
Pumping LemmaPumping Lemma
Pumping Lemmaeburhan
 
Automata
AutomataAutomata
AutomataGaditek
 
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
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)Sagar Kumar
 
String Matching with Finite Automata,Aho corasick,
String Matching with Finite Automata,Aho corasick,String Matching with Finite Automata,Aho corasick,
String Matching with Finite Automata,Aho corasick,8neutron8
 

Andere mochten auch (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
 
String
StringString
String
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of 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
 
Automata
AutomataAutomata
Automata
 
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. ...
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 
String Matching with Finite Automata,Aho corasick,
String Matching with Finite Automata,Aho corasick,String Matching with Finite Automata,Aho corasick,
String Matching with Finite Automata,Aho corasick,
 

Ähnlich wie 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
 
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
 

Ähnlich wie 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
 
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
 
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
 

Mehr von 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