Source: https://goodhandover.co.uk/tools/dfa-simulator/

[Computer science maths](https://goodhandover.co.uk/tools/computer-science-maths/#year-2) / Year 2

🔒 Files never leave your device

# DFA simulator

Trace a word through a deterministic finite automaton and check acceptance. Your inputs stay on your device.

## Set up your task

Ready. Processing stays in this browser.

Files and text stay on your device. [Privacy details](https://goodhandover.co.uk/privacy/).

 

## How to use DFA simulator

Trace a word through a deterministic finite automaton and check acceptance. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

 

- Check the example inputs: States, Start state, Accepting states, Transitions (state symbol target), Input word.

- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.

- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

 

## Supported inputs and limits

Use up to 12 named states, six single-character symbols and 100 transitions. Supply exactly one target per state and alphabet symbol.

 

## How it works

A deterministic finite automaton is a machine with a fixed finite set of states. Reading one symbol moves it to exactly one next state. After the final input symbol, membership depends on whether that final state is marked as accepting.

The trace shows the entire run so it is possible to debug a transition table before proving a language property. A conventional complete DFA needs a transition for every state and alphabet symbol. A rejecting sink with self-loops is useful when a pattern becomes impossible after a particular prefix.

 

## Example

Run the pre-filled example. Its first result is “Accepted”.

States

even odd

Start state

even

Accepting states

even

Transitions (state symbol target)

even 0 even

even 1 odd

odd 0 odd

odd 1 even

Input word

101

Accepted
even —1→ odd —0→ odd —1→ even
Final state: even

 

## Questions about DFA simulator

### How is the alphabet determined?

It is the set of symbols appearing in your transition rules. Then every listed state must have a target for each of those symbols.

### What happens on an empty word?

No transition runs. The machine accepts exactly when the start state is accepting.

### Try the word 111 in the example.

It ends in odd and is rejected because there are three ones. A zero would leave the state unchanged.

 
 

## Related tools

[Year 2: Algorithms and theory](https://goodhandover.co.uk/tools/computer-science-maths/#year-2)

- [Linear recurrence calculator](https://goodhandover.co.uk/tools/linear-recurrence-calculator/)

- [NFA to DFA converter](https://goodhandover.co.uk/tools/nfa-to-dfa-converter/)

- [Master theorem calculator](https://goodhandover.co.uk/tools/master-theorem-calculator/)

- [Longest common subsequence calculator](https://goodhandover.co.uk/tools/longest-common-subsequence-calculator/)

 

Last updated 24 November 2026
