Knowee
Questions
Features
Study Tools

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

🧐 Not the exact question you are looking for?Go ask a question

Solution

To find a regular expression for (L1⋃ L2)∗L2, we first need to understand what each of these languages represent.

  1. L1 = L(ab*aa): This language represents all strings that start with 'a', followed by zero or more 'b's, and ending with 'aa'.

  2. 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:

  1. 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*).

  2. (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*)*.

  3. (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*.

This problem has been solved

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)).

1/2

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.