Fermat's principle states that "light travels between two points along the path that requires the least time, as compared to other nearby paths" From Fermat's principle derive $(a)$ the law of reflection $\left(\theta_{i}=\theta_{\mathrm{r}}\right)$ and $(b)$ the law of refraction (Snell's law). [Hint: Choose two appropriate points so that a ray between them can undergo reflection or refraction. Draw a rough path for a ray between these points, and write down an expression of the time required for light to travel the arbitrary path chosen. Then take the derivative to find the minimum.]