Recap: Nondeterministic Finite Automaton NFA - PowerPoint PPT Presentation

About This Presentation
Title:

Recap: Nondeterministic Finite Automaton NFA

Description:

Acceptance of a Word in an NFA A ... is a set of stack symbols. s Q called the start state. F Q called the favorable states ... state, the word w, and the ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 9
Provided by: tico
Category:

less

Transcript and Presenter's Notes

Title: Recap: Nondeterministic Finite Automaton NFA


1
Recap Nondeterministic Finite Automaton (NFA)
  • A deterministic finite automaton (NFA) is a
    5-tuple (Q,?,?,s,F) where
  • Q is a finite set of elements called states
  • ? is a finite input alphabet
  • s ? Q called the start state
  • F ? Q called the favorable states
  • ? (Q (? ? e)) ? ?(Q)

Constant!

a1
a2
2
Acceptance of a Word in an NFA A
  • Acceptance w is accepted by A if at least one
    sequence of transformations yields the empty word
    and end up in an accepting state
  • The oracle explanation of NFAs there is an
    oracle that always makes the right choice

Oracle will find a path to an accepting state
that process all characters only if there is one
such path
3
Pushdown Automaton
  • A pushdown automaton is a 6-tuple (Q,?,?, ?,s,F)
    where
  • Q is a finite set of elements called states
  • ? is a finite input alphabet
  • ? is a set of stack symbols
  • s ? Q called the start state
  • F ? Q called the favorable states
  • ? (Q (? ? e) (? ? e) ) ? ?( Q (? ?
    e) )

Constant!

a1
a2
4
Computation in Pushdown Automata
PA (Q,?,?, ?,s,F) where
  • ?(Q (? ? e) (? ? e) ) ? ?( Q (? ?
    e) )

Let (q,?)) ? ?((q, ?,?)), it is compute as
follows
  • if
  • the automaton is in an state q
  • the next character is ?
  • The word ? is on top of the stack
  • Then
  • pop ? from top of the stack
  • Jump to the state q
  • Push the word ? on top of the stack

5
String Accepted by Pushdown Automaton
  • Given a pushdown automaton A, and a string w ?
    ?, we say that w is accepted by A if there is a
    sequence of computations that
  • begin from the starting state, the word w, and
    the empty stack
  • terminates in a favorable state and process all
    characters in w
  • Note the stack does not have to be empty at the
    end
  • The set of all words accepted by an automaton A
    form the language L(A) accepted or recognized by
    the automaton.

6
Example
Pushdown automaton recognizing anbn n 0, 1,
2,
7
Example
Pushdown automaton recognizing
L wwR w is in ?
8
Homework for Friday 12.
  • 2.3 (n), (o)
  • 2.4 (c)
  • 2.6 (b)
  • 2.21
  • Construct a pushdown automaton for the language
    of exercise 2.21
Write a Comment
User Comments (0)
About PowerShow.com