Improved solutions to Problems 2, 4, and 5.