SlideShare a Scribd company logo
1 of 2
Generalized Transition Graphs
                           (GTG)
                         Definition
A generalized transition graph (GTG) is a collection of
three things:
   1. A finite set of states, of which at least one is a start
      state and some (maybe none) are final states.
   2. An alphabet ∑ of input letters.
   3. Directed edges connecting some pairs of states, each
      labeled with a regular expression.
                            Example
   • Consider this GTG:




  • This GTG accepts all strings without a double b.
  • Note that the word containing the single letter b can
    take the free ride along the Λ-edge from start to
    middle, and then have letter b read to go to the final
    state.
  • Typo in textbook: The first edge should be labeled
     (ba + a)* as in the figure above, not (ab + a)*.
  • Note that there is no difference between the Kleene
    star closure for regular expressions and a loop in
    transition graphs, as illustrated in the following figure.
• In the first picture we may loop in the middle state or
  go to the third state. To not loop corresponds to taking
  the Λ choice from the b*-edge in the second picture.

More Related Content

What's hot (20)

Context free grammar
Context free grammarContext free grammar
Context free grammar
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Closure properties of context free grammar
Closure properties of context free grammarClosure properties of context free grammar
Closure properties of context free grammar
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Context free grammars
Context free grammarsContext free grammars
Context free grammars
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
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. ...
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Turing machines
Turing machinesTuring machines
Turing machines
 
Push down automata
Push down automataPush down automata
Push down automata
 
Language
LanguageLanguage
Language
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
COMPILER DESIGN
COMPILER DESIGNCOMPILER DESIGN
COMPILER DESIGN
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Introduction TO Finite Automata
Introduction TO Finite AutomataIntroduction TO Finite Automata
Introduction TO Finite Automata
 

Generalized transition graphs

  • 1. Generalized Transition Graphs (GTG) Definition A generalized transition graph (GTG) is a collection of three things: 1. A finite set of states, of which at least one is a start state and some (maybe none) are final states. 2. An alphabet ∑ of input letters. 3. Directed edges connecting some pairs of states, each labeled with a regular expression. Example • Consider this GTG: • This GTG accepts all strings without a double b. • Note that the word containing the single letter b can take the free ride along the Λ-edge from start to middle, and then have letter b read to go to the final state. • Typo in textbook: The first edge should be labeled (ba + a)* as in the figure above, not (ab + a)*. • Note that there is no difference between the Kleene star closure for regular expressions and a loop in transition graphs, as illustrated in the following figure.
  • 2. • In the first picture we may loop in the middle state or go to the third state. To not loop corresponds to taking the Λ choice from the b*-edge in the second picture.