hw4 assignment 2024 - solution.pdf