Add solutions for Problem 4.