Improved problem 4 to use combination method.