HH:MM - Guest
"We’ve created gods, and the gods will not be chained" - Ken Liu

NFA to DFA Converter

Published: January 20, 2026

Overview

This project focuses on building a system to represent and manipulate Non-deterministic Finite Automata (NFA), with the goal of converting them into equivalent Deterministic Finite Automata (DFA).

At its core, the project implements:

  • A fully functional NFA class
  • Support for validating input strings
  • An intersection operation between two NFAs
  • visualization for understand the automata

BackGround

An NFA is defined as:
M = {Q, Σ, δ, q₀, F}

Where:

  • Q: Finite set of states
  • Σ: Finite input alphabet
  • δ: Transition function mapping (state, symbol) → subset of states
  • q₀: Initial state
  • F: Set of accepting (final) states

What I Worked On

This was a 2 person group project, I focused on...

Base NFA Class

I implemented the foundational structure of the NFA class, including:

  • State management (Q)
  • Alphabet handling (Σ)
  • Transition function (δ)
  • Initial and final state validation

Epsilon Closure Logic

A big part of working with NFAs is handling epsilon moves. An epsilon move in an NFA is a transition that happens without consuming any input character. I implemented the logic needed to correctly compute epsilon closures, which is essential for:

  • Accurate simulation of NFAs
  • Future conversion to DFA

Visualization

I did almost the entire visual side of the project, my understanding only goes as far as I can explain it and using visuals is a great tool for this so I always like to do some. The visuals show:

  • how states connect
  • the transitions
  • See the result of operations like intersection

this is just a quick overview, read the git link below for more (:

https://github.com/Blake1332/COMP382-Assignment-1

nfa-to-dfa-converter
2026-01-20
YouTube GitHub Facebook
ALL RIGHTS RESERVED.