MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following are non regular?
A
The set of strings in {a, b}* with an even number of b’s
B
The set of strings in {a, b, c}* where there is no c anywhere to the left of a
C
The set of strings in {0, 1}* that encode, in binary, an integer w that is a multiple of 3. Interpret the empty strings e as the number 0.
D
None of the mentioned
Explanation: 

Detailed explanation-1: -Which of the following is/are non regular? Explanation: There is no regular expression that can parse HTML documents. Other options are also non-regular as they cannot be drawn into finite automaton.

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

Detailed explanation-3: -Definition: A language that cannot be defined by a regular expression is a nonregular language or an irregular language.

Detailed explanation-4: -Which of the following is a regular language? a)String whose length is a sequence of prime numbersb)String with substring wwrin betweenc)Palindrome stringd)String with even number of Zero’sCorrect answer is option ‘D’.

There is 1 question to complete.