• edited by
15,619 views
42 42 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)

7 Answers

Best answer
39 39 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
5 5 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) 

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

Correct Answer : C

(i)  (00)* (ε+0) → (00)* generates even number of 0’s if it is followed by ε it is of even length only or if it followed by another 0 it becomes of odd length.

Therefore this is 0*

(ii) (00)* → generates string of 0s of even length.

(iii) 0* → It is also same as above (i).

(iv) 0(00)* → Generates string of 0s of odd length.

Therefore, i and iii are equivalent.

Answer:
Position:
Show:

Related questions

31 31 votes
7 answers 7 answers
11.5k
11.5k views
Kathleen asked Oct 9, 2014
11,528 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...
35 35 votes
3 answers 3 answers
11.7k
11.7k views
Kathleen asked Oct 9, 2014
11,701 views
Which of the following statements is false?The Halting Problem of Turing machines is undecidableDetermining whether a context-free grammar is ambiguous is undecidableGive...
30 30 votes
1 answers 1 answer
8.8k
8.8k views
Kathleen asked Oct 9, 2014
8,804 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...
46 46 votes
6 answers 6 answers
18.4k
18.4k views
Kathleen asked Oct 9, 2014
18,441 views
Relative mode of addressing is most relevant to writing:Co – routinesPosition – independent codeShareable codeInterrupt Handlers