edited by
10,078 views
30 votes
30 votes

Which two of the following four regular expressions are equivalent? ($\varepsilon$ is the empty string).

  1. $(00)^ * (\varepsilon +0)$
  2. $(00)^*$
  3. $0^*$
  4. $0(00)^*$
  1. (i) and (ii)
  2. (ii) and (iii)
  3. (i) and (iii)
  4. (iii) and (iv)
edited by

6 Answers

Best answer
31 votes
31 votes

Answer is C.

You can have any no. of $0$'s as well as null.

A is false because you cannot have single $0$ in ii). same for option B. In D you are forced to have single $0$ in iv) whereas not in iii).

edited by
3 votes
3 votes

i)(00)*(0+ε)

it generates any number of 0's

ii) (00)* 

it generates the only even number of 0's

iii)0*

it generates any number of 0's

iv)0(00)*

it generates the only odd number of zeroes.

So correct option is c i.e. i) and iii) 

2 votes
2 votes
i) has any number of 0's and iii) has any number of 0's so C is answer
Answer:

Related questions

23 votes
23 votes
6 answers
1
Kathleen asked Oct 9, 2014
6,204 views
If $L_1$ and $L_2$ are context free languages and $R$ a regular set, one of the languages below is not necessarily a context free language. Which one?$L_1.L_2$$L_1 \cap L...
23 votes
23 votes
1 answer
3
Kathleen asked Oct 9, 2014
5,623 views
A critical section is a program segmentwhich should run in a certain amount of timewhich avoids deadlockswhere shared resources are accessedwhich must be enclosed by a pa...
35 votes
35 votes
6 answers
4
Kathleen asked Oct 9, 2014
12,511 views
Relative mode of addressing is most relevant to writing:Co – routinesPosition – independent codeShareable codeInterrupt Handlers