Coursera: Automata: Homework 1: Problem 2