Let L1=L(ab∗aa), L2=L(a∗bba∗). Find a regular expression for (L1⋃ L2)∗L2
Question
Let L1=L(ab∗aa), L2=L(a∗bba∗). Find a regular expression for (L1⋃ L2)∗L2
Solution
To find a regular expression for (L1⋃ L2)∗L2, we first need to understand what each of these languages represent.
-
L1 = L(ab*aa): This language represents all strings that start with 'a', followed by zero or more 'b's, and ending with 'aa'.
-
L2 = L(abba): This language represents all strings that start with zero or more 'a's, followed by 'bb', and ending with zero or more 'a's.
Now, let's find the regular expression for (L1⋃ L2)∗L2:
-
L1⋃ L2: This represents the union of L1 and L2, which means it includes all strings that are either in L1 or L2. The regular expression for this would be (abaa | abba*).
-
(L1⋃ L2)∗: This represents zero or more occurrences of strings that are either in L1 or L2. The regular expression for this would be (abaa | abba*)*.
-
(L1⋃ L2)∗L2: This represents zero or more occurrences of strings that are either in L1 or L2, followed by a string that is in L2. The regular expression for this would be (abaa | abba*)abba*.
So, the regular expression for (L1⋃ L2)∗L2 is (abaa | abba*)abba*.
Similar Questions
Let L1 = L (a∗baa∗) and L2 = L (aba∗). Find L1/L2
Find the minimal dfa that accepts L(a∗bb) ∪ L(ab∗ba).
Find dfa’s that accept the following languages:(a) L = L (ab∗a∗) ∪ L ((ab)∗ ba).
If L1 is regular L2 is unknown but L1-L2 is regular ,then L2 must be
L (ab (a + ab)∗ (a + aa)).
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.