Automata on Algebraic Structures