Which of the following REs correspond to the same language?
I. (00)*(ε + 0)
II. (00)*
III. 0(00)*
IV. 0*
Option I
(00)*(ε + 0)
The language generated by this RE is (00)n 0 where n>=0
=> The strings generated are : {0, 000, 00000, 0000000, ......} ie strings containing odd number of zeroes
Option II
(00)*
The language generated by this RE is (00)n where n>=0
=> The strings generated are : {00, 0000, 000000, ......} ie strings containing even number of zeroes
Option III
0(00)*
The language generated by this RE is 0 (00)n where n>=0
=> The strings generated are : {0, 000, 00000, 0000000, ......} ie strings containing odd number of zeroes
Option IV
0*
The language generated by this RE is 0n where n>=0
=> The strings generated are: {0, 00, 000, 0000, ....} ie strings containing both odd and even number of zeroes
=> Therefore Option I and Option III are generating the same language.
Get Answers For Free
Most questions answered within 1 hours.