Simple state machines don't really have a lot of math behind them. Just a diagram of states and state transitions. The only time math comes into it is if you need to prove something about them, then your general graph algorithms should be able to take care of it. You can whip up all the code you need for a state machine in less than a page of code, there really isn't much to them.
And a more dense and complete beginner friendly article: http://ai-depot.com/FiniteStateMachines/