732. In a single-channel queuing system with rejections, a Poisson flow of requests arrives.

The time between the arrival of two consecutive requests is distributed according to the law \( f(\tau)=0.8 \mathrm{e}^{-0.8 \tau} \); the service time for requests is random and distributed according to the law \( f_{1}(t)=1.5 \mathrm{e}^{-1.5 t} \). Using the Monte Carlo method over a period of \( T=30 \) minutes, find: a) the average number of served requests; b) the average service time per request; c) the probability of service; d) the probability of rejection. Conduct six trials.
The solution is as follows. The time between the arrival of two consecutive requests is distributed according to the law $f(\tau)=0.8 \mathrm{e}^{-0.8 \tau}$, so the values $\tau_{i}$ will be generated using the formula

$$
\tau_{i}=-(1 / 0.8) \ln r_{i}=1.25\left(-\ln r_{i}\right)
$$

Random numbers $r_{i}$ are taken from the table in Appendix 9, starting from the first row from the bottom.

The service time for requests is distributed according to the law $f_{1}(t)=1.5 \mathrm{e}^{-1.5 t}$, so the values $t_{i}$ will be generated using the formula

$$
t_{i}=-(1 / 1.5) \ln R_{i}=0.67\left(-\ln R_{i}\right)
$$

Random numbers $R_{i}$ are taken from the same table, starting from the first row from the top.

Let $T_{1}=0$ be the moment of arrival of the first request. Using the random number $R_{1}=0.10$, we will generate the duration of the service time for the first request (in minutes):

$$
t_{1}=0.67(-\ln 0.10)=0.67 \cdot 2.30=1.54
$$

The moment of completion of service for the first request is $T_{1}=1.54=0+1.54=1.54$. We record one in the counter of served requests.

Using the random number $r_{2}=0.69$, we will generate the time (in minutes) between the arrival of the first and second requests:

$$
\tau_{2}=1.25(-\ln 0.69)=1.25 \cdot 0.37=0.46.
$$

The first request arrived at the moment $T_{1}=0$. Therefore, the second request will arrive at the moment $T_{2}=T_{1}+0.46=0+0.46=0.46$.

At this moment, the channel is busy serving the first request $(0.46 < 1.54)$, so it will serve the third request. We add one to the counter of served requests.

The further calculation is clear from tables 60 and 61. The test ends when the arrival moment of the request $T_{i} \geqslant 30$. For example, in the first test, as seen from table 60, the 23rd request arrived at the moment

*) The first random number is intentionally indexed 2 to avoid discrepancies with the notation in table 60.
$T_{23}=31.35>30$, so we exclude this request («Stop») and end the first test.

The other tests are conducted similarly.

Table 60

| Number of request $i$ | Random number $\boldsymbol{r}_{\boldsymbol{i}}$ | $-\ln \boldsymbol{r}_{i}$ | Time between two consecutive requests $\tau_{i}^{\Sigma}=1.25\left(-\ln r_{i}\right)$ | Moment of arrival of the request $T_{i}=T_{i-1}+\tau_{i}$ |
| :---: | :---: | :---: | :---: | :---: |
| 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23 | 0.69  0.07  0.49  0.41  0.38  0.87  0.63  0.79  0.19  0.76  0.35  0.58  0.40  0.44  0.01  0.10  0.51  0.82  0.16  0.15  0.48  0.32 | 0.37  2.66  0.71  0.89  0.97  0.14  0.46  0.24  1.66  0.27  1.05  0.54  0.92  0.82  4.60  2.30  0.67  0.20  1.83  1.90  0.73  1.14 | 0.46  3.32  0.89  1.11  1.21  0.18  0.58  0.30  2.08  0.34  1.31  0.68  1.15  1.02  5.75  2.88  0.84  0.25  2.29  2.38  0.91  1.42 | 0  0.46  3.78  4.67  5.78  6.99  7.17  7.75  8.05  10.13  10.47  11.78  12.46  13.61  14.63  20.38  23.26  24.10  24.35  26.64  29.02  29.93  31.35 (Stop) |

The other tests are conducted similarly. Table 62 provides the results of six tests, including the first one.

Using table 62, we will find the required values: a) the average number of requests served in 30 minutes $\bar{N}_{\text {served}}=93 / 6=15.5$,

b) the average service time for one request $\bar{t}_{\text {served}}=4.49 / 6=0.748$,

c) the probability of service $P_{\text {served}}=3.974 / 6=0.662$,

d) the probability of rejection $P_{\text {rejection}}=1-P_{\text {served}}=1-0.662=0.338$.

Thus, approximately $66\%$ of the requests will be served, and $34\%$ will be rejected.