Let L be the set of all binary strings whose last two symbols are the same.…

2020

Let L be the set of all binary strings whose last two symbols are the same. The number of states in the minimum state deterministic finite state automaton accepting language is ______.

  1. A.

    2

  2. B.

    5

  3. C.

    8

  4. D.

    3

Attempted by 117 students.

Show answer & explanation

Correct answer: B

The language requires strings to have a length >= 2 ending in 00 or 11. The minimal DFA needs 5 states:

  1. Initial state (empty string)

  2. Read a 0 (ends in 0)

  3. Read a 1 (ends in 1)

  4. Read 00 (Final state for 00)

  5. Read 11 (Final state for 11)

Explore the full course: Coal India Management Trainee