1 Fifo
Let
denote the waiting time in the queue (prior to service). Under equilibrium (steadystate) conditions, the probability density function
of has Laplace transform [3, 4, 5, 6]and initial value [7]
Consequently
In fact, exponentiality holds more generally for nonconstant interarrival times, proved by Smith [3]
. Moments are
giving and respectively when . If sampling is restricted only to , then [8]
giving and respectively.
Let denote the number of patients in the system (both queue and service). Under equilibrium, with , we have [9]
giving and respectively. Geometricity holds more generally for nonconstant interarrival times. It is remarkable that classical distributions occur within G/M/1 universally but not within even M/D/1 specifically.
2 Lifo
The probability density function of has Laplace transform
and the inverse Laplace transform of is
With regard to symmetry and , we see that play the roles of in [2], but an extra factor is also present, i.e., the correspondence is not perfect. From
we have
i.e.,
hence
The indicated condition is true by the initial value theorem [7]:
Differentiating, we obtain
For ,
implies
Note that for each because, if a client arrives at the same moment the server becomes available, the client is taken immediately (by LIFO) and there is no waiting. Note also . For ,
coupled with implies
For ,
coupled with implies
More generally, for , we obtain
and thus the waiting time density for LIFO is completely understood. Wishart [6] evidently holds priority in discovering this formula, building upon work by Conolly [10]. Stitching the fragments together gives the LIFO density function pictured in Figure 1, for parameter values and ; hence and .
3 Siro
The probability density function of has Laplace transform [8]
where
The integral underlying is intractable; our symbolic approach for FIFO & LIFO seems inapplicable for SIRO.
We therefore turn to a numeric approach. An unpublished memorandum written in 1967 by Burke (the same author as of [15]) has regrettably been lost, although summaries are found in [16, 17]. Rosenlund [18] provided an especially clear algorithm for D/M/1 to follow. Since our interest is in densities, we differentiate his initial expression with respect to , i.e.,
Define recursively
We consequently have
where
For example, if , then
where is the exponential integral. This corresponds to the leftmost curvilinear arc in Figure 2, surmounting the interval . Verification that the Laplace transform of is equal to remains open.
4 Idle Period
We are concerned here with successive periods of server activity and inactivity. The lefthand subinterval of is busy (since a new client has just arrived) and its righthand complement is idle. It is possible that the idle period is empty. Jansson [19] proved that, under FIFO and equilibrium, the idle period length has probability density function
Moments are
giving and respectively when . The analysis of a busy period is more complicated, in part because it may span multiple adjacent intervals , but this issue is not pertinent for our study here.
Each client is associated with both a waiting time and an idle period length . An expression for the bivariate density is available [19]. We report merely the crosscovariance
and crosscorrelation when
. Again, the proof is valid under FIFO and equilibrium. What is remarkable is that these results (marginal density and joint moments) appear via simulation to be the same under LIFO and SIRO as well. Likewise, the distribution of
(what we called in Section 1) seems to be invariant upon change in policy. Justification would be good to see someday.5 Minimal Cost
The expression “queue control” may seem redundant because queues are themselves a method of control [20]. They exist to accommodate client demands on a service provider. A control, however, exists to ensure that costs remain sustainable. We wish to minimize cost as a function of , for fixed , where cost is a weighted sum of the mean idle period and the mean waiting time [19]:
The derivative of with respect to will be written as , which should not be confused with our earlier usage of the same symbol (the derivative of with respect to , evaluated at ). From
we deduce
thus
thus
when
It is additionally required [19] that . From
we obtain
hence
where is “the” secondary branch of the Lambert omega:
For example, if and , then and . In words, if mean client waiting times are weighted the same as mean server idle periods, i.e., , then in terms of cost, the interarrival time is far from optimal, but is close.
If server idle periods are weighted more heavily than client waiting times, e.g., , then . If instead client waiting times are weighted more heavily than server idle periods, e.g., , then . This is consistent with intuition. Compressed interarrival times lead to less idleness but longer waits; expansive interarrival times lead to shorter waits but more idleness. Balancing these conflicting priorities makes life interesting.
To clarify: there exist countably infinite branches of the Lambert omega, but only two ( and ) that assume real values on , one increasing and the other decreasing. All other branches are complexvalued with nonzero imaginary parts. Our notation is unorthodox, as is referring to as “the” secondary branch. In Mathematica, the function ProductLog[k,x] gives & for & , respectively. Alternative notation and , proposed somewhat by [21], is intended to suggest “upper branch” and “lower branch”.
We have omitted discussion of the variance of
. From the aforementioned joint distribution of idle period and waiting time
[19], it would be possible to minimize cost as a function of , for fixed , where cost is the median of aweighted sum of idle period and waiting time. Solving this revised optimization problem could be advantageous because the median is more a robust estimator of centrality than the mean. We wonder too about the proper choice of
and whether a sum (rather than a product, say) is necessarily best. More recent work appears in [22, 23, 24, 25, 26]. Processes with constant interarrival times and exponential server queues are fundamental, as proved in [27].6 Addendum
With as before (constant for , ), define [5, 8, 28, 29]
where is a positive integer and
For example, , and . More generally, is the expected waiting time in a D/M/ queue with slow servers (more precisely, each server working with rate only when busy) and is the probability of zero wait. With , we have
i.e., slow servers outperform one fast server, relative to average waiting time. The sum of idle periods over all servers would however be potentially significant; the mean of would be crucial in minimizing total cost as a function of , for fixed .
7 Acknowledgements
Stig Rosenlund and Robert Cooper were so kind in answering several of my questions. I am grateful to innumerable software developers. Mathematica routines NDSolve for delaydifferential equations and InverseLaplaceTransform (for Mma version ) assisted in numerically confirming many results. R steadfastly remains my favorite statistical programming language.
References
 [1] S. Finch, M/G/1FIFO queue with uniform service times, arXiv:2206.11108.
 [2] S. Finch, M/D/1 queues with LIFO and SIRO policies, arXiv:2208.09980.
 [3] W. L. Smith, On the distribution of queueing times, Proc. Cambridge Philos. Soc. 49 (1953) 449–461; MR0054870.
 [4] F. Pollaczek, Sur une généralisation de la théorie des attentes, C. R. Acad. Sci. Paris 236 (1953) 578–580; MR0053432.

[5]
D. G. Kendall, Stochastic processes occurring in the theory of queues and their analysis by the method of the imbedded Markov chain,
Annals Math. Statistics 24 (1953) 338–354; MR0056231.  [6] D. M. G. Wishart, Queuing systems in which the discipline is “lastcome, firstserved”, Operations Res. 8 (1960) 591–599; MR0125646.
 [7] J. L. Schiff, The Laplace Transform: Theory and Applications, SpringerVerlag, 1999, pp. 88–89; MR1716143.
 [8] L. Takács, Delay distributions for simple trunk groups with recurrent input and exponential service times, Bell System Tech. J. 41 (1962) 311–320; MR0132609.
 [9] U. N. Bhat, An Introduction to Queueing Theory. Modeling and Analysis in Applications, Birkhäuser, 2008, pp. 98–111; MR2449481.
 [10] B. Conolly, The busy period in relation to the queueing process GI/M/1, Biometrika 46 (1959) 246–251; MR0102864.
 [11] N. U. Prabhu, Stochastic Storage Processes. Queues, Insurance Risk, Dams, and Data Communication, 2 ed., SpringerVerlag, 1998, pp. 78–81; MR1492990.
 [12] N. Hadidi and B. Conolly, On the reduction of congestion, Stat. Res. Rep. n. 6, Institute of Math., Univ. of Oslo (1969).
 [13] B. Conolly and N. Hadidi, A comparison of the operational features of conventional queues with a selfregulating system, J. Royal Statist. Soc. Ser. C 18 (1969) 41–53; MR0242286.
 [14] B. Conolly, Lecture Notes on Queueing Systems, Ellis Horwood Ltd., 1975; pp. 68–69, 78–82; MR0410973.
 [15] P. J. Burke, Equilibrium delay distribution for one channel with constant holding time, Poisson input and random service, Bell System Tech. J. 38 (1959) 1021–1031; MR0107313.
 [16] G. M. Carter and R. B. Cooper, Queues with service in random order, Operations Res. 20 (1972) 389–405.
 [17] R. B. Cooper, Introduction to Queueing Theory, 2 ed., NorthHolland, 1981, pp. 275–280; MR0636094.
 [18] S. I. Rosenlund, The random order service G/M/m queue, Naval Res. Logist. Quart. 27 (1980) 207–215; MR0574048.
 [19] B. Jansson, Choosing a good appointment system – A study of queues of the type , Operations Res. 14 (1966) 292–312; MR0189835.
 [20] R. F. Dailey, Queue Control for Multiple Sequential Requests, Ph.D. thesis, Ohio State Univ., 1984.
 [21] R. Roy and F. W. J. Olver, Lambert Function, NIST Digital Library of Mathematical Functions, http://dlmf.nist.gov/4.13.
 [22] C. Geiszler, A numerical procedure for the selection of the constant interarrival time to a single server queue, Comp. & Math. with Appl. 7 (1981) 537–546.
 [23] C. D. Pegden and M. Rosenshine, Scheduling arrivals to queues, Comput. Oper. Res. 17 (1990) 343–348; MR1053002.
 [24] W. E. Stein and M. J. Côté, Scheduling arrivals to a queue, Comput. Oper. Res. 21 (1994) 607–614.
 [25] E. Hyytiä, G. Magnússon and R. Righter, Controlling queues with constant interarrival times, Proc. 31 International Teletraffic Congress (ITC), ed. R. R. Mazumdar and G. Dán, IEEE, 2019, pp. 19–27.
 [26] S. Choi, Sangdo and W. E. Wilhelm, Sequencing in an appointment system with deterministic arrivals and nonidentical exponential service times, Comput. Oper. Res. 117 (2020) 104901; MR4062943.
 [27] B. Hajek, The proof of a folk theorem on queueing delay with applications to routing in networks, J. Assoc. Comput. Mach. 30 (1983) 834–851; MR0819133.
 [28] L. Takács, Introduction to the Theory of Queues, Oxford Univ. Press, 1962, pp. 147–158; MR0133880.

[29]
A. O. Allen, Probability, Statistics, and Queueing
Theory, 2 ed., Academic Press, 1990, pp. 321–324, 698–699; MR1075410.
Steven Finch MIT Sloan School of Management Cambridge, MA, USA steven_finch@harvard.edu