Convert an NFA to a DFA (Subset Construction) and Describe the Accepted Language

Convert an NFA to a DFA (Subset Construction) and Describe the Accepted Language

Verified Sources
Sep 12, 2026

We will determinize the given ϵ\epsilon-free NFA using Powerset/Subset Construction. After building the DFA transition table, we will Accepting State (DFA) characterization to informally describe the language.

We are given NFA states {p,q,r,s,t}\{p,q,r,s,t\} with start state pp and accept state ss. Transitions (from the table):

  • From pp: on input 00, go to {p,q}\{p,q\}; on input 11, go to {p}\{p\}.
  • From qq: on input 00, go to {r,s}\{r,s\}; on input 11, go to {t}\{t\}.
  • From rr: on input 00, go to {p,r}\{p,r\}; on input 11, go to {t}\{t\}.
  • From ss: on both 00 and 11, go to \emptyset.
  • From tt: on both 00 and 11, go to \emptyset.

Key terms we will use:

  • DFA
  • NFA
  • Transition Function
  • Language
  • Accepting State

A compact way to keep track is the DFA transition rule: If the current DFA state is a set SS of NFA states, then on symbol a{0,1}a\in\{0,1\} the next DFA state is

δDFA(S,a)=xSδNFA(x,a).\delta_{\text{DFA}}(S,a)=\bigcup_{x\in S}\delta_{\text{NFA}}(x,a).

This is the core of Subset Construction.

NFA to DFA (Subset Construction) - Powerset Method

Step-by-step determinization (NFA to DFA)

  1. 1
    Step 1

    The DFA start state is the set containing the NFA start state: {p}\{p\}.

  2. 2
    Step 2

    Use δDFA(S,0)=xSδNFA(x,0)\delta_{\text{DFA}}(S,0)=\bigcup_{x\in S}\delta_{\text{NFA}}(x,0). For example, from S={p}S=\{p\}, we get {p,q}\{p,q\}. Continue for every new subset you find.

  3. 3
    Step 3

    Use δDFA(S,1)=xSδNFA(x,1)\delta_{\text{DFA}}(S,1)=\bigcup_{x\in S}\delta_{\text{NFA}}(x,1). For example, from S={p}S=\{p\}, we get {p}\{p\}. Continue until no new subsets appear.

  4. 4
    Step 4

    When a transition yields \emptyset, include \emptyset as a DFA state. It is a dead state because any move from \emptyset stays \emptyset.

  5. 5
    Step 5

    Because ss is the only accepting NFA state, any DFA subset SS that contains ss is accepting.

1) Enumerate DFA states (subsets) reachable from the start

Start subset: A0={p}A_0=\{p\}.

Now compute systematically.

From p\\{p\\}

  • On 00: δ(p,0)={p,q}\delta(p,0)=\{p,q\}, so {p}0{p,q}\{p\}\xrightarrow{0}\{p,q\}.
  • On 11: δ(p,1)={p}\delta(p,1)=\{p\}, so {p}1{p}\{p\}\xrightarrow{1}\{p\}.

So we discover A1={p,q}A_1=\{p,q\}.

From p,q\\{p,q\\}

  • On 00:
    • from pp on 00 gives {p,q}\{p,q\}
    • from qq on 00 gives {r,s}\{r,s\}
    • union: {p,q}{r,s}={p,q,r,s}\{p,q\}\cup\{r,s\}=\{p,q,r,s\} Hence {p,q}0{p,q,r,s}\{p,q\}\xrightarrow{0}\{p,q,r,s\}.
  • On 11:
    • from pp on 11 gives {p}\{p\}
    • from qq on 11 gives {t}\{t\}
    • union: {p,t}\{p,t\} Hence {p,q}1{p,t}\{p,q\}\xrightarrow{1}\{p,t\}.

So we discover A2={p,q,r,s}A_2=\{p,q,r,s\} and A3={p,t}A_3=\{p,t\}.

From p,t\\{p,t\\}

  • On 00: p0{p,q}p \xrightarrow{0}\{p,q\} and t0t\xrightarrow{0}\emptyset, union {p,q}\Rightarrow \{p,q\}.
  • On 11: p1{p}p \xrightarrow{1}\{p\} and t1t\xrightarrow{1}\emptyset, union {p}\Rightarrow \{p\}.

So A30A1A_3 \xrightarrow{0} A_1 and A31A0A_3 \xrightarrow{1} A_0.

From p,q,r,s\\{p,q,r,s\\}

  • On 00:
    • p0{p,q}p \xrightarrow{0} \{p,q\}
    • q0{r,s}q \xrightarrow{0} \{r,s\}
    • r0{p,r}r \xrightarrow{0} \{p,r\}
    • s0s \xrightarrow{0} \emptyset union: {p,q}{r,s}{p,r}={p,q,r,s}\{p,q\}\cup\{r,s\}\cup\{p,r\}\cup\emptyset=\{p,q,r,s\} Hence it loops: {p,q,r,s}0{p,q,r,s}\{p,q,r,s\}\xrightarrow{0}\{p,q,r,s\}.
  • On 11:
    • p1{p}p \xrightarrow{1} \{p\}
    • q1{t}q \xrightarrow{1} \{t\}
    • r1{t}r \xrightarrow{1} \{t\}
    • s1s \xrightarrow{1} \emptyset union: {p}{t}={p,t}\{p\}\cup\{t\}=\{p,t\} Hence {p,q,r,s}1{p,t}\{p,q,r,s\}\xrightarrow{1}\{p,t\}.

So far, we have subsets:
A0={p}A_0=\{p\}, A1={p,q}A_1=\{p,q\}, A2={p,q,r,s}A_2=\{p,q,r,s\}, A3={p,t}A_3=\{p,t\}.

Transitions that produce emptyset\\emptyset

We still should include emptyset\\emptyset if any transition ever yields it. Note:

  • From any subset we computed, the union always included at least one non-empty target set, so emptyset\\emptyset is not reachable from the start under these transitions.
  • Still, for completeness, we can define it as a dead DFA state in the construction.

Accepting DFA states

Since ss is accepting in the NFA, any DFA subset containing ss is accepting. Only A2={p,q,r,s}A_2=\{p,q,r,s\} contains ss. So the DFA accepting state set is: {A2}\{A_2\}.

2) Final DFA transition table

Let the DFA states be:

  • A0={p}A_0=\{p\}
  • A1={p,q}A_1=\{p,q\}
  • A2={p,q,r,s}A_2=\{p,q,r,s\}
  • A3={p,t}A_3=\{p,t\}
  • (optional) A4=A_4=\emptyset (dead)
DFA stateon 0on 1Accepting?
A0={p}A_0=\{p\}A1={p,q}A_1=\{p,q\}A0={p}A_0=\{p\}No
A1={p,q}A_1=\{p,q\}A2={p,q,r,s}A_2=\{p,q,r,s\}A3={p,t}A_3=\{p,t\}No
A2={p,q,r,s}A_2=\{p,q,r,s\}A2={p,q,r,s}A_2=\{p,q,r,s\}A3={p,t}A_3=\{p,t\}Yes
A3={p,t}A_3=\{p,t\}A1={p,q}A_1=\{p,q\}A0={p}A_0=\{p\}No
A4=A_4=\emptysetA4A_4A4A_4No

This DFA is equivalent to the given NFA with respect to the accepted Language.

How to spot accepting DFA states quickly

Because the NFA accepts exactly when it is in state ss, in the DFA you just check whether the current subset contains ss. Here that happens only for the subset {p,q,r,s}\{p,q,r,s\}.

Avoid a common mistake with unioning transitions

When determinizing, you must union transitions from all NFA states in the subset. Do not pick just one state (e.g., do not track only pp once you have {p,q}\{p,q\}—you must also account for qq’s transitions).

3) Informal description of the accepted language

Recall: the NFA accepts a string iff at the end there is at least one computation path that places the automaton in state ss.

From the transition structure:

  • The only way to reach ss is from qq on input 00: q0{r,s}q \xrightarrow{0} \{r,s\}.
  • Therefore, acceptance requires that at some point (sometime before the end), the NFA simulation can be in state qq, and the next symbol must be 00 (so that one branch moves into ss).
  • Once ss is reached, it must survive until the end of the input. But from ss, on both 00 and 11, the NFA transitions go to \emptyset. That means if you ever consume any further input after first entering ss, that computation branch dies.
  • Hence, for the string to be accepted, you must enter ss exactly at the final symbol consumption (i.e., the last symbol must be a 00 that is taken on a transition out of qq).

Now observe how qq appears:

  • p0{p,q}p \xrightarrow{0} \{p,q\} introduces qq when the machine reads a 00 while a pp-branch exists.
  • In this NFA, there is always a pp-branch available at many times (e.g., pp loops on input 11, and also remains available via 00 transitions from pp and rr).

A simple informal characterization consistent with the DFA:

  • The DFA reaches the accepting subset A2={p,q,r,s}A_2=\{p,q,r,s\} only after reading a prefix that ends with a 00 while the machine still has an active qq-branch.
  • From the accepting subset, reading another symbol drops you back to non-accepting subsets because ss cannot persist (it goes to \emptyset after consuming any further input).

Informal language statement:

The language consists of those binary strings whose last symbol is a 00, such that just before that last 00 there is a reachable configuration containing state qq (equivalently, the subset construction reaches p,q,r,s\\{p,q,r,s\\} exactly after consuming the final symbol).

In terms of the DFA we built:

  • You accept exactly when the DFA ends in A2A_2.
  • Since A2A_2 transitions on 00 stay in A2A_2, and on 11 move to A3A_3, acceptance depends on whether the input ends in a position where ss is created by a qq-00 move and no further symbols are read.

Determinization workflow for this specific NFA

Initial DFA state

Start

Use {p}\{p\}."

Apply union-of-NFA-moves

Read next symbol

Compute targets on 00 and 11 from the current subset."

Repeat until closed

Discover new subsets

Keep adding any newly reached subsets to the DFA state set."

Use subset membership

Mark accepting

Accept if subset contains ss → here only {p,q,r,s}\{p,q,r,s\}."

Quick checks for NFA→DFA (subset construction)

1 / 5
Question · Term

What is the DFA start state in subset construction?

Click to reveal
Answer · Definition

The set containing the NFA start state. Here: {p}\{p\}.

Knowledge Check

Question 1 of 4
Q1Single choice

In the subset construction, the DFA transition from subset SS on input symbol aa is computed as: