Solve the following problem:
In each of the following cases, construct an Accept-Reject algorithm, generate a sample of the corresponding random variables, and draw the density function on top of the histogram.
a. Generate normal random variables using a Cauchy candidate in Accept-Reject.
b. Generate gamma G(4.3, 6.2) random variables using a gamma G(4, 7) candidate.