McqMate

Q. |
## The regular expression have all strings in which any number of 0’s is followed by any number of 1’s followed by any number of 2’s is : |

A. | (0+1+2)* |

B. | 0*1*2* |

C. | 0* + 1 + 2 |

D. | (0+1)*2* |

Answer» B. 0*1*2* |

688

0

Do you find this helpful?

1

View all MCQs in

Theory of ComputationNo comments yet

- A language is represented by a regular expression (a)*(a + ba). Which of the following strings does not belong to the regular set represented by the above expression?
- Let L be any infinite regular language, defined over an alphabet Σ then there exist three strings x, y and z belonging to Σ such that all the strings of the form XY^ n Z for n=1,2,3, … are the words in L called
- Let L={w (0 + 1)* w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?
- Let P be a regular language and Q be context-free language such that Q ∈ P. (For example, let P be the language represented by the regular expression p*q* and Q be {pnqn n∈ N}). Then which of the following is ALWAYS regular?
- How many strings of length less than 4 contains the language described by the regular expression (x+y)*y(a+ab)*?
- Consider the following statements about the context free grammar G = {S - >SS,S - >ab,S ->ba, S - ε} I. G is ambiguous II. G produces all strings with equal number of a’s and b’s III. G can be accepted by a deterministic PDA. Which combination below expresses all the true statements about G?
- Automaton accepting the regular expression of any number of a ' s is:
- Match all items in Group 1 with correct options from those given in Group 2. List I List II**spaceP. Regular Expression 1. Syntax analysis**spaceQ. Push down automata 2. Code Generation**spaceR. Dataflow analysis 3. Lexical analysis**spaceS. Register allocation 4. Code optimization
- Which of the following are decidable? 1) Whether the intersection of two regular language is infinite. 2) Whether a given context free language is regular. 3) Whether two push down automata accept the same language. 4) Whether a given grammar is context free.
- Languages are proved to be regular or non regular using pumping lemma.