Theory of Computation: Finite State Machines