0% found this document useful (0 votes)
191 views4 pages

4.NDFA To DFA Conversion

The document describes an algorithm to convert a non-deterministic finite automaton (NDFA) to a deterministic finite automaton (DFA) that is equivalent in the language that it accepts. The algorithm involves creating a state table from the NDFA, initializing a blank state table for the DFA, marking the start state, finding state combinations for each input, generating new DFA states, and identifying final states based on the NDFA final states. An example NDFA is given and its equivalent DFA state table and diagram are shown.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
191 views4 pages

4.NDFA To DFA Conversion

The document describes an algorithm to convert a non-deterministic finite automaton (NDFA) to a deterministic finite automaton (DFA) that is equivalent in the language that it accepts. The algorithm involves creating a state table from the NDFA, initializing a blank state table for the DFA, marking the start state, finding state combinations for each input, generating new DFA states, and identifying final states based on the NDFA final states. An example NDFA is given and its equivalent DFA state table and diagram are shown.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

NDFA to DFA Conversion

Problem Statement

Let X = (Qx, ∑, δx, q0, Fx) be an NDFA which accepts the language
L(X). We have to design an equivalent DFA Y = (Qy, ∑, δy, q0, Fy) such
that L(Y) = L(X). The following procedure converts the NDFA to its
equivalent DFA −

Algorithm

Input − An NDFA

Output − An equivalent DFA

Step 1 − Create state table from the given NDFA.

Step 2 − Create a blank state table under possible input alphabets


for the equivalent DFA.

Step 3 − Mark the start state of the DFA by q0 (Same as the NDFA).

Step 4 − Find out the combination of States {Q0, Q1,... , Qn} for each
possible input alphabet.

Step 5 − Each time we generate a new DFA state under the input
alphabet columns, we have to apply step 4 again, otherwise go to
step 6.

Step 6 − The states which contain any of the final states of the
NDFA are the final states of the equivalent DFA.

Example

Let us consider the NDFA shown in the figure below.


q δ(q,0) δ(q,1)

a {a,b,c,d,e} {d,e}

b {c} {e}

c ∅ {b}

d {e} ∅

e ∅ ∅
Using the above algorithm, we find its equivalent DFA. The state
table of the DFA is shown in below.

q δ(q,0) δ(q,1)

[a] [a,b,c,d,e] [d,e]

[a,b,c,d,e] [a,b,c,d,e] [b,d,e]

[d,e] [e] ∅

[b,d,e] [c,e] [e]

[e] ∅ ∅

[c, e] ∅ [b]

[b] [c] [e]

[c] ∅ [b]

The state diagram of the DFA is as follows −

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy