in Theory of Computation edited by
3,302 views
2 votes
2 votes

Which of the following regular expressions, each describing a language of binary numbers (MSB to LSB) that represents non-negative decimal values, does not include even values?

  1. $0^*1^+0^*1^*$
  2. $0^*1^*0^+1^*$
  3. $0^*1^*0^*1^+$
  4. $0^+1^*0^*1^*$

Where $\{+,\ * \}$ are quantification characters.

in Theory of Computation edited by
by
3.3k views

1 Answer

3 votes
3 votes
Best answer

When a number is represented in binary form, for odd numbers, we have a 1 in the LSB while a 0 in LSB for even numbers.

So, only the language generated by option (3) $0^*1^*0^*1^+$ will, for sure, have a 1 in the LSB. So, this language won't contain any even numbers.

Answer: option (3)

selected by

4 Comments

Sorry, I said that before u edited
1
1
no problem :)
1
1

Rishabh Gupta 2

in question , it is also mentioned like non-negative ryt then, first digit should be 0 always then MSB should be like 0

can you pls clarify my doubt ?

thanks in advance

0
0
Answer:

Related questions