What is a transition graph (TG)?
A finite automaton (FA) processes an input string one letter at a time. But what if we wanted a more capable machine that could read multiple letters of the input string at a time and change its state based on that? Transition graphs offer a solution to this problem.
A transition graph (TG) is a type of FA used to provide a visual representation of states, input symbols, and transitions. Unlike an FA, a TG also allows for multiple start states and for an edge to have a null string. It allows for a clear understanding of how input strings are processed to determine the acceptance of a language.
Note: Each finite automaton can be visualized as a transition graph; however, the opposite is not always true.
A TG is a collection of the following:
A finite set of input letters
from which input strings are formed. A finite number of states
, at least one of which is the start state and some (maybe none) final states (or accepting states) . A finite set of transitions
(or edge labels) that show how to go from one state to another based on reading specified substrings of input letters, possibly even the null string .
Syntax
Let a transition graph
A successful path in
starts with a start state and ends with the final state . Let
be the set of all successful paths in . Let
be the set of words that are the concatenation of the sequence of edge labels of corresponding to a successful path in . denotes the language accepted by .
Note: Given a transition graph
, it’s unclear how to determine .
Example
Consider the language
It’s defined over
{ } It consists of strings that begin and end with different letters
All strings have
Begin at the start state
If the first letter in the input string is:
, we’ll move to state , we’ll move to state
The current state will persist until the second last letter of the input string is read
The last letter for the input string will be:
, for state , for the state
The final state will be:
, coming from state , coming from state
A successful path through a TG isn’t determined by the input alone. Human choice is also a factor in selecting the path, and the machine doesn’t independently make all the determinations. In the example above, there’s no counter to compare the position of the current letter with the last letter; we continue to stay on state
Note: A string is considered accepted by the machine if there exists at least one sequence of choices that results in a path leading to a final state.
FA to TG
Consider the language
It’s defined over
{ } It consists of strings that end in
All strings have
Let’s create an FA and a TG that accepts
A finite automaton can have one letter per edge label.
We begin at the start node and stay in the same state until
A transition graph can have multiple letters per edge label. In this case, one of the edge labels in the TG contains two letters that help reduce the overall complexity (as seen in the FA).
We begin at the start node and stay in the same state until the last
However, it’s important to be vigilant, as there’s a possibility that the TG might encounter issues if we make the mistake of traversing the non-loop edge label too soon.
Quiz
Attempt the quiz to test your knowledge of transition graphs.
In a transition graph (TG), what does a successful path start with and end with?
It starts and ends with the same state.
It starts with the start state and ends with the final state.
It starts and ends with any state
Free Resources