Assertion (A): The regular expression for binary strings divisible by $3$ is $(0 + 1(01^0)^1)^*$.
Reason (R): In the DFA for this language, the start state $q_0$ has a self-loop on input $0$.
Which of the following is correct?
B
Step-by-Step Solution
Key idea: This tests understanding of the regex derivation process and whether the reason fully explains the assertion.
Step 1: Verify Assertion (A):
- From the card, the canonical regex for binary strings divisible by 3 is indeed .
- Assertion A is true.
Step 2: Verify Reason (R):
- In the DFA, from state (remainder 0), reading input 0 gives , so we stay in .
- This means has a self-loop on input 0.
- Reason R is true.
Step 3: Check if R explains A:
- R only explains the "$0$" part of the regex (the self-loop on ).
- The full regex comes from state elimination, which involves eliminating and , not just the self-loop on .
- R is true but does NOT fully explain A.
Answer: B