TOOLS AND TECHNIQUES FOR COMPILER DESIGN
MISCELLENOUS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1*
|
{ø}
|
|
{
|
|
a*
|
|
{
|
Explanation:
Detailed explanation-1: -Quick links for Computer Science Engineering (CSE) exam. 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: -Since regular languages are closed under complement and union, L1 ∪ L2 = L1 ∩ L2 is a regular language.
Detailed explanation-3: -If L1 and L2 are context-free languages then L1 ∪ L2 is also context-free. Proof. Let L1 be language recognized by G1 = (V1, , R1, S1) and L2 the language recognized by G2 = (V2, , R2, S2). Assume that V1 ∩ V2 = ∅; if this assumption is not true, rename the variables of one of the grammars to make this condition true.
There is 1 question to complete.