Question 48Asked in UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)

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

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? Where {+, *} are quantification characters.
  1. A0*1+0*1*
  2. B0*10+1*
  3. C0*1*0*1+
  4. D0*1*0*1*
Show answerHide answer

Correct answer: (C) 0*1*0*1+

Explanation

Odd binary numbers end with 1 in the LSB and even numbers end with 0. Only 0*1*0*1+ always ends with at least one 1, so its language contains no even values.

From UGC NET Computer Science PYQ, November 2017 (Paper II & III, Selected Questions)

This is question 48 of UGC NET Computer Science PYQ, November 2017 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.