Skip to content
GATEiit

GATE CSE 2017 Session 1 Q32: Minimum DFA states for (a+b)*b(a+b)

Syllabus topic: Regular expressions and finite automata

Question

Consider the language L given by the regular expression (a+b)∗b(a+b) over the alphabet {a,b}. The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting L is ________.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 4 (official GATE 2017 final answer key)

Concept used: L is the set of strings whose second-last symbol is b; a DFA must remember the last two symbols read.

Concept notes

Loading notes…

First step: Describe L in words, then count the distinguishable classes based on the last two symbols seen.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on Regular expressions and finite automata

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2017 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key