I have to do L1 U L2 and intersection L1 n L2
1
There are 1 best solutions below
Related Questions in AUTOMATA
- L = {www| w belongs to {0,1}*} prove via pumping lemma
- How to design a regex used for searching a pattern, rather than validating a pattern?
- Is $E_{LBA}$ a Turing recognizable language?
- Bisimulation in state transition system
- Lexical analyser : how to identify the end of a token
- Is ε terminal in context-free?
- How can I build string matching tree from array of regex-es?
- Simple explanation of PDA accept states?
- automata theorem: existance of a DFA
- Design DFA that checks wheter a boolean formula is true or false
- DFA that contains 1101 as a substring
- Number of Turing Machines?
- 1 or 2 right hand side variable in Context free language
- I'm trying to solve DFA
- Automata on ruby
Related Questions in DFA
- how to handle Unicode dot in table driven FSM?
- i want dfa that accept string of{a,b,c} that starting with a and ending with c and have even no. of b
- How to design a regex used for searching a pattern, rather than validating a pattern?
- Difference Between KMP and Regex/DFA-based Searching
- Deterministic Finite State Automaton (DFA) Exam Q
- Converting DFA to RE
- Deterministic Finite Automata with 6 states
- Create Syntax tree from given Regular Expressions (For RE to DFA)
- If pref(L) is regular, does that imply L is also regular?
- Suggestions to implement a DFA to classify binary strings with a genetic algorithms strategy
- Python: Converting a list of sets to a set
- Can final and non-final states having identical configurations be merged together in a minimal DFA?
- Regex Matching a string
- How to convert a DFA to a Turing machine?
- how to intuitively think while Designing an NFA
Related Questions in NFA
- how to handle Unicode dot in table driven FSM?
- i want dfa that accept string of{a,b,c} that starting with a and ending with c and have even no. of b
- Why can't the Kleene closure construction for an NFA be simplified?
- Design NFA with changing alphabet and language
- If pref(L) is regular, does that imply L is also regular?
- Regex Matching a string
- how to intuitively think while Designing an NFA
- I'm trying to solve DFA
- NFA pros and cons compared to DFA?
- Difference between Transducer and NFA
- RegEx that matches "variable" strings/sequences? + backtracking?
- RE: implemrnting match range {m,n} in NFA?
- Representing graphs in clojure
- How do we know that an NFA has a minimum amount of states?
- How to implement regular expression NFA with character ranges?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?


You can run through the formal Cartesian product machine construction to algorithmically derive automata for the intersection and union of L1 and L2. However, since these languages are so easy, it might be simpler to give the languages and just write down a DFA for each one.
L1 is the language of all strings of as and bs with at least one a. L2 is the language of all strings of as and bs with at least two bs.
To accept the intersection of L1 and L2, we need to see at least one as and two bs. Below, we have six states:
q5, where we still need one a
--->q0-a->q1-b->q2-b->q3 -b->q4-a->q2 q3 -b->q5-a->q3
(where transitions are missing, they are self loops)
Note that there are six states: this is the same as if we had done the Cartesian product machine construction on the original DFAs of two and three states, respectively.
For union, we can use the exact same DFA and change the set of accepting states to q1, q3, q5. This captures the fact that we now accept when either condition is true (and states q1 and q5 are where one, but not both (as in q3) conditions become satisfied).