DFA for binary strings not ending in 01

December 4, 2026 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-501 Theory of Computation November 2023 Solved Paper

Question

Construct a DFA over {0,1} accepting strings that do not end in 01.

Asked in: CS-501 | November 2023 | 1(a)

Answer

Use states A (no relevant suffix), B (ends in 0), C (ends in 01). Start A; accept A,B. On 0,1 respectively: A→B,A; B→B,C; C→B,A. The invariant tracks the longest suffix that is a prefix of 01. Thus only strings ending in 01 are rejected.

← RGPV CS-501 Theory of Computation November 2023 Solved Paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion