Skip to main content

Automata

Finite State Machine: Check Whether a Number is Divisible by 3

Learn how to build a Finite State Machine (FSM) in Java that checks whether a decimal number is divisible by 3. Includes the theory behind the digit-sum rule, a 3-state FSM implementation, state-trace output, sample output, and a detailed explanation.

Illustrating Epsilon Closure in Java

Learn how to compute epsilon-closure in Java for an NFA. This post explains the concept, walks through the recursive algorithm with descriptive variable names, provides sample output, and includes a detailed explanation of the results.