COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
{ø}
|
|
{
|
|
a*
|
|
{
|
Detailed explanation-1: -Consider the languages L1 =and L2 = a. Which one of the following represents L1 L2*U L1*a)Ab)Bc)Cd)DCorrect answer is option ‘A’.
Detailed explanation-2: -Regular Languages are closed under intersection, i.e., if L1 and L2 are regular then L1 ∩ L2 is also regular.
Detailed explanation-3: -4. If L1 and L2 are regular languages, which among the following is an exception? Explanation: It the closure property of Regular language which lays down the following statement: If L1, L2 are 2-regular languages, then L1 U L2, L1 ∩ L2, L1C, L1 – L2 are regular language.
Detailed explanation-4: -(1) If L1 ∪ L2 is regular and L1 is finite, then L2 is regular. TRUE. Because L2 = (L1 ∪L2)−(L1 −L2). The first part is regular by assumption, the second part is regular because it is finite (being a finite set minus something), and regular languages are closed under set difference.
Detailed explanation-5: -Detailed Solution. The correct answer is “option 2". The ∑ = a and the NFA accept the following strings: a, aa, aaa, aaaa, ……