Practice problem taken from 1.4-b Michael Sipser - Introduction to the Theory of Computation-Course Technology (2012)