State machine - Pramod pavithran (computer science,cusat, 2003)