Question
Official answer and solution
- Official answer
- A
- From
- Official GATE 2024 answer key
Solution
Convert the 2-state DFA (which accepts strings with an odd number of 1s) into a regular expression using Arden's theorem or state elimination.
Let the initial (left) state be and the accepting (right) state be .
- From , the DFA reads any number of
0s () and transitions to on reading the first1(). - Once in the accepting state , the DFA can return to any number of times either by reading
0directly (self-loop on ) or by reading1(moving to ), any number of0s (), and another1(returning to ), which corresponds to .
Hence the regular expression for the language accepted by the DFA is .
Final answer
Option (A)
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2024 Computer Science and Information Technology - Set 2 (CS2)
- Question
- 22 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.