MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
We have two statements S1 and S2 whose definition are as follows:S1-{02n In ≥ I} is a regular language.S2-{0m 1n 0 1m+n I m=1 and n≥1I is a regular language.
A
Both S1 and S2 are correct
B
Only S2 is correct
C
Only S1 is correct
D
Neither S1 nor S2 is correct
Explanation: 

Detailed explanation-1: -Explanation: Regular grammar is subset of context free grammar.

Detailed explanation-2: -Language L1 is defined by the grammar: S1 → aS1b| Language L2 is defined by the grammar: S2 → abS2| Consider the following statements: P: L1 is regular.

Detailed explanation-3: -A language is a regular language if there is a finite automaton that recognizes it. For example, this machine recognizes the language of strings that have an even number of zeroes since any string that has an even number of zeroes will go from the start state to an accepting state.

Detailed explanation-4: -What can be said about a regular language L over a whose minimal finite state automaton has two states? Explanation: There are two states. When first state is final, it accepts even no. of a’s.

There is 1 question to complete.