Consider the following Assertion (A) and Reason (R).
Assertion (A): The regular expression
denotes exactly the binary strings whose numeric values are divisible by $3$, with considered divisible by $3$.
Reason (R): In the standard three-state remainder DFA for divisibility by $3$, eliminating state replaces the path by the subexpression .
Which of the following is correct?
C
Step-by-Step Solution
Insight: assertion-reason questions on divisibility regexes require checking both the language claimed and the exact state-elimination formula.
Exam route:
Step 1: The assertion is the standard regex for binary strings divisible by $3$, with $\epsilon$ included. So A is true.
Step 2: In the modulo-$3$ DFA, the transitions are:
$q_0\xrightarrow{0}q_0$, $q_0\xrightarrow{1}q_1$;
$q_1\xrightarrow{0}q_2$, $q_1\xrightarrow{1}q_0$;
$q_2\xrightarrow{0}q_1$, $q_2\xrightarrow{1}q_2$.
Step 3: The path $q_1\to q_2\to q_1$ uses $0$ to enter $q_2$, $1$ as the self-loop on $q_2$, and $0$ to return to $q_1$. Therefore the replacement is $01^0$, not $10^1$.
Step 4: Hence R is false.
Learning route:
The standard DFA tracks remainders modulo $3$.
From remainder $r$, reading bit $b$ moves to $(2r+b)\bmod3$.
Thus:
- from $q_1$, reading $0$ gives $2$, so $q_1\xrightarrow{0}q_2$;
- from $q_2$, reading $1$ gives $(4+1)\bmod3=2$, so $q_2$ has a self-loop on $1$;
- from $q_2$, reading $0$ gives $4\bmod3=1$, so $q_2\xrightarrow{0}q_1$.
Eliminating $q_2$ therefore replaces the detour $q_1\to q_2\to q_1$ by $0(1)^0=01^0$.
The reason claims $10^*1$, which swaps the entry/exit labels and the loop label, so it is false.
The assertion is true because the full elimination yields $(0+1(01^0)^1)^*$, which accepts $0$, $11$, $1001$, etc., and rejects $1$, $10$, $100$, matching divisibility by $3$.
Answer: A is true, but R is false.
Tempting wrong path: memorise the final regex but misremember the eliminated subexpression as $10^*1$. That makes R look true and leads to option A or B. The break occurs at the actual edge labels in the DFA.
Generalization: in state elimination, the replacement for a detour is always incoming-label, loop-label star, outgoing-label, in that order.
Verification: check the detour $q_1\xrightarrow{0}q_2\xrightarrow{0}q_1$ with possible $1$-loops at $q_2$; this produces $01^*0$, confirming that R is false while A remains true.