Transition function

From CS2800 wiki