Finite State Automata in Java

Bradley Kjell, Cental Connecticut State University

Draft, January 2001

These notes discuss finite-state automata, their practical uses, and how to implement them in Java. Finite-state automata are useful in many application areas: compiler design, natural language understanding, user interface design, and programming in general. Many programming problems are straightforward when understood as finite automata, but harder without that understanding.

These notes also discuss regular expressions and the Java regular expression package, java.util.regex. Regular expressions and finite automata are alternative ways to describe patterns and both can do pattern matching with character strings.

To use these notes with maximum benefit, read though them interactively. Think about and answer the question at the bottom of each page. These notes assume that you have the Java Development Kit (JDK) version 5.0 or later.


Finite-state Automata

Regular Expressions

Index