Solved problems 4 and 5 and time solutions