A variant method of squeezed rejection algorithm for the simulation of the exponential distribution $\exp(1)$ truncated to $(0,2)$ interval can be written as:
(a) generate $Y \sim U(0,2)$ , $U\sim U(0,1)$
(b) if $U \le \mathrm{e}^{-a} \times (a+1-Y)$ go to (e)
(c) if $U> \mathrm{e}^{-b}/(1-b+Y)$ go to (a)
(d) if $U> \mathrm{e}^{-Y}$ go to (a)
(e) set $X=Y$
Prove that the probability of success in step (b) is equal to $a \times \mathrm{e}^{-a}$ if $a\ge 1$ and equal to $1/4 \times (a+1)^2 \times \mathrm{e}^{-a}$ if $a<1$. Prove that the best choice is $a=1$
a,b>0 (a,b)εΝ