Introduction to Computational Theory - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction to Computational Theory

Description:

Cohen, Chapter 6. 3. Nondeterministic ... Cohen, Chapter 6. 8. NFA DFA Equivalence. There is an algorithm to convert a NFA to a DFA ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 31
Provided by: eca91
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Computational Theory


1
Introductionto Computational Theory
  • Chapter 6

2
Automatic Door/FA
3
Nondeterministic
When the ultimate path through a machine is not
determined by input alone the machine is
nondeterministic.
4
Preamble to Chapter 6
  • NFAs
  • Non-deterministic finite automata
  • Vs. DFAs (deterministic the book calls FAs)
  • We allow multiple transitions per letter per
    state
  • Including lambda-transitions
  • Move on a whim (w/o consuming input)
  • Accept if a path exists to a final state
  • Transition relation

5
Examples
6
Why Non-determinism?
  • More expressive model
  • Easier to find machines for a language
  • E.g., unions of two languages/machines

7
Examples
  • (ab aba)
  • Language over a b where last symbol is repeated

8
NFA DFA Equivalence
  • There is an algorithm to convert a NFA to a DFA
  • Just track all the possibilities
  • Collapse lambda moves
  • States are a subset of 2Q
  • Rabin-Scott Algorithm
  • Example acb

9
Lambda Transitions
  • Handy for combining machines
  • E.g., union of two languages create a new start
    state with lambda moves to the start states of
    the two machines

10
Examples
11
Examples
12
Examples
13
Examples
14
Transition Graphs
Abandon the requirement that the edges eat just
one letter at a time.
15
Crashes (Formerly, Hell State or Jail)
When an input string that has not been completely
read reaches a state (final or otherwise) that it
cannot leave because there is no outgoing edge
that it may follow, we say that the input (or the
machine) crashes at that state.
16
Rejected Input
  • Trace a path ending in a non-final state
  • Crash while being processed

baa
17
Acceptance
A string is accepted by a TG if there is some way
it could be processed as to arrive at a final
state. There may also be ways in which this
string does not get to a final state, but we
ignore all failures.
18
Transition Graph
A collection of three things 1. A finite set of
states, at least one of which is designated as
the start state (-) and some (maybe none) of
which are designated as final states () 2. An
alphabet of possible input letters from which
input strings are formed. 3. A finite set of
transitions (edge labels) that show how to go
from some states to some others, based on reading
specified substrings of input letters (possibly
even the null string )
19
Successful Path
A successful path through a transition graph is a
series of edges forming a path beginning at some
start state (there may be several) and ending at
a final state.
abbab
abbaa
abb
a
abbababba
1-
4
aa
b
A Lambda transition occurs when you get a free
transition that was not initiated by user or
system action/interaction. Move on a whim
(w/o consuming input).
Slide modified by Seals
20
Equivalent Language Acceptors
21
Examples
22
Examples
23
Examples
(a b)b
24
Examples
25
Examples(EVEN-EVEN cf. p. 69)
26
Example(p. 84)
b
a,b
a
b
-

bbb
a
a
a
ab
b
bbb
bb
bb
a
27
Examples(p. 85)
28
Example(Problem 17, p. 91)
  • L a abb bbaab bbbaa
  • 1) given a FA that accepts L, construct a TG that
    accepts transpose(L)
  • Invert start/final states reverse arrows
  • 2) given a TG that accepts L, construct a TG that
    accepts transpose(L)
  • Same as 1, but reverse transition strings

29
Generalized Transition Graph (GTG)
A collection of three things 1. A finite set of
states, at least one of which is designated as
the start state (-) and some (maybe none) of
which are designated as final states () 2. An
alphabet of possible input letters from which
input strings are formed. 3. Directed edges
connecting some pairs of states, each labeled
with a regular expression.
30
Examples
Write a Comment
User Comments (0)
About PowerShow.com