Construct a regular expression, Theory of Computation

Assignment Help:

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


Related Discussions:- Construct a regular expression

Non - sl languages, The key thing about the Suffx Substitution Closure prop...

The key thing about the Suffx Substitution Closure property is that it does not make any explicit reference to the automaton that recognizes the language. While the argument tha

Discrete math, Find the Regular Grammar for the following Regular Expressio...

Find the Regular Grammar for the following Regular Expression: a(a+b)*(ab*+ba*)b.

Finite-state automaton, Paths leading to regions B, C and E are paths which...

Paths leading to regions B, C and E are paths which have not yet seen aa. Those leading to region B and E end in a, with those leading to E having seen ba and those leading to B no

Chomsky-schutzenberger, The upper string r ∈ Q+ is the sequence of states v...

The upper string r ∈ Q+ is the sequence of states visited by the automaton as it scans the lower string w ∈ Σ*. We will refer to this string over Q as the run of A on w. The automa

Strictly 2 - local automata, We will assume that the string has been augmen...

We will assume that the string has been augmented by marking the beginning and the end with the symbols ‘?' and ‘?' respectively and that these symbols do not occur in the input al

Algorithm, What is the Best way to write algorithm and construct flow chart...

What is the Best way to write algorithm and construct flow chart? What is Computer? How to construct web page and Designe it?

Myhill-nerode theorem, The Myhill-Nerode Theorem provided us with an algori...

The Myhill-Nerode Theorem provided us with an algorithm for minimizing DFAs. Moreover, the DFA the algorithm produces is unique up to isomorphism: every minimal DFA that recognizes

Overview of dfa, Explain Theory of Computation ,Overview of DFA,NFA, CFG, P...

Explain Theory of Computation ,Overview of DFA,NFA, CFG, PDA, Turing Machine, Regular Language, Context Free Language, Pumping Lemma, Context Sensitive Language, Chomsky Normal For

Automata and compiler, Automata and Compiler (1) [25 marks] Let N be the...

Automata and Compiler (1) [25 marks] Let N be the last two digits of your student number. Design a finite automaton that accepts the language of strings that end with the last f

Decision problems, In Exercise 9 you showed that the recognition problem an...

In Exercise 9 you showed that the recognition problem and universal recognition problem for SL2 are decidable. We can use the structure of Myhill graphs to show that other problems

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd