Looking for a DFA Add-on?

I am invited to show the DFA and RegEx diagram for the RegEx (00 + 1)* add- (00 + 1)* . In the previous task, I had to prove that the DFA complement is closed and also a regular expression, so I know that to convert DFA, M to complement, M`, I just need to change the initial receiving states and the final receiving states.

However, it seems that the initial receiving states for RegEx are {00, 1, ^} , and the final receiving states are {00, 1, ^} . Thus, replacing them will lead to the same RegEx and DFA, which seem contradictory.

Am I doing something wrong or is RegEx supposed to have no real add-on?

thank

+14
regex dfa nfa regular-language automata
Feb 10
source share
2 answers

As you say in the question:

I know that to convert DFA, M to complement M`, I just need to change the initial receiving states and the final receiving states.

This is not an add-on, but you are doing something like a reverse language and ordinary languages ​​are closed when you turn around .. a>

DFA Reversal

What is a reverse language?

An appeal to the language L (denoted by L R ) is a language consisting of the appeal of all strings to L.

Given that L is L (A) for some FA A, we can construct an automaton for L R :

  • undo all edges (arcs) in the transition diagram

  • the receiving state for the automaton L R is the initial state for A

  • create a new initial state for a new automaton with epsilon transitions to each of the acceptance states for A

Note By canceling all of your arrows and exchanging the roles of the initial and receiving DFA states, you can get the NFA. why I wrote FA (not DFA)

DFA Supplement

Looking for a DFA Add-on?

Defination: complement of a language is defined in terms of a given difference from Σ * (sigma star). i.e. L ' = Σ * - L.

And the language of the supplement (L ) L has all lines from Σ * (sigma star), with the exception of lines in L. Σ * - all possible lines over the alphabet Σ.
Σ = Set of language characters

To build a DFA D that accepts the complement of L, simply convert each receiving state into a non-receiving state in D and converting each non-receiving state into an accepting state in D.
(Warning! This is not true for the NFA)

A is DFA L, D for complement

Note To build a DFA addition, the old DFA must be a complete means, so that all possible transitions from each state (or, in other words, δ should be a complete function ).

Addition: link with an example

DFA Regular Expression Supplement (00+1)*

below the DFA named A :

00 + 1

But not this DFA is not a complete DFA. the transition function δ partially defined, but not for the full domain Q×Σ (there is no output edge from q1 for lable 1 ).

Its full DFA may be as follows ( A ):

completeDFA

In the above DFA, all possible transactions are defined (* for each pair Q,Σ *), and δ is the complete function in this case.

Reff: find out what a partial function is.

A new DFA D addition can be constructed by changing all the final states q0 to non-final states and vice versa.

Thus, in complement q0 do not become final, but q1, q2 become final states.

complement

Now you can write a Regular expression for the add-on language using ARDEN THEOREM and DFA .

Here I write a regular expression to complement directly:

(00 + 1)* 0 (^ + 1(1 + 0)*)

where ^ is an empty character.

some useful links:
From here , and in my profile you can find more helpful answers on FA. In addition, there are two good references to the properties of an ordinary language: one , second

+28
Feb 11 '13 at 17:32
source share

I didn’t take the time to read all of Grijesh’s answers, but here’s an easy way to get a DFA that accepts a language supplement, given that the DFA accepts the language: use the same DFA, but change the accept state to non-accept and vice versa.

Previously accepted lines will be rejected, and lines previously rejected will be accepted. Since all transitions must be defined in any valid DFA, and since all input lines lead to exactly the same state, this always works.

To get DFAs for a U-turn, you can first build the NFA by adding a new initial state that is not determinate for all of the receiving states of the original DFA. Flip all transitions in the source DFA and make the only receiving state the source state of the source DFA.

0
Feb 11 '13 at 18:14
source share



All Articles