A rule-based Deterministic Finite Automaton (DFA) generator and simulator designed to help students and enthusiasts understand formal language theory with clean, interactive visuals.
The DFA Problem Solver allows users to generate DFAs for a wide variety of formal language problems without needing to manually construct the transition functions or state tables. It provides an intuitive builder interface and a simulator to test input strings against the generated automaton.
- Interactive Builder — Select from a wide range of predefined problem types including pattern matching, symbol counting, position rules, and more.
- Visual Representation — Automatically renders the DFA using an HTML5 Canvas, showing states, transitions, and start/accept states.
- Transition Table — Provides a comprehensive tabular view of the generated state transitions.
- Live Simulator — Test custom input strings against your generated DFA to see if they are accepted or rejected, complete with a step-by-step computation path.
- Responsive Design — Clean, modern UI styled with Inter typography.
Ends with, starts with, contains, not contains, and exact matches.
Even/odd counts, at least/exactly N occurrences, and equal counts of patterns.
Odd/even position parity, divisibility, alternating characters, no consecutive symbols, and complex start/end constraints.
- Select Problem Type — Choose the desired DFA logic from the dropdown menu.
- Configure Parameters — Enter the alphabet (no spaces) and any required parameters such as patterns, counts, or symbols based on the selected problem type.
- Generate — Click the "Generate DFA" button. The application will compute the DFA and display the visual diagram and transition table.
- Test — Use the "Simulator" panel to enter a test string and verify the DFA's behavior.
| Layer | Technology |
|---|---|
| Frontend | HTML5, CSS3 (Grid/Flexbox), Vanilla JavaScript |
| Visualization | HTML5 Canvas API |
| Deployment | GitHub Pages |
Developed by Juan Carlos Garcia.