COMPILER DESIGN

TOOLS AND TECHNIQUES FOR COMPILER DESIGN

MISCELLENOUS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Regular set for the regular expression b+ denotes
A
zero or more occurrences of b
B
one or more occurrences of b
C
only one occurrence ofb
D
none of the mentioned
Explanation: 

Detailed explanation-1: -Write the regular expression for the language accepting all the string containing any number of a’s and b’s. Solution: The regular expression will be: r.e. = (a + b)*

Detailed explanation-2: -Hence if a string does not end with ab then it ends with a or if it ends with b the last b must be preceded by a symbol b. Since it can have any string in front of the last a or bb, ( a + b )*( a + bb ) is a regular expression for the language.

Detailed explanation-3: -∅* = * = RR* = R*R. R*R* = R* (R*)* = R* RR* = R*R. (PQ)*P =P(QP)* (a+b)* = (a*b*)* = (a*+b*)* = (a+b*)* = a*(ba*)* More items

There is 1 question to complete.