COMPUTER SCIENCE AND ENGINEERING
THEORY OF COMPUTATION
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
(a + b)
|
|
(a + b) (a + b)*
|
|
(a + b) (a + b)
|
|
None of these
|
Detailed explanation-1: -Two regular expressions are equivalent if languages generated by them are same. For example, (a+b*)* and (a+b)* generate same language. Every string which is generated by (a+b*)* is also generated by (a+b)* and vice versa.
Detailed explanation-2: -Regular expressions are equal if and only if they correspond to the same language. Thus for example ( a + b )* = ( a*b* )*, because they both represent the language of all strings over the alphabet a, b.
Detailed explanation-3: -Which of the following regular expression is equivalent to R(1, 0)? Explanation: What we observe from the question is that, it includes e and 11 and any number of 1’s then. Therefore, its simplifies when we write the same reg. Expression as (11+111)*.
Detailed explanation-4: -It is equivalent to the Nd regular expression pattern, which includes the standard decimal digits 0-9 as well as the decimal digits of a number of other character sets. If ECMAScript-compliant behavior is specified, ịs equivalent to [0-9].