GATE CS 2021 Set 2 | Question 57
Theory of Computation › Regular Grammar · MSQ · 2 marks · Answer: A, B, C
- Question 57Theory of Computationmsq2 marksWhich of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string is divisible by three.
- A.✓
- B.✓
- C.✓
- D.
Answer: A, B, C
Solution
Building the DFA that tracks the remainder modulo 3 and converting it to a regular expression, options (A), (B) and (C) each generate exactly the binary strings whose value is divisible by 3 (including ); (D) does not. - A.
More GATE PYQ on Regular Grammar
All GATE CS Theory of Computation PYQ →Attempt GATE CS 2021 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →