Let and be languages over represented by the regular expressions and , respectively. Which of the following is true?
View worked solution
Answer: C
To determine the relationship between the languages and , let us analyze the strings generated by their respective regular expressions over the alphabet .
- Language :
This is the standard regular expression representing the set of all possible strings over , including the empty string . Thus, .
- Language :
Let us check if we can generate the basic symbols and from the inner expression :
- By choosing the first term, we can generate .
- By choosing the second term and selecting the exponent , we can generate .
Since the inner expression can generate both and , its Kleene closure can generate any sequence of 's and 's. Therefore, also represents the set of all possible strings over , i.e., .
Since both languages generate the set of all strings over :
Hence, the correct option is C.
Free practice · Your answers on this page are not saved.
