edited by
3,282 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.

edited by

1 Answer

Best answer
3 votes
3 votes

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
Answer:

Related questions

1 votes
1 votes
2 answers
2
Arjun asked Nov 5, 2017
3,071 views
Which speed up could be achieved according to Amdahl's Law for infinte number of processes if $5\%$ of a program is sequential and the remaining part is ideally parallel?...
0 votes
0 votes
1 answer
3
Arjun asked Nov 5, 2017
2,520 views
Which of the given wireless technologies used in IoT, consumes the least amount of power?ZigbeeBluetoothWi-FiGSM/CDMA
0 votes
0 votes
2 answers
4
Arjun asked Nov 5, 2017
4,592 views
Which of the following is not a Clustering method?K-Means methodSelf Organizing feature map methodK- nearest neighbor methodAgglomerative method