McqMate

Q. |
## 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? |

A. | (0*10*1)* |

B. | 0*(10*10*)* |

C. | 0*(10*1*)*0* |

D. | 0*1(10*1)*10* |

Answer» B. 0*(10*10*)* |

569

0

Do you find this helpful?

1

View all MCQs in

Theory of ComputationNo comments yet

- 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?
- 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
- 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 :
- 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?
- Let w be any string of length n is {0,1}*. Let L be the set of all substrings of w. What is the minimum number of states in a non-deterministic finite automaton that accepts L?
- Consider the NFA M shown below. Let the language accepted by M be L. Let L1 be the language accepted by the NFA M1, obtained by changing the accepting state of M to a non-accepting state and by changing the non-accepting state of M to accepting states. Which of the following statements is true?
- Let L be a language defined over an alphabet ∑,then the language of strings , defined over ∑, not belonging to L denoted by LC or L. is called :
- The set strings of 0's and 1's with atmost one pair consecutive one's-