Regular expressions MCQ

Errorlogger
5
1. Regular expressions are used to represent which language
a) Recursive language
b) Context free language
c) Regular language
d) All of these


2. Which of the following operation can be applied on regular expressions?
a) Union
b) Concatenation
c) Closure
d) All of these


3. The set of all strings over ∑ = {0,1} in which all strings that beings and ends with 0 is
a) 0(0+1)0
b) 00
c) 00(0+1)0
d) All of these


4. The set of all strings over ∑ = {a,b} in which all strings having bbbb as substring is
a) (a+b)* bbbb (a+b)*
b) (a+b)* bb (a+b)*bb
c) bbbb (a+b)*
d) bb (a+b)*



5. The set of all strings over ∑ ={a,b} in which a single a is followed by any number of b’s a single b followed by any number of a’s is
a) ab* + ba*
b) ab*ba*
c) a*b + b*a
d) None of these


6. The set of all strings over ∑ = {a,b} in which all strings of a’s and b’s ending in bb is
a) ab
b) a*bbb
c) (a+b)* bb
d) All of these


7. Which of the following identity is wrong?
a) R + R = R
b) (R*)* = R*
c) ɛR = Rɛ = R
d) Ã˜R = RØ = RR*


8. Which of the following statement is true?
a) Every language that is defined by regular expression can also be defined by finite automata
b) Every language defined by finite automata can also be defined by regular expression
c) We can convert regular expressions into finite automata
d) All of these


9. Which of the following identity is true?
a) É› +RR* = R* = É› + R*R
b) (R1R2)*R1 = R1(R2R1)*
c) R*R* = R*
d) All of these



10. If P, Q, R are three regular expressions and if P does not contain a then the equation R = R + RP has a unique solution given by
a) R = QP*
b) R = P*Q
c) R = RP
d) None of these
Tags

Post a Comment

5Comments

Post a Comment

#buttons=(Accept !) #days=(30)

Our website uses cookies to enhance your experience. Check Now
Accept !