MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
(0+e) (1+e) represents
A
{0, 1, 01, e}
B
{0, 1, e}
C
{0, 1, 01, 11, 00, 10, e}
D
{0, 1}
Explanation: 

Detailed explanation-1: -In the notation 0, 1*, set notation 0, 1 is used to denote “0 or 1". Alternatively, + is also used to denote alternation (JFLAP, for example). So (0+1) can also mean “0 or 1". | is also used to denote alternation (0|1) in theoretical computer science context.

Detailed explanation-2: -If is an alphabet then ∗ is the set of strings over . For example, if is 0, 1 then ∗ is the set of binary sequences. • The length of a string is the number of symbol occurrences in it. The length of 01101 is 5.

Detailed explanation-3: -(0∪1)+ is the regular expression matching all non-empty binary strings. 0, 1+ is (rarely used) to denote the regular expression that matches all non-empty binary strings (same as (0∪1)+).

Detailed explanation-4: -For example for alphabet ∑ = 0, 1 w = 010101 is a string. Length of a string is denoted as |w| and is defined as the number of positions for the symbol in the string. For the above example length is 6.

There is 1 question to complete.