# UGCNET-Nov2017-ii-33

2.2k views

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.

edited

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.

selected
0

but it is not correct RE for odd numbers..

it will not accept 11110001110001,

the correct RE should be (0+1)*1

but among given RE's which does not accept even decimal eqvlnt, option 3 is correct..

0

Read the question again carefully. The question is asking that which of the given options will not contain even numbers. It is not asking for the regular expression for odd numbers. :)

0
i have already mentioned in my comment what you are saying..
1
Sorry, I said that before u edited
1
no problem :)
0

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 ?

## Related questions

1 vote
1
2.2k views
Which of the following statements is/are TRUE? The grammar $S \rightarrow SS \mid a$ is ambiguous. (Where $S$ is the start symbol) The grammar $S \rightarrow 0S1 \mid 01S \mid \epsilon$ is ambiguous. (The special symbol $\epsilon$ represents the empty string) (Where $S$ is the start symbol) The ... are TRUE. Only (a) and (c) are TRUE. Only (b) and (c) are TRUE. All of (a), (b) and (c) are TRUE.
1 vote