nfa

Why L={wxw^R| w, x belongs to {a,b}^+ } is a regular language

假装没事ソ 提交于 2019-11-27 02:59:48
问题 Using pumping lemma, we can easily prove that the language L1 = {WcW^R|W ∈ {a,b}*} is not a regular language . (the alphabet is {a,b,c}; W^R represents the reverse string W) However, If we replace character c with "x"(x ∈ {a,b}+) , say, L2 = {WxW^R| x, W ∈ {a,b}^+} , then L2 is a regular language . Could you give me some ideas? 回答1: If we replace character c with x where (x ∈ {a,b} + ), say, L2 = {WXW R | x, W ∈ {a,b} + }, then L2 is a regular language. Yes, L2 is Regular Language :). You can

drawing minmal DFA for the given regular expression

北战南征 提交于 2019-11-27 02:06:44
What is the direct and easy approach to draw minimal DFA , that accepts the same language as of given Regular Expression(RE) . I know it can be done by: Regex ---to----► NFA ---to-----► DFA ---to-----► minimized DFA But is there any shortcut way? like for (a+b)*ab Grijesh Chauhan Regular Expression to DFA Although there is NO algorithmic shortcut to draw DFA from a Regular Expression(RE) but a shortcut technique is possible by analysis not by derivation, it can save your time to draw a minimized dfa. But off-course the technique you can learn only by practice. I take your example to show my

Finding the complement of a DFA?

天涯浪子 提交于 2019-11-26 22:12:23
I am asked to show DFA diagram and RegEx for the complement of the RegEx (00 + 1)* . In the previous problem I had to prove that the complement of a DFA is closed and is a regular expression also, so I know that to convert a DFA, M to the complement, M`, I just need to swap the initial accepting states and final accepting states. However, it appears that the initial accepting states for the RegEx are {00, 1, ^} and the final accepting states are {00, 1, ^} as well. So swapping them will just result in the exact same RegEx and DFA which seems contradictory. Am I doing something wrong or is this

DFA vs NFA engines: What is the difference in their capabilities and limitations?

瘦欲@ 提交于 2019-11-26 18:55:13
问题 I am looking for a non-technical explanation of the difference between DFA vs NFA engines, based on their capabilities and limitations. 回答1: Deterministic Finite Automatons (DFAs) and Nondeterministic Finite Automatons (NFAs) have exactly the same capabilities and limitations. The only difference is notational convenience. A finite automaton is a processor that has states and reads input, each input character potentially setting it into another state. For example, a state might be "just read

Finding the complement of a DFA?

巧了我就是萌 提交于 2019-11-26 08:13:30
问题 I am asked to show DFA diagram and RegEx for the complement of the RegEx (00 + 1)* . In the previous problem I had to prove that the complement of a DFA is closed and is a regular expression also, so I know that to convert a DFA, M to the complement, M`, I just need to swap the initial accepting states and final accepting states. However, it appears that the initial accepting states for the RegEx are {00, 1, ^} and the final accepting states are {00, 1, ^} as well. So swapping them will just