Consider the following language L over ∑ = {a, b} L = {(|w| mod 2 = 0 and w…

Consider the following language L over ∑ = {a, b}

L = {(|w| mod 2 = 0 and w begins with “a”) OR (|w| mod 2 = 1 and w begins with “b”) | w ϵ {a, b}*}

The sum of number of states and the number of accepting states in the minimum DFA for the language L is/are _____

Answer: 4The provided DFA has 3 states: a start state, an intermediate non-accepting state, and one accepting state. The language requires even length strings starting…

Attempted by 9 students.

Show answer & explanation

Correct answer: 4

{40F17FF8-A7E2-471F-A84B-83BF98CC8AE0}.png

The provided DFA has 3 states: a start state, an intermediate non-accepting state, and one accepting state. The language requires even length strings starting with 'a' or odd length strings starting with 'b'. Tracing the transitions confirms this DFA accepts exactly these conditions. Thus, there are 3 total states and 1 accepting state. The sum is 3 + 1 = 4.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…