assignment 3 solution of 542