Consider the following two languages over the alphabet :
Which ONE of the following statements is CORRECT?
View worked solution
Answer: C
To determine the regularity of the two languages, we analyze them individually:
1. Analysis of :
Let us intersect with the regular language :
To see why , if , then any choice of prefix and suffix starting with and ending with (i.e., ) forces to be empty, which is not allowed because . Since is a well-known non-regular language (provable by the pumping lemma) and regular languages are closed under intersection, is not regular.
2. Analysis of :
Since , we can write for some . Any string in is of the form with . By choosing , we can express any such string as:
Thus, is simply the set of all strings over that start with , end with , and have a length of at least . This can be represented by the regular expression:
Since it can be defined by a regular expression, is regular.
Free practice · Your answers on this page are not saved.
