Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
-1-
Lecture 12
Objectives
Transition Graph
o More Powerful Machine
o Formal Definition
o Examples
A Generalized Transition Graph
Kleens Theorem
Transition Graph
It has an ability to read sequence of letters instead a single letter like FSA.
To accept baa FSA needs 5 sates and TG needs only two states.
Due to nondeterminism; when an input string that has not been completely read
reaches a state that it cannot leave because there is no outgoing edge that it may
follow, we sat that the input crashes at that state. Execution then terminates and the
input must be rejected.
Formal Definition
A Transition graph, abbreviated TG, is a collection of three thins:
A finite set of states, at least one of which is designated as the start state (- ) and some
(may be none) of which are designated as final states (+).
An alphabet of possible input letters from which input strings are formed.
A finite set of transitions (edge labels) that show how to go from some states to some
others, based on reading specified substring of input letters (possibly even the null
string )
Tahir Naseem/Handout 12
-2-
-1
+5
b
aba
4
Example 2: (Another way to build TG): TG that accepts a+b+aba
-1
a+b+aba
+2
Tahir Naseem/Handout 12
-3-
Example 4: Build a TG over the alphabet = {a, b} having starting and ending with different
letter.
(ab + a)+
(b + )
+3
Tahir Naseem/Handout 12
-4-
Kleens Theorem
Any language that can be defined by
o Regular Expression or
o Finite Automaton or
o Transition Graph
can be defined by all three methods
Proof:
This theorem can be proved by proving following
Converting TG into Regular Expression
Converting Regular Expression into TG
o Already proved because you can make a TG with regular expression as a label.
Converting Finite Automat into Regular Expression
Converting Regular Expression into Finite State Automata.
Converting NFA into DFA
o NFA is just like TG, so TG to DFA will be proved.
Converting DFA to TG
o Already proved because every DFA is always a TG.