Construct a regular expression, Theory of Computation

Given any NFA A, we will construct a regular expression denoting L(A) by means of an expression graph, a generalization of NFA transition graphs in which the edges are labeled with regular expressions rather than just symbols in Σ∪{ε}. We will explain the algorithm using the example of Figure 1.

We begin by adding a new start state s and ?nal state f to the automaton and by extending it to include an edge between every state in Q∪{s} to every state in Q ∪ {f}, including self edges on states in Q. We then consolidate all the edges from a state i to a state j into a single edge, labeled with a regular expression that denotes the set of strings of length 1 or less leading directly from state i to state j in the original automaton. If there was no path directly from i to j in the original automaton the label is ∅. If there were multiple edges (or edges labeled with multiple symbols) the label is the ‘+' of the symbols on those edges (as in the edge from 2 to 1 in the example). There will be an edge from s labeled ε to the original start state and one labeled ∅ to every other state other than f. Similarly, there will be an edge labeled ε from each state in F in the original automaton to state f and one labeled ∅ from those in Q-F to f. The expression graph for the example automaton is given in the right hand side of the ?gure.

The idea, now, is to systematically eliminate the nodes of the transition graph, one at a time, by adding new edges that are equivalent to the paths through that state and then deleting the state and all its incident edges. In general, suppose we are working on eliminating node k. For each pair of states i and j (where i is neither k nor f and j is neither k nor s) there will be a path from i to j through k that looks like:

230_Construct a regular expression.png

Posted Date: 3/21/2013 1:25:08 AM | Location : United States

Related Discussions:- Construct a regular expression, Assignment Help, Ask Question on Construct a regular expression, Get Answer, Expert's Help, Construct a regular expression Discussions

Write discussion on Construct a regular expression
Your posts are moderated
Related Questions
These assumptions hold for addition, for instance. Every instance of addition has a unique solution. Each instance is a pair of numbers and the possible solutions include any third

The fundamental idea of strictly local languages is that they are speci?ed solely in terms of the blocks of consecutive symbols that occur in a word. We'll start by considering lan

spam messages h= 98%, m= 90%, l= 80% non spam h=12%, m = 8%, l= 5% The organization estimates that 75% of all messages it receives are spam messages. If the cost of not blocking a

The class of Strictly Local Languages (in general) is closed under • intersection but is not closed under • union • complement • concatenation • Kleene- and positive

Another way of interpreting a strictly local automaton is as a generator: a mechanism for building strings which is restricted to building all and only the automaton as an inexh

. On July 1, 2010, Harris Co. issued 6,000 bonds at $1,000 each. The bonds paid interest semiannually at 5%. The bonds had a term of 20 years. At the time of issuance, the market r

how to prove he extended transition function is derived from part 2 and 3

how many pendulum swings will it take to walk across the classroom?

Our primary concern is to obtain a clear characterization of which languages are recognizable by strictly local automata and which aren't. The view of SL2 automata as generators le