730. In a three-channel queuing system with rejections, requests arrive according to a Poisson process. The time between the arrivals of two consecutive requests is exponentially distributed with $f(\tau)=5 e^{-5 \tau}$. The service time for each request is 0.5 minutes.

Find the expected value $a$ of the number of requests served in time $T=4$ minutes using the Monte Carlo method.
Solution. Let $T_{1}=0$ be the moment of the first request's arrival. The request will go to the first channel and be served by it. The moment of the end of the first request's service is $T_{1}+0.5=0+0.5=0.5$. We record one in the counter of served requests.

The moments of arrival of subsequent requests will be found using the formula

$$
T_{i}=T_{i-1}+\tau_{i}
$$

where $\tau_{i}$ is the duration of time between two consecutive requests with numbers $i-1$ and $i$.

Possible values of $\tau_{i}$ are determined by the formula

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

Considering that, according to the condition, $\lambda=5$, we get $\tau_{i}=0.2\left(-\ln r_{i}\right)$.

Random numbers $r_{i}$ are taken from the table in Appendix 9, starting from the first row at the top. To find the time between the arrivals of the first and second requests, we take the random number $r=0.10$. Then $\tau_{2}=0.2 \cdot(-\ln 0.10)=0.2 \cdot 2.30=0.460$. The first request arrived at the moment $T_{1}=0$. Therefore, the second request will arrive at the moment $T_{2}=T_{1}+0.460=0+0.460=0.460$. At this moment, the first channel is still busy serving the first request, so the second request will go to the second channel and be served by it. The moment of the end of the second request's service is $T_{2}+0.5=0.460+0.5=0.960$. We add one to the counter of served requests.

Using the next random number $r=0.09$, we will determine the time $\tau_{3}$ between the arrivals of the second and third requests:

$$
\tau_{3}=0.2(-\ln 0.09)=0.2 \cdot 2.41=0.482
$$

The second request arrived at the moment $T_{2}=0.460$. Therefore, the third request will arrive at the moment $T_{3}=T_{2}+0.482=0.460+0.482=0.942$. At this moment, the first channel is already free, and the third request will go to the first channel. The moment of the end of the third request's service is $T_{3}+0.5=0.942+0.5=1.442$. We add one to the counter of served requests.

Further calculations are performed similarly (Table 59), and if at the moment of the request's arrival all channels are busy (the moment of the request's arrival is less than each of the moments of the end of service), then one is added to the counter of rejections.

Note that the service of the 20th request will end at the moment $4.148>4$, so this request is rejected.

The test is stopped (in the table, "stop" is written) if the moment of the request's arrival $T>4$.

From Table 59, we find that in 4 minutes, a total of 20 requests arrived; 12 requests were served.

Performing five more tests similarly, we get: $x_{2}=15$, $x_{3}=14$, $x_{4}=12$, $x_{5}=13$, $x_{6}=15$.

As an estimate of the required expected value $a$ of the number of served requests, we take the sample mean

$$
a^{*}=\bar{x}=(2 \cdot 12+13+14+2 \cdot 15) / 6=13.5
$$

| Number of  arrivals  $i$ | Random  number  $r_{i}$ | $-\ln \boldsymbol{r}_{i}$ | Time  between  two  consecutive  requests  $\tau_{i}=$  $=0.2\left(\ln r_{i}\right)$ | Moment  of  arrival  of  the  request  $\boldsymbol{T}_{i}=$  $=T_{i-1}+\tau_{i}$ | Moment  $T_{i}+0.5$  of  the  end  of  the  service  of  the  request  by  the  channel |  |  | Counter |  |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|  |  |  |  |  | $\mathbf{1}$ | 2 | 3 | served  requests | {fecea8750-0ed9-4f8e-beda-c37d3fb2c2b7}or-  ka-  Zov\right. |
| 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21 | 0.10  0.09  0.73  0.25  0.33  0.76  0.52  0.01  0.35  0.86  0.34  0.67  0.35  0.48  0.76  0.80  0.95  0.90  0.91  0.17 | 2.30  2.41  0.32  1.39  1.11  0.27  0.65  4.60  1.05  0.15  1.08  0.40  1.05  0.73  0.27  0.22  0.05  0.10  0.09  1.77 | 0.460  0.482  0.064  0.278  0.222  0.054  0.130  0.920  0.210  0.030  0.216  0.080  0.210  0.146  0.054  0.044  0.010  0.020  0.018  0.354 | 0  0.460  0.942  1.006  1.284  1.506  1.560  1.690  2.610  2.820  2.850  3.066  3.146  3.356  3.502  3.556  3.600  3.610  3.630  3.648  4.002  (Stop) | 0.500  1.442  2.006  3.110  3.646 | 0.960  1.506  2.060  3.320 | 4.002 | ![](https://cdn.mathpix.com/cropped/2024_05_22_1d1b16277022f98e68adg-314.jpg?height=724&width=131&top_left_y=428&top_left_x=972) | 1  1  1  1  1  1 |
|  |  |  |  |  |  |  | Total | $x_{1}=12$ | 8 |