Tolerance automata