State space optimization of finite state machines from the viewpoint of control theory