Learning-Based Optimal Admission Control in a Single-Server Queuing System

Published Online:https://doi.org/10.1287/stsy.2022.0042

Abstract

We consider a long-term average profit–maximizing admission control problem in an M/M/1 queuing system with unknown service and arrival rates. With a fixed reward collected upon service completion and a cost per unit of time enforced on customers waiting in the queue, a dispatcher decides upon arrivals whether to admit the arriving customer or not based on the full history of observations of the queue length of the system. Naor [Naor P (1969) The regulation of queue size by levying tolls. Econometrica 37(1):15–24] shows that, if all the parameters of the model are known, then it is optimal to use a static threshold policy: admit if the queue length is less than a predetermined threshold and otherwise not. We propose a learning-based dispatching algorithm and characterize its regret with respect to optimal dispatch policies for the full-information model of Naor [Naor P (1969) The regulation of queue size by levying tolls. Econometrica 37(1):15–24]. We show that the algorithm achieves an O(1) regret when all optimal thresholds with full information are nonzero and achieves an O(ln1+ϵ(N)) regret for any specified ϵ>0 in the case that an optimal threshold with full information is 0 (i.e., an optimal policy is to reject all arrivals), where N is the number of arrivals.

Funding: A. Cohen is partially supported by the National Science Foundation [Grant DMS-2006305]. V. Subramanian is supported in part by the NSF [Grants CCF-2008130, ECCS-2038416, CNS-1955777, and CMMI-2240981].

1. Introduction

We consider admission control for a first-in, first-out (FIFO) single-class, single-server queuing model with Poisson arrivals and exponential service times. Specifically, there is a dispatcher that decides on admitting arrivals with the goal to maximize the long-term average profit; each admitted arrival yields a positive reward R (obtained after a customer finishes service), which is balanced by a holding cost for the (homogeneous) customers waiting in the queue. The buffer capacity of this queue is infinite, and the dispatcher may decide upon arrivals to reject any customers joining the queue with the profit objective in mind. When the service and arrival rates are known, this model is studied in Naor (1969). In our investigation, we consider the situation in which the dispatcher does not have knowledge of either the arrival rate or the service rate. One potential application is the job-dispatching problem for online computing demands, especially when the computing servers are provided by a third-party cloud-computing platform: the dispatcher may negotiate the reward and cost with the customers and, thus, have information (via market research) on the arrival rate of the jobs, but because the servers are provided by a third-party platform, the dispatcher may not know the service rate. Despite prior market research, it is, however, plausible that the dispatcher doesn’t know the arrival rate accurately.

Naor (1969) studies two problems: (1) the optimal policy for the self-optimization problem in which customers are maximizing their own net (expected) profit so that a selfish Wardrop equilibrium is of interest as well as (2) the optimal policy for the social welfare–maximization problem in which a dispatcher is aiming at maximizing the long-term average profit so that a social Wardrop equilibrium is of interest. In both problems, a threshold policy is shown to be optimal: (1) in the self-optimization problem, arrivals do not join the queue if the queue length upon arrival is high enough, and (2) in the social welfare–maximization problem, the dispatcher doesn’t admit arrivals whenever a threshold level is reached. Naor (1969) shows that the threshold for the social welfare–maximization problem is not greater than the threshold for the self-optimization problem. Our investigation and the accompanying algorithm are primarily designed for the social welfare–optimization problem in which the dispatcher is interested in learning how to perform at the same level of efficiency as if knowing the actual arrival and service rate. Any learning-based algorithm necessarily needs exploration that could violate incentive-compatibility constraints (even ex ante and not only ex post) of individual utility-maximizing agents. Hence, we do not consider the self-optimization version of the problem in this manuscript.

In our analysis, we couple two queuing systems: a learning system, whose dispatcher does not know the arrival and service rate a priori, and a genie-aided system, whose dispatcher has full information of the model parameters. We refer to the corresponding algorithm and dispatcher of the two systems as the learning algorithm, learning dispatcher and genie-aided algorithm, genie-aided dispatcher, respectively. Our figure of metric at a given time t is the difference between the net expected profits of a genie-aided algorithm and the learning algorithm, that is, the expected regret.

1.1. Contributions

We propose a learning-based dispatching algorithm that achieves an O(1) regret when (genie-aided) optimal algorithms use a nonzero threshold and achieves an O(ln1+ϵ(N)) regret for any specified ϵ>0 when it is optimal to use threshold 0, where N denotes the number of arrivals;1 see Remark 4 for a refinement on the achievable regret. Our learning-based algorithm consists of batches with each batch being composed of an optional forced exploration phase (phase 1) and an exploitation phase (phase 2) whose length increases with batch index. The exploration phase is omitted if there are new samples collected from the exploitation phase that just ended. Our learning algorithm uses samples collected from all the exploitation phases as well as from any exploration phases; the former is important if the exploration phase is omitted.

For the system studied in Naor (1969), not all values of the unknown model parameters result in a unique optimal static threshold policy. For some specific choices of the model parameters, there exist two optimal static thresholds, and therefore, all the policies that stochastically alternate between the two static optimal thresholds also achieve the optimal long-term average profit. As mentioned earlier, we are interested in analyzing the regret, defined to be the difference between the expected profit of the learning and genie-aided systems. When the optimal policy is unique, there is no ambiguity in the definition of the regret as there is a fixed optimal policy against which to compare. However, when there are multiple policies that are optimal, we need to specify a particular optimal policy against which we are comparing. Among the multiple optimal policies, we compare against a policy with a specific way of randomizing between the two static optimal thresholds, and then, we prove that we can achieve similar regret as when there exists a unique optimal policy, which is of order O(1) when both thresholds are positive and of order O(ln1+ϵ(N)) for any specified ϵ>0 when 0 is an optimal threshold and N is the number of customers that have arrived; Remark 4 applies with nonunique thresholds too.

In our setting, we do not exclude the case in which the genie-aided dispatcher uses a static threshold zero and, hence, rejects all customers. This leads to a balancing act for the dispatcher: quickly transitioning to reject all customers if the true threshold is zero versus admitting customers infinitely often otherwise (based on the optimal threshold) and all of this when not being aware of the true optimal admission policy. With this in mind, for learning to not stall, the existence of the exploration phase is crucial when the true threshold is positive. A naive learning scheme that only uses the empirical average service time as an estimate of the unknown parameter may perform poorly: a few extremely long service times at the beginning may mislead the learning dispatcher to think that the service rate is low and, hence, result in it not accepting customers into the queue even when the genie-aided dispatcher uses a nonzero threshold; see plots in Section 6.

1.2. Related Work

On the topic of finding optimal controls vis-à-vis individual and social welfare maximization, there are many models that study generalizations of the model introduced in Naor (1969). Knudsen (1972) generalizes the model in Naor (1969) to multiple servers with a nonlinear cost for customers waiting in the system. The reward for customers served is constant, and customers arrive according to a Poisson process. The service times of the customers are exponentially distributed and are independent of the identity of the currently active server. Lippman and Stidham (1977) study a single-queue model with Poisson arrivals and nondecreasing, concave service rate with respect to the number of customers in the system. The holding cost per unit of time for each customer is constant, and the rewards for the customers entering the system are independent and identically distributed (i.i.d.) random variables with finite mean. The authors first consider the discounted net profit in the finite-horizon case (in terms of the total number of admissions and service completions) and then extend the analysis to the nondiscounted and infinite-horizon case. Johansen and Stidham (1980) study the problem of finding the optimal admission policy of a system with general service and arrival processes. In the problem’s setting, the net profit is discounted, and the authors consider the finite-horizon (in terms of the number of arriving customers) case. The rewards of the customers are i.i.d. random variables with finite mean, and the nonnegative waiting cost is a function of the number of customers in the system as well as the total number of past arrivals. All the works—Knudsen (1972), Lippman and Stidham (1977), and Johansen and Stidham (1980)—compare the optimal policy for the individual- and social welfare–maximization problems and show that the optimal policies for both optimization problems are threshold policies that depend on the rewards of customers. Moreover, they also show that the optimal threshold for the social welfare–maximization problem is no greater than the individual-maximization problem. Assuming a random arrival rate, Chen and Hasenbein (2020) show that the optimal thresholds for the social welfare–maximization problem are no larger than the individual-maximization problem when the queue length is either observable or unobservable. They also show that the optimal threshold for the revenue-maximization problem may not coincide with the social welfare–maximization problem when the queue is unobservable.

Learning unknown parameters to operate optimally in queuing systems and analyzing queuing systems with model uncertainly are both studied under various settings; see the tutorial Walton and Xu (2021) for a recent overview. Our paper focuses on regret analysis in comparison with an optimal algorithm when the parameters are known. Under this framework, there is growing literature considering different models and various types of regret. Adler et al. (2022) consider an Erlang-B blocking system with unknown arrival and service rates in which a customer is either blocked or receives service immediately. The authors propose an algorithm that observes the system upon arrivals and converges to the optimal policy that either admits all customers when there is a free server or blocks all customers. In our setting, the queue has infinite capacity; customers may wait in the queue, and the dispatcher observes the whole history of the queue length when making a decision. The reward of admitting a customer in both our paper and Adler et al. (2022) is only realized in the future as it involves knowledge of service times and (in our case also) waiting times, and the expected net profit requires knowledge of the arrival and service rates; this precludes the direct use of reinforcement learning–based methods discussed in Sutton and Barto (2018) and Bertsekas (2019). Stability is always assured in Adler et al. (2022) because the maximum system occupancy is bounded (finite number of servers with no queuing). The queuing system is stable under any optimal policy for the problem we consider. However, under an arbitrary learning dispatcher, the supremum of the queue lengths may be unbounded when the service rate is unknown. We discuss the impact of this on our analysis in Section 2.3. Krishnasamy et al. (2018a) first consider a discrete-time, single-server queuing system with multiclass customers and unknown service rates and then modify and extend their algorithms to parallel, multiserver queuing systems, again with multiclass customers. In the model, customers of class i have (per unit time) waiting cost ci when waiting in the queue and Bernoulli services with the service success probability at server j being μi,j for class i (i.e., geometrically distributed service times). They propose a cμ rule–based algorithm that achieves constant regret compared with using the cμ rule with the true service rates. The cμ rule prioritizes the service of customers of type i at server j when ciμi,j is higher. Optimality of the cμ rule is proved in various settings, especially in the single-server case; see Smith (1956), Shwartz and Makowski (1986), Buyukkoc et al. (1985), and (Cox and Smith 1961, chapter 3). Zhong et al. (2022) consider the problem of learning the optimal static scheduling policy in a multiclass, many-server queuing system with time-varying Poisson arrivals. Customers of type i have exponentially distributed patience with rate θi and exponentially distributed service requirements with rate μi. Unlike in Krishnasamy et al. (2018a), in which stability is not guaranteed for arbitrary scheduling policies, the impatience of the customers helps to stabilize the queue without any extra requirements on the scheduling policy. The authors compare their learn-then-schedule learning algorithm with the cμ/θ rule and show that their learning algorithm achieves a Θ(log(T)) regret, where T is the (finite) time horizon. For a discrete-time, multiclass, parallel-server system, when compared with the algorithm that matches a queue to a server for which the success service probability is the highest among all possible matches of this queue to any other server, Krishnasamy et al. (2021) use a multiarmed bandit viewpoint and propose Q-UCB and Q-Thompson sampling algorithms that achieve O(poly(log(T))/T) queue regret as the time horizon T goes to infinity. Stahlbuhk et al. (2021) focus on a single-server, discrete-time queue and show the existence of queue length–based policies that can achieve an O(1) regret. When each server has its own queue, Choudhury et al. (2021) study the discrete-time routing problem when service rate and queue length are not known. Taking a Markov decision process (MDP) viewpoint, Agrawal and Jia (2022) consider a discrete-time, inventory-control problem in which orders to be made arrive with delay and the decision maker observes solely the sales and not the demands. Thereafter, a holding cost is collected for each unit of the good that is in storage. At each time step, the decision maker needs to make new orders and aims to minimize the total expected holding cost. The authors study the problem of learning the proper units of orders to be made at each time step when the distribution of the demand is unknown. The algorithm they propose achieves an O(T) regret (for horizon T) when compared with the best base-stock policy.

With the goal of stabilizing the queues and also minimizing penalties enforced in a discrete-time system, Neely et al. (2012) propose an algorithm that learns a set of max-weight functionals that depend on the unknown underlying distribution and make two-stage decisions (which are shown to correspond to scheduling choices in illustrated examples). The proposed algorithm stabilizes the system considered and achieves at most linear regret in the accumulated penalties when compared with the optimal controller. Considering a scheduling problem with unknown arrival and channel statistics, Krishnasamy et al. (2018b) study a wireless scheduling problem with switching costs. Under their proposed explore–exploit policy with the exploration probability going to zero slowly, together with a max-weight scheduling policy using learned statistics, the network is shown to be stable, and the algorithm achieves at most linear regret in the accumulated switching and activating cost when compared with the optimal scheduler with the knowledge of the model statistics. The error bound on the long-term average in both works can be made arbitrarily small (when compared with the optimal cost) by changing algorithm parameters. Instead of having explicit exploration, Yang et al. (2023) study a discrete-time, multiserver queuing system and propose a max-weight with discounted upper confidence bound (UCB) scheduling algorithm. Their main result shows the stability of the queuing system under the proposed algorithm.

There is a growing literature that studies online dynamic pricing in service systems using queuing models. We discuss some relevant recent work next. The authors of Chen et al. (2023) consider optimal pricing with congestion in a GI/GI/1 queue in which the unit cost depends on the service rate, the arrival rate depends on the service fee, and customers experience congestion given by the average queue length of the system. As the cost as a function of the service rate and the dependence of the arrival rate in chosen price is unknown, the authors propose a gradient-based online learning algorithm that achieves a sublinear regret when compared with the accumulated profit obtained with the optimal service rate and fee (using steady-state quantities). Also, considering an online learning version of finding a proper price among a finite set of prices, Jia et al. (2022) consider a multiserver queuing model with Poisson arrivals and exponential services in which the dependence of arrival and service rate prices chosen is unknown (with the values unknown as well but such that the load for each choice is strictly less than one). Two online batch-processing algorithms based on UCB and Thompson sampling are proposed in Jia et al. (2022). Both algorithms achieve sublinear regret (optimal up to logarithmic factors) when compared with the accumulated profit achieved by the optimal price choice.

In our work, we consider a paradigm in which there’s uncertainty in the model parameters. A different type of uncertainty, often called Knightian uncertainty, is studied in Atar et al. (2022), Cohen (2019a, b), and Cohen and Saha (2021) for multiclass queuing systems in the heavy traffic regime. In these models, the decision maker is looking for robust control for a class of models. The uncertainty is modeled by including an adversarial player who chooses a worst case scenario. Hence, the robust control problem is formulated via a stochastic game between the decision maker and the adverse player. Optimality is then characterized by studying Stackelberg equilibria.

1.3. Outline of the Paper

In Section 2, we introduce the model, propose our learning algorithm, and state our main results. In Section 3, we state some preliminary results, including the properties of the coupling introduced in Section 2. Sections 4 and 5 are devoted to the analysis of our learning algorithm and include the proof of our main results. Section 6 provides the finite-time performance of our algorithm via simulations. In Section 7, we summarize our result.

2. The Learning Problem and the Main Results

In this section, we introduce the stochastic model and the learning algorithm. Specifically, in Section 2.1, we introduce the optimal admission control problem for the queuing system studied in Naor (1969). In this model, all the parameters are known. The same model but with unknown service and arrival rates is introduced in Section 2.2. We couple the models with known and unknown parameters so that we can characterize the regret of our learning dispatcher. Our learning algorithm is provided in Section 2.3. Finally, in Section 2.4, we state the main results.

2.1. The Stochastic Model with Known Parameters

Naor (1969) studies the self-optimization and social welfare–maximization problems for the following model. Homogeneous customers arrive at a singl-server queue according to a Poisson process with a rate 0<λ<. When a customer arrives, and only then, the dispatcher decides whether to admit this customer to the queue or not. A customer that is not admitted (i.e., rejected) leaves and does not return. An admitted customer remains in the queue until being served. Upon service completion, the dispatcher receives a reward R > 0. Once the service is completed, the customer leaves the queue. The dispatcher suffers from a waiting/holding cost at the rate of C > 0 per time unit for each customer in the queue until service completion. The service requirements for the customers are i.i.d. EXP(μ) (i.e., exponentially distributed random variables with the rate 0<μ<). The dispatcher’s goal is to maximize the social welfare, that is, to maximize the long-term average profit accrued by serving customers: the ergodic reward–maximization problem. Let Q(t) denote the queue length of the system at time t and NA(t) denote the number of customers that arrived at the system until and including time t, and then, for an admission policy ρ, the long-term average profit can be expressed as

lim infT1T(i=1NA(T)R𝟙{Policyρadmitscustomeri}0TCQ(t)dt),(1)
where, throughout the paper, 𝟙A is the indicator function of event A: namely, 𝟙A=1 if A happens and zero otherwise.

The optimal admission policy of the dispatcher in Naor (1969) is a static threshold policy. That is, there is a threshold that depends on the parameters of the model such that the dispatcher admits an arriving customer if and only if the queue length upon arrival is strictly below this threshold. Naor (1969) studies optimal admission control for the ergodic cost–minimization problem by choosing the best threshold value among all possible thresholds. When the dispatcher uses a static threshold policy with a threshold K, the result is an M/M/1/K queueing system. The queue-length process of such a system has a stationary distribution and is also ergodic. Note that the optimal threshold can then be determined by computing the expected reward using the stationary distribution of the M/M/1/K queueing system for all possible values of K. Using this logic, Naor (1969) characterizes the optimal threshold via the function V:N×(0,)2[0,) given by

V(K,y,z)={K(yz)z(1(z/y)K)(yz)2,if yz,K(K+1)2y,if y=z.(2)

The following proposition states a few properties of this function V(·,·,·).

Proposition 1.

The following hold:

  1. For all fixed K, the function V(K,·,·) is continuous in its domain.

  2. For all fixed (y, z), V(K,y,z) is strictly increasing in K.

Note that, when K = 0, V(0,y,z)=0 for all (y,z)(0,)2. Consider any point (K,y,z)N+×(0,)2. In order to prove the continuity of V, it is easier to rely on an alternative formulation of V based on the stationary distribution that we now provide. Let piK denote the stationary probability of having the queue length equal to i and let EK denote the stationary expected queue length when using the threshold policy with a threshold K. One can show that

V(K,y,z)=EK1EKpKKpK1K11z, where piK=(z/y)ii=0K(z/y)i and EK=i=0KipiK.

Clearly, when (y,z)(0,)2,1/z, EK, EK1,pKK, and pK1K1 are all continuous in (y, z). Moreover, pK1K1pKK for all (y,z)(0,)2.

Now, let us consider the function V(K,y,z) for any fixed (y,z)(0,)2. To show the monotonic increasing property, we consider the function f:[0,)[0,),f(K)=V(K,y,z) by extending the definition of V(·,·,·) to real-valued K. From (2), it follows that, when y = z, f(K) is strictly increasing. Now, we focus on the case yz. Computing the derivative of f(K), we get

f(K)=(yz)+z(z/y)Kln(z/y)(yz)2.

Using the inequality ln(x)>11/x for all x>0,x1, we get

(yz)+z(z/y)Kln(z/y)>(yz)+z(z/y)K(1y/z)=(yz)(1(z/y)K)>0,
for all yz. This shows that f(K) is strictly increasing, which implies that V(K,y,z) is strictly increasing in K for all fixed (y,z)(0,)2.

Using these properties, Naor (1969) shows that, for every service rate μ and arrival rate λ, the following inequalities for integer x

V(x,μ,λ)RC<V(x+1,μ,λ)(3)
have a unique solution x=K¯, and this K¯ is an optimal admittance threshold for the problem considered. Moreover, when V(K¯,μ,λ)<R/C, the optimal threshold is unique. However, when V(K¯,μ,λ)=R/C, both K¯ and K¯1 are optimal thresholds; hence, any policy that randomizes between the two thresholds at each arrival is also optimal.2

Let m1/μ and ν1/λ denote the average service time and average interarrival times, respectively. Consider a pair of the true service and arrival rates (μ,λ) for which there exists a unique optimal threshold and the corresponding K¯ satisfying (3) with strict inequalities. Proposition 1 implies that there exist δ1>0 and δ2>0, both depending on μ and λ, such that, for all pairs of points (m^,ν^), where

mδ1<m^<m+δ1 and νδ2<ν^<ν+δ2,(4)
we have
V(K¯,1/m^,1/ν^)<RC<V(K¯+1,1/m^,1/ν^).(5)

That is, if one can estimate the average service time and the average interarrival time accurately so Inequality (4) is satisfied, one can obtain the corresponding K¯ by solving (3) using 1/m^ and 1/ν^ instead of μ and λ.

When equality holds in (3), for pairs of the true service and arrival rates (μ,λ) and the corresponding K¯ that satisfies V(K¯,μ,λ)=R/C, there exist δ˜1>0 and δ˜2>0, both depending on μ and λ, such that, for all pairs of points (m^,v^), where

mδ˜1<m^<m+δ˜1 and νδ˜2<ν^<ν+δ˜2,(6)
we have
V(K¯1,1/m^,1/ν^)<RC<V(K¯+1,1/m^,1/ν^).(7)

That is, as long as the estimated average service time and average interarrival time are accurate enough to satisfy Inequality (6), the integer solved from Inequality (3) using 1/m^ and 1/ν^ in place of μ and λ is in the set of optimal thresholds, that is, {K¯1,K¯}.

2.2. The Learning System and the Genie-Aided System

We assume that the reward R and the cost per time unit C are known to the learning dispatcher but neither the service rate μ nor the arrival rate λ. Consider again the potential application of job dispatch for online computing demands. When the computation clusters are provided by a third-party cloud-computing platform, the dispatcher of the online computing jobs may not have knowledge about the configuration of the servers and their service rate. The dispatcher may also be unfamiliar with the customer type that demands services and, therefore, may only possess limited knowledge of the arrival rate. In our model, the dispatcher continuously observes the queue length and past admission control decisions. Hence, we restrict the dispatcher to admission controls that, at the time of a new arrival, admit or reject based on the entire history of the queue length until the arrival time and also the past admission control decisions. We call such controls admissible. Note that, based on the FIFO serving discipline that’s used, we can infer the time to enter service for all customers entering service by time t and also the departure epochs for all the customers departing (after completing service) by t. Therefore, when a new customer arrives, the dispatcher can estimate the mean service time (also the service rate) using the service times of the customers that have departed before the new arrival and use it for admission control. Further, knowledge of all past admission control decisions enables the dispatcher to obtain information on all past interarrival times, which are then used to compute the statistics for the arrival process, that is, the arrival rate.

We measure the performance of a policy chosen by the learning dispatcher by the regret it incurs in comparison with an optimal policy. Specifically, we use the difference between the expected net profit under the given learning-based control/policy and the best expected net profit the dispatcher could have obtained had it known the parameters μ and λ. To rigorously define the regret, we introduce some relevant processes for both the genie-aided and learning systems.

We use the marker to denote processes associated with the genie-aided system (dispatcher knows μ and λ). The processes without a marker are associated with the learning system (dispatcher does not know μ and λ). We let

  • Q¯(t) and Q(t) denote the queue length at time t.

  • Q¯i and Qi denote the queue length right before the arrival of the ith customer.

  • N¯A(t) and NA(t) denote the number of customers that have arrived at the system until and including time t.

  • N¯join(t) and Njoin(t) denote the number of customers that have joined the queue until and including time t.

  • T¯iA and TiA denote the arrival time of the ith customer to the system (i.e., T¯iA=inf{t:N¯A(t)i} and TiA=inf{t:NA(t)i}, respectively).

  • K¯i and Ki denote the threshold policy used by the respective dispatchers at the arrival of the ith customer.

2.2.1. A Coupling Between the Two Systems.

Consider a probability space (Ω,F,P) rich enough to support two independent Poisson processes (P(t))t0 and (NA(t))t0 with rates μ and λ, respectively. Set N¯A=NA so the arrival processes to both systems are the same. Let TiPD denote the ith jump time of P. The service requirements of the customers that are being served at time t by all systems to be analyzed are determined as follows: the head of the line customer of each system (assuming not empty) completes service at the time of the next jump of P(t). Note that it may be the case that the services of the currently in-service customers are initiated at different times for the learning and genie-aided systems. Nevertheless, because the exponential distribution is memoryless, this does not change the distribution of the random process corresponding to the two systems and, in particular, the distribution of the customer’s service times. In other words, the time between the beginning of a service of a customer and the next jump of P is EXP(μ) distributed. Hence, we refer to P(t) as the potential departure process and to {TiPD}i1 as the potential departure times; that is, when there is a jump in P and the queue length is larger than zero, there is a departure of a customer, but when the queue length is zero, that is, no customer is being served, this potential departure is wasted. Therefore, {P(TiA)P(Ti1A)}i1 is the number of potential services between two consecutive arrivals for both systems.

Now, we use the underlying processes N¯A=NA and P to couple the queue-length processes of both systems, assuming that a threshold policy is used in each system. Consider a sequence of random variables {Ki}i0 taking vales in N such that each Ki is measurable with respect to the filtration generated by the queue length until time TiA: because TiA is a stopping time for the filtration being used, we can define the σ-algebra FTiAFi (for short) using the original filtration FT=σ(Q(t):tT) in the usual way (see Durrett 2016). We use {Ki}i0 as a sequence of thresholds. Similarly, we use {K¯i}i0 to denote the sequence of thresholds used by the genie-aided dispatcher. We refer to any such {Ki}i0 as a threshold policy. For the coupled genie-aided and learning systems, we have the following: for any i1,

Qi=(Qi1+𝟙{Qi1<Ki1}(P(TiA)P(Ti1A)))+,and Q¯i=(Q¯i1+𝟙{Q¯i1<K¯i1}(P(TiA)P(Ti1A)))+,
where, for xR,(x)+max(x,0). Similarly, we have
Q(t)=(Qn+𝟙{Qn<Kn}(P(t)P(TnA)))+,(8)
and Q¯(t)=(Q¯n+𝟙{Q¯n<K¯n}(P(t)P(TnA)))+,(9)
where nmax{m:TmA<t}. Once the initial queue lengths Q0 and Q¯0 are specified in Z+, by induction, one can show that the processes {Qi}i0 and {Q¯i}i0 are well-defined, and using these, {Qt}t0 and {Q¯t}t0 are also well-defined.

2.2.2. The Regret.

Let E[·] be expectation associated with (Ω,F,P). Then, the regret is given by

G(t)E[RN¯join(t)C0tQ¯(u)du(RNjoin(t)C0tQ(u)du)].

This definition of the regret compares the net reward processes of the learning and genie-aided systems: if the learning-based admission control algorithm achieves the same long-term average profit, then this allows us to estimate the sublinear offset. The genie-aided dispatcher uses a static threshold policy that maximizes the long-term average profit described in (1). Note that, when equality does not hold in (3), the genie-aided policy is unique, so there is no ambiguity in the definition of the regret. In this case, K¯iK¯, where K¯ uniquely satisfies Inequality (3). However, when equality holds in (3), the genie-aided policy is not unique. We compare our learning algorithm with a particular optimal genie-aided system that is specified in Section 5.

Consider a threshold policy for the learning system, {Ki}i0, and a threshold policy for the genie-aided system, {K¯i}i0; the regret can be estimated as

G(t)=E[Ri=1NA(t)(𝟙{Q¯i<K¯i} 𝟙{Qi<Ki})]E[C0t(Q¯(u)Q(u))du]E[Ri=1NA(t)|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|]+E[C0t|Q¯(u)Q(u)|du].(10)

From (8) and (9), we note that

|Q¯(t)Q(t)||Q¯n+𝟙{Q¯n <K¯n}(Qn+𝟙{Qn<Kn})|.

This expression helps us to get an upper bound for the integral 0t|Q¯(u)Q(u)|du in (10) as follows:

0t|Q¯(u)Q(u)|dui=0NA(t)(Ti+1ATiA)(|Q¯iQi|+|𝟙{Q¯i <K¯i}𝟙{Qi <Ki}|).

Substituting this bound in (10), we get

G(t)E[Ri=1NA(t)|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|]+E[Ci=0NA(t)(Ti+1ATiA)|Q¯iQi|]+E[Ci=0NA(t)(Ti+1ATiA)|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|].(11)

Note that the (future) interarrival time Ti+1ATiA is independent of the queue length of the learning and genie-aided systems Qi and Q¯i, respectively, as well as the threshold used at the arrival of the ith customer Ki and K¯i. In particular, Ti+1ATiA is independent of |Q¯iQi| and |𝟙{Q¯i<K¯i}𝟙{Qi<Ki}|. Then, as the increments of the Poisson process are independent, we have

E[Ci=0NA(t)(Ti+1ATiA)|Q¯iQi|]=E[Ci=0(Ti+1ATiA)|Q¯iQi| 𝟙{TiAt}]=Ci=0E[(Ti+1ATiA)|Q¯iQi| 𝟙{TiAt}](MCT)=Ci=0E[1λ|Q¯iQi| 𝟙{TiAt}](By independence)=E[Cλi=0|Q¯iQi| 𝟙{TiAt}](MCT)=CλE[i=0NA(t)|Q¯iQi|],
where MCT stands for the monotone convergence theorem. Similarly, we can also simplify E[Ci=0NA(t)(Ti+1ATiA)|𝟙{Q¯i<K¯i}𝟙{Qi<Ki}|] to get
G(t)E[(R+Cλ)i=1NA(t)|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|]+E[Cλi=0NA(t)|Q¯iQi|](R+Cλ)E[i=1NA(t)|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|+|Q¯iQi|].(12)

Following this bound, from now on, we analyze the systems at the arrival epochs {TiA}i1.

With the shift to analyzing the systems at arrival epochs, we characterize the regret in terms of the total number of arrivals N. We use G˜(N)G(TNA) to denote the total regret accumulated up to the arrival of the Nth customer. Recall that m=1/μ denote the average service time and ν=1/λ denote the interarrival time. We assume that 0<m< and 0<ν<: we allow for the average service time to be large, and it is possible to have K¯=0, where the optimal policy for the genie-aided system is to reject any arriving customer. Note that, when K¯=0, equality in (3) is not possible for R,C>0; therefore, the optimal policy is unique, and K¯i=K¯=0 for all i0. If the genie-aided dispatcher always admits customers when the queue is empty and the learning dispatcher knows this, then the algorithm design would be simpler: there is no need to balance exploration and exploitation explicitly. With this knowledge, a learning dispatcher can achieve constant regret using a policy that always accepts customers when the queue is empty and uses a threshold computed by solving Inequalities (3) using the empirical service rate otherwise. The conflicting requirements for a learning algorithm in the two different regimes—K¯=0 (stop admitting customers soon) versus K¯>0 (admit customers infinitely often but at the correct rate via the right choice of the threshold)—are critical to the difficulty of our problem and its analysis.

Algorithm 1

(Learning-Based Customer Dispatch with Unknown Service and Arrival Rate)

i = 0; j = 0; αj grows at polynomial rate in j; s = 0; K*(j)=max{ln(j),0}+l1+Q0.

while iN do

j=j+1;

 % If the phase 1 of the jth batch happens, it sees l1 customers.

if j==1 or (K(j1)==0 and Bj==1) then

  for the next l1 customers do

   i=i+1;

   % we update the belief of the average arrival time when there is a new arrival.

   ν^=ν^+inter-arrival time observedν^i;

   Exploration phase: customers always join the queue, Ki=l1.

  end

  if there are Scnt>0 new services completed during this phase 1 then

   for cnt=1 to Scnt do

    s=s+1;

    m^=m^+service time of the sth customer that completed servicem^s;

   end

  end

end

 Compute integer K, which satisfies V(K,1/m^,1/ν^)R/C<V(K+1,1/m^,1/ν^);

 Set K(j)=min{K*(j),K};

 count = 0;

 % The phase 2 of the jth batch sees at least αjl2 customers. The queue length is zero when phase 2 ends.

while count<αjl2 or Qi>0 do

  count = count +1;

  i=i+1;

  ν^=ν^+inter-arrival time observedν^i;

  Customers join the queue if and only if the queue length is smaller than K(j), and so Ki=K(j).

end

if there are Scnt>0 new services completed during this phase 2 then

  for cnt=1 to Scnt do

   s=s+1;

   m^=m^+service time of the sth customer that completed servicem^s;

  end

end

end.

2.3. The Learning Algorithm

We propose (and study) Algorithm 1 for learning-based, social welfare–maximizing dispatch that consists of a sequence of batches, where each batch has two phases: phase 1 for exploration and phase 2 for exploitation. For customer i who arrives during phase 1 (assuming that a phase 1 is used), we can assume that Ki= as this customer is admitted in the queue no matter the queue length at this arrival. However, in our algorithm, we fix any exploration phase (if used) for all batches to last for exactly l1 arrivals, and so the threshold Ki is effectively Ki=l1 for all arrivals in any phase 1. At the beginning of phase 2 of the jth batch, K(j) is computed by finding the minimum between K*(j) and the integer that solves inequalities V(x,1/m^,1/ν^)R/C<V(x+1,1/m^,1/ν^). The computed K(j) is used for the entire exploitation phase of batch j. That is, for customers i1 and i2 who arrive during phase 2 of the jth batch, Ki1=Ki2=K(j), and these customers are admitted to the queue when the queue length seen at their arrival is strictly less than K(j). For technical reasons, we insist that, at the termination of phase 2, the queue is empty. As the batch number increases, our algorithm extends the length of the exploitation phase and reduces the occurrences of the exploration phases.

Here is some notation that we use in the algorithm:

  • l1: A positive integer representing the length of phase 1, l1>1.

  • l2: A positive integer representing the initial minimum length of phase 2, l2l1.

  • i: A positive integer that is the index of the arriving customer from the very beginning. It is used to update the belief of the average arrival rate.

  • j: A positive integer that indices the batch number.

  • αj1: Growth factor for the length of phase 2 in the jth batch that ensures that the phase 2 duration lasts for at least αjl2 arrivals.

  • Bj: A Bernoulli random variable that is independent of everything else, where P[Bj=1]=1 for j = 1, and P[Bj=1]=lnϵ(j)/j for j > 1 and fixed ϵ>0. If the threshold used in the previous batch (the (j1)th batch) is zero, the random variable Bj is used to determine if phase 1 will happen.

  • K(j): The threshold used by the learning dispatcher during phase 2 of the jth batch.

  • K*(j): The upper bound of the threshold used by the learning algorithm. This parameter slowly increases to infinity and is chosen to be larger than the initial queue length, Q0, and the length of phase 1, that is, l1.

  • Scnt: A counter that counts for the number of completed services in each phase. This counter is used to update the belief of the average service rate after each phase.

Note that Algorithm 1 enforces an exploration phase only for the first batch and then utilizes one in a probabilistic manner when the learned threshold in the previous batch is zero. When the genie-aided system uses a nonzero threshold, as the number of services experienced by the customers admitted by the dispatcher increases, the threshold learned by the algorithm quickly becomes nonzero for phase 2. In this scenario, the exploration phase can potentially be eschewed and, in fact, should be used more and more infrequently as time progresses so that the regret is not large. In fact, in our algorithm, we completely eliminate a phase 1 for a batch if, in the previous batch, the threshold of its phase 2 is positive: some customers are admitted in a phase 2 with a positive threshold, so new service time estimates obtain, and on the contrary, a phase 2 with a zero threshold will not admit any customers. However, allowing for an exploration phase is necessary. When the genie-aided system uses a nonzero threshold, it is possible that the learning system sees the first few service times being long enough so that the learned threshold is zero. Then, without the exploration phase, the learning system stops admitting any customers to the queue and, therefore, will not get any more samples to update its false belief. Although this is a low-probability event, the probability of this happening is nonnegligible for any fixed length l1 of the exploration.

The frequency of the exploration phase in our algorithm is controlled by the distribution of Bj. Our theoretical regret analysis uses P[Bj=1]=ln(j)/j. When the genie-aided system uses the threshold zero, the exploration phase should not happen too often. This is because, every time the learning system admits a customer into the queue, the regret increases. Hence, this regime demands that phase 1 be eschewed as quickly as possible. However, as the algorithm is unaware of the parameter regime (even whether the optimal threshold is zero or nonzero), we necessarily need enough phase 1 s when the threshold from the previous batch is zero. Hence, to combat the regret accumulation from phase 1 s when the optimal policy is not to admit any arrivals, we increase the length of phase 2 (the exploitation phase) as the batch count increases. The control of the length of phase 2 of the jth batch is achieved using parameter αj: phase 2 of the jth batch lasts for at least αjl2 arrivals. Whereas we do require that αj grows to infinity, we do not want it to grow too fast as this could lead to poor performance: when the thresholds used by the learning and genie-aided systems do not match in a batch, there may be too much regret accumulated during that batch if there is a large value of αj for small j (when the probability of an error is higher).

Note that K*(j)=max{ln(j),0}+l1+Q0 is a deterministic function with K*(j) no smaller than l1 and the initial queue length of the learning system Q0 (when Q0 is chosen in a deterministic manner). We also note that limjK*(j)=. This ensures that, as the number of batches increases, eventually, the (true) optimal thresholds are smaller than this upper bound. Note that, for all jeK¯ batches, K*(j)K¯. Therefore, if the estimations on the service and arrival rates are accurate during batch j for jeK¯, then the learning dispatcher is using K¯ during phase 2. Although eK¯ can be a large number, it is a fixed constant (fixing μ and λ), and the total expected regret accumulated during the first eK¯ batches will also be a constant (see Remark 2). Therefore, in our analysis, we focus on the regret accumulated when jeK¯.

2.4. Main Results: Regret Bounds for Algorithm 1

Theorem 1.

Assume that the initial queue length for the learning and genie-aided systems are the same and zero is not in the set of optimal thresholds used by the genie-aided system. Then, Algorithm 1 achieves O(1) regret as N, where N is the total number of arrivals.

Theorem 2.

Assume that the initial queue length for the learning and genie-aided systems are the same and zero is in the set of optimal thresholds used by the genie-aided system. Then, Algorithm 1 achieves O(ln1+ϵ(N)) regret for any specified ϵ>0 as N, where N is the total number of arriving customers.

When the learning and genie-aided systems have different initial queue lengths as stated in Remark 1, the regret characterization still holds. This is done by introducing another genie-aided system that has the same initial queue length as the learning system. Thereafter, we use Proposition 2 (discussed in the following section), which shows that, if two coupled systems use the same threshold policy, then the ordering of their queue lengths is preserved. We end this section by pointing out that the regret characterization in Theorem 2 can be changed to O(log1+ϵ(N)) for all ϵ>0 as N; see the discussion in Remark 4.

3. Preliminary Results

We use a few coupled systems to prove the main results. Besides the coupling between the learning and genie-aided systems mentioned before, we also compare the queue-length process of the learning system with systems using the same threshold policy but with different initial queue lengths. The following results are proved for systems coupled by having the same arrival process and with the service time of the customers in the queue of both systems begin determined by the same Poisson process from t = 0.

The next proposition states that the order of the queue lengths of two coupled systems is preserved over time if their threshold policies satisfy certain conditions. This is a core preliminary result that is used in different ways and helps us establish our main results in considerable generality. Consider two systems G and L coupled through process {NA(t)}t0 and {P(t)}t0 as described in Section 2.2.1 but with possibly different initial queue lengths and (threshold) admission policies. Let QG(t) and QL(t) denote the queue length at time t of the two systems, respectively. Let {KiG}i0 and {KiL}i0 denote the threshold policies of the two systems, respectively.

Proposition 2.

  1. If the dispatchers for the two coupled systems G and L use the same threshold admission policy for all arrivals, that is, KiG=KiL for all i, then with probability one, the order of their queue lengths is preserved for all time, that is,

    QG(0)QL(0)QG(t)QL(t),t0.(13)

  2. Assume that both systems have the same initial queue length qQG(0)=QL(0). Let DG(t) and DL(t) denote the number of departures up to time t for the systems G and L, respectively. If KiGKiL for all i, then with probability one,

    QG(t)QL(t) and DG(t)DL(t),t0.(14)

Moreover, every customer that joins the queue in the system L necessarily joins the queue in the system G when static thresholds KGKL are used in the two systems, respectively, and qKL.

Before proving the proposition, we state a useful corollary.

Corollary 1.

Assume that phase 1 of the jth batch did not happen and the queue-length processes of the learning and genie-aided systems are coupled. If the two systems use the same threshold during the phase 2 of the jth batch and if the queue length of the genie-aided system hits zero during this phase 2, then the queue lengths of both systems are zero at the end of this phase 2.

Proof of Corollary 1.

Recall that, under the proposed algorithm, the queue length of the learning system is zero at the end of each phase 2. Hence, the result follows immediately by Proposition 2. □

Proof of Proposition 2.

Let us start by proving the first part of Proposition 2. Because the queue-length process is a jump process, it is sufficient to show that, after each jump, the queue lengths of the two systems satisfy (13). Note that the set of potential jump times is the union of the arrival times (jump times in the arrival process) and the jump times in the Poisson process that determines the service process. Let {tl}l0={TiA}i0{TiPD}i0 denote the ordered countable set of potential jump times of the queue-length process, where tl1<tl. By the superposition property of independent Poisson processes, with probability one, {TiA}i{TiPD}i= so that, at any time instant tl, either there is an arrival or there is a potential departure. Let QlG and QlL denote the queue lengths immediately before the lth potential jump of the system G and L, respectively. Also, let Q0G and Q0L, respectively, denote the initial queue length of the two systems.

The proof follows by induction. Fix n>0 and assume QlGQlL holds for all ln. Immediately after time tn, one of the following can happen:

  • If QnG=QnL: In case the jump at time tn is due to a service completion or a service wasted, Qn+1G=Qn+1L. If the jump is due to a new arriving customer, the dispatcher makes the same choice in both systems, and Qn+1G=Qn+1L holds.

  • If QnG>QnL0: In case the jump at time tn is due to a service completion or a service wasted, Qn+1GQn+1L. Otherwise, the jump is due to an arriving customer. We have Qn+1GQnGQnL+1Qn+1L.

Now, let us consider the second part of Proposition 2. First, we show that QG(t)QL(t) holds for all t. Again, it is sufficient to show QlGQlL for every l > 0, the proof of which follows by induction. Fix n > 0 and assume that QlGQlL for all ln. Immediately after tn, one of the following can happen:

  • If QnG=QnL: In case the jump at time tn is due to a service completion or a service wasted, then Qn+1G=Qn+1L. Otherwise, the jump is due to an arriving customer. Because KiGKiL for all i, this customer is admitted in system L only if also admitted in system G, and we have Qn+1GQn+1L.

  • If QnG>QnL0: As before, either both processes jump in the same direction at time tn or only one of them jumps (which would be the L system). In either case, Qn+1GQn+1L.

Because QG(t)QL(t) holds for all t, it follows that, whenever there is a service completion in system L then there is one also in G. Therefore, DG(t)DL(t).

Now, assume that the static thresholds KG and KL are used in the systems G and L, respectively. To show that every customer who joins the queue in system L also joins the queue in system G, we show first that QG(t)QL(t)KGKL. Fix n > 0 and assume that QlGQlLKGKL holds for all ln. One of the following can happen immediately after time tn:

  • If QnGQnL=KGKL: Under this case, either we have {QnG=KG,QnL=KL} or {QnLQnG<KG,QnL<KL}. Then, only when QnG=KGKL,QnL=0 and the jump is due to a service completion or service being wasted, the queue-length processes of the two systems evolve differently: system G has a service completion but not L. However, Qn+1GQn+1LKGKL still holds.

  • If QnGQnL<KGKL: Either we have {QnLQnG<KG,QnL=KL} or {QnLQnG<KG,QnL<KL}. When {QnLQnG<KG,QnL=KL}, if the jump is due to an arriving customer, the dispatcher in the system G assigns this customer to the queue but not the dispatcher in the system L. Otherwise, both systems have a service completion. Then, Qn+1GQn+1LKGKL holds in either case. When {QnLQnG<KG,QnL<KL}, if the jump is due to a new arriving customer, the dispatchers in both systems admit the customers to the queue. Otherwise, the jump is due to a service completion or service being wasted, and it is possible that only in system G there is a service completion. Again, Qn+1GQn+1LKGKL holds in either case.

At the time TlA, which corresponds to the arrival of the lth customer, assume that this customer is admitted to the queue in the system L but not in G. We must have QlL<KL and QlG=KG, that is, QlGQlL>KGKL. This is a contradiction. Therefore, for any arriving customer, either the dispatchers in both systems G and L make the same admission decision or only the dispatcher in the system G admits this customer. As a result, any customer who joins the queue in the system L necessarily joins the queue in the system G. □

Remark 1.

In case the genie-aided and learning systems have different initial queue lengths, we can introduce a second genie-aided system that has the same initial queue length as the learning system and is also coupled with the two systems using the procedure from Section 2.2.1. Let Qi denote the queue length of this new system right before the ith arrival customer and G(N) denote the regret of the learning algorithm with respect to the second genie-aided system. Using the triangle inequality and Equation (12), we get

G˜(N)(R+Cλ)E[i=1N|𝟙{Q¯i<K¯i}𝟙{Qi<K¯i}|+|Q¯iQi|]+G(N).

Theorems 1 and 2 provide regret bounds for G(N). By Proposition 2, the orders of Qi and Q¯i are preserved; thus, after both queue-length processes hit zero, Qi and Q¯i evolve together. Because the expected time of both queue-length processes to hit zero simultaneously is finite, the regret characterization in Theorems 1 and 2 still holds.

4. Unique Admittance Threshold Case

In this section, we analyze the case in which (3) holds with strict inequality. In this case, the genie-aided dispatcher uses a unique optimal threshold K¯, and the resulting queue-length process has a stationary distribution.

In Section 4.1, we start by providing an estimate for the number of samples of completed service times that the learning algorithm uses in order to estimate the average service time and then to update the threshold policy for each phase 2; see Proposition 3. We use it to estimate the probability that the learning system can obtain an accurate estimate of the average service time; see Proposition 4. Combining this estimate with the probability that the learning system can obtain an accurate estimation on the arrival rate, see Proposition 6, we can bound the probability of the learning system using the same threshold as the genie-aided system; see Corollary 2. In Section 4.2, we estimate the regret of the learning algorithm because of having phase 1 (if used) and using incorrect thresholds in phase 2 separately. In Proposition 8, we consider “bad” events for which there is regret accumulated during phase 2 because of using the wrong threshold. In addition, we use an upper bound on the difference between the queue-length processes of the learning and genie-aided systems to bound the regret accumulated because of the existence of phase 1 (if used) in Lemma 1 and because of using the wrong threshold during phase 2 in Lemma 2. The proof of Theorems 1 and 2 are stated in Sections 4.3 and 4.4, respectively.

4.1. Sample Estimation

First, we state and prove some results on the number of samples the learning dispatcher gets on the interarrival times and completed service times and the resulting implications on the estimates of the arrival and service rates.

In the following proposition, we show that, with high probability, the number of samples of completed service times that the learning algorithm can observe is sufficiently large at the beginning of the phase 2 of the jth batch. For this, we use the fact that (by design) each phase 2 is longer than phase 1.

Proposition 3.

Let Dj denote the number of observed service times up to the beginning of phase 2 of the jth batch. Then,

P[Djl1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]exp(l1ln1+ϵ(j)μ16(1+ϵ)(λ+μ))+exp(C0(ϵ)8ln1+ϵ(j)8(1+ϵ)),
where C0(ϵ)1+i=2eϵlnϵ(i)iln1+ϵ(eϵ)1+ϵ is a constant depending on the choice of ϵ.

Consider the epoch that is the beginning of phase 2 of the jth batch. Let X^j denote the total number of arrivals that the learning dispatcher sees during the past batches and the potential phase 1 of the jth batch. Note that X^j counts for the arrivals in phase 1 s (when they occur) and all past phase 2 s using a threshold 1.

The following inequality holds when αjl2l1 for all j:

X^jl1+i=1j1(𝟙{K(i)>0}αil2+𝟙{K(i)=0}Bi+1l1)l1i=1jBi.

Observing that the function lnϵ(x)/x is decreasing when xeϵ, when jeϵ, we have

ln1+ϵ(j)1+ϵln1+ϵ(eϵ)1+ϵ=eϵjlnϵ(x)xdxi=eϵjlnϵ(i)i,i=eϵjlnϵ(i)ilnϵ(eϵ)eϵ+eϵjlnϵ(x)xdx=lnϵ(eϵ)eϵ+ln1+ϵ(j)1+ϵln1+ϵ(eϵ)1+ϵ.

Set

C0(ϵ)1+i=2eϵlnϵ(i)iln1+ϵ(eϵ)1+ϵandC˜0(ϵ)1+i=2eϵlnϵ(i)iln1+ϵ(eϵ)1+ϵ,
and we get
C0(ϵ)+ln1+ϵ(j)1+ϵE[i=1jBi]C˜0(ϵ)+ln1+ϵ(j)1+ϵ.

Using the multiplicative Chernoff bound for independent Bernoulli random variables, the preceding inequalities, and C˜0(ϵ)0 for all ϵ>0, we get the following upper bound on the probability of X^j being small:

P[X^j<l1ln1+ϵ(j)2(1+ϵ)]P[l1i=1jBj<l1ln1+ϵ(j)2(1+ϵ)]exp(C0(ϵ)8ln1+ϵ(j)8(1+ϵ)).

Recall that i is the index of the customers arriving from the very beginning. Let ζi be a Bernoulli random variable such that ζi=1 when there is at least one potential service completion between the arrival time of the ith and (i+1)th customer. The random variables {ζi}i are i.i.d., and P[ζi=1]=μ/(λ+μ). When the threshold used is at least one, if the ith customer is rejected, the queue length at the arrival of this customer is nonzero; obviously, when the ith customer is admitted to the queue, the queue length right after the arrival of this customer is nonzero. In either case, if there are any potential services during the interarrival times between the ith and (i+1)th customers, at least one of the completed services is observed by the learning dispatcher. This implies that i counted in X^jζi=n=0X^jζcntnDj, where cntn is a subsequence of i and cntn is the index from the beginning of the nth arrival customer that is counted in X^j. Then, we have

P[Djl1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)|X^jl1ln1+ϵ(j)2(1+ϵ)]P[n=1l1ln1+ϵ(j)/2(1+ϵ)ζcntnl1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]exp(l1ln1+ϵ(j)μ16(1+ϵ)(λ+μ)).

We dropped the conditioning in the first inequality using i=1X^jζiDj, and P[i=1n+1ζic]P[i=1nζic] for all n,cZ+, and the second inequality follows from multiplicative Chernoff bound for independent Bernoulli random variables. Combining these results, we obtain

P[Djl1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]=P[Dnl1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)|X^jl1ln1+ϵ(j)2(1+ϵ)]P[X^jl1ln1+ϵ(j)2(1+ϵ)]+P[Djl1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)|X^j<l1ln1+ϵ(j)2(1+ϵ)]P[X^j<l1ln1+ϵ(j)2(1+ϵ)]exp(l1ln1+ϵ(j)μ16(1+ϵ)(λ+μ))+exp(C0(ϵ)8ln1+ϵ(j)8(1+ϵ)).

This completes the proof. □

Using Proposition 3, in the next proposition, we establish that, with high probability, the learning dispatcher has an accurate estimate of the average service time and, therefore, the service rate.

Proposition 4.

Let m^(j) denote the empirical service time estimated by the learning dispatcher at the beginning of phase 2 of the jth batch. For the proposed algorithm,

P[|m^(j)m|>Δ1]C1 exp(C2 ln1+ϵ(j)),(15)
where
C1max{exp(C0(ϵ)8),2 exp(Δ12/(8m2))exp(Δ12/(8m2))1,1},C2min{l1μ16(1+ϵ)(λ+μ),18(1+ϵ),l1μΔ1232(1+ϵ)m(λm+1)},(16)
with Δ1min{δ1,2m}, and δ1 is the constant from Inequality (4), which is one part of the condition needed for the conclusion in (5).

The proof of the proposition relies upon tail concentration bounds for subexponential random variables. We follow the definition and concentration bounds as in Wainwright (2019, section 2.1).

Definition 1.

A random variable X with mean μ is called subexponential if there are nonnegative parameters (α2,β) such that E[eγ(Xμ)]eα2γ22 for all |γ|<1β.

Proposition 5.

Suppose that X is subexponential with parameters (α2,β). Then,

P[Xμ+t]{et22α2,0tα2β,et2β,tα2β,=max{et22α2,et2β}.

Proof of Proposition 4.

Let Si denote the service time of the ith service completion. Because Si are i.i.d. with distribution EXP(1/m), which is a (4m2,2m) subexponential random variable, i=1nSi is a (4m2n,2m) subexponential random variable; see Vershynin (2018, section 2.8). Observe that 0kΔ12mk. Using the preceding subexponential concentration bounds, we get

P[|m^(j)m|>Δ1|Dj>n]k=n+1P[|i=1kSikm|kΔ1]k=n+12 exp(kΔ128m2)2 exp(Δ12/(8m2))exp(Δ12/(8m2))1exp((n+1)Δ128m2).

The third inequality follows by the geometric sum formula.

Then, substituting n=l1 ln1+ϵ(j)μ/(4(1+ϵ)(λ+μ)), we get

P[|m^(j)m|>Δ1|Dj>l1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]=P[|m^(j)m|>Δ1|Dj>l1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]2 exp(Δ12/(8m2))exp(Δ12/(8m2))1exp((l1ln1+ϵ(j)μ4(1+ϵ)(λ+μ)+1)Δ128m2)2 exp(Δ12/(8m2))exp(Δ12/(8m2))1exp(l1μln1+ϵ(j)Δ1232(1+ϵ)m2(λ+μ)).

Using the last upper bound and Proposition 3, we find

P[|m^(j)m|>Δ1]=P[|m^(j)m|>Δ1|Djl1 ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]P[Djl1 ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]+P[|m^(j)=m|>Δ1|Dj>l1 ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]P[Dj>l1 ln1+ϵ(j)μ4(1+ϵ)(λ+μ)]exp(l1 ln1+ϵ(j)μ16(1+ϵ)(λ+μ))+exp(C0(ϵ)8ln1+ϵ(j)8(1+ϵ))+2 exp(Δ12/(8m2))exp(Δ12/(8m2))1exp(l1μln1+ϵ(j)Δ1232(1+ϵ)m2(λ+μ))C1exp(C2 ln1+ϵ(j)),
where C1 and C2 are given by (16). □

Proposition 6.

Let ν(j) denote the empirical interarrival time estimated by the learning dispatcher at the beginning of phase 2 of the jth batch. For the proposed algorithm,

P[|νν^(j)|>Δ2]C3 exp(C4βj),
where
C32 exp(Δ22/(8ν2))exp(Δ12/(8ν2))1,C4l1Δ228ν2, and βj1+i=1j1αi,(17)
with Δ2min{δ2,2ν}, and δ2 is the constant from Inequality (4), which is the second part of the condition needed for the conclusion in (5).

Note that, no matter whether customers are admitted to the queue or not, the learning dispatcher is able to observe all arrivals. We always have the first phase 1 and that the number of customers who arrived during the jth phase 2 is at least αjl2. Note that we also have l2>l1. Let βj=1+i=1j1αi. Right before the jth phase 2, there are at least l1+n=1j1αnl2βjl1 customers that have arrived at the system, and the learning dispatcher would have observed all the interarrival times. Following a similar logic as in the proof of Proposition 4, let Ai denote the interarrival time of consecutive customers. The random variables Ai are i.i.d. with distribution EXP(1/ν), which is a (4ν2,2ν) subexponential random variable. Using the concentration result detailed in Proposition 5 for subexponential random variables, we have

P[|νν^(j)|>Δ2]k=βjP[|i=1kAikν|>kΔ2]k=βj2 exp(kΔ228ν2)2 exp(Δ22/(8ν2))exp(Δ12/(8ν2))1exp(βjl1Δ228ν2),
which establishes the result. □

Note that, because αj1 for all j, βjj. Therefore, as the number of batches, j, increases, the probability of not having a correct estimate of the average arrival rate decreases faster than the probability of not having a correct estimate of the average service time. In the following corollary, we combine Propositions 4 and 6 to get a bound on the probability of the learning dispatcher not using (an optimal) threshold K¯ when j is large.

Corollary 2.

For the proposed algorithm, when jeK¯,

P[K(j)K¯]C1 exp(C2 ln1+ϵ(j))+C3 exp(C4βj),(18)
where C1 and C2 are defined in (16); C3 and C4 are defined in (17).

Recall that, for the true arrival and service rates λ and μ, we have

V^(K¯,μ,λ)<RC<V^(K¯+1,μ,λ).

Proposition 1 says that, if m^ and ν^ satisfy Inequality (4), then the learning dispatcher would be able to solve for the desired threshold K¯. Moreover, because j>eK¯,K*(j)K¯, that is, the learning dispatcher would be able to use K¯ in the jth phase 2. Using Propositions 4 and 6, we have

P[K(j)K¯]P[|mm^(j)|>Δ1]+P[|νν^(j)|>Δ2]C1 exp(C2 ln1+ϵ(j))+C3 exp(C4βj),
which concludes the proof. □

When the learning dispatcher has knowledge of either μ or λ, one can obtain an inequality similar to that in Corollary 2 by setting the corresponding bound from Propositions 4 and 6 to zero. When the service rate is known and the arrival rate is not known, then a better characterization of the regret obtains; see Remark 3.

4.2. Regret Accumulated in Each Phase

We now analyze the regret. Let G1j denote the expected regret accumulated during the period starting with the (potential) phase 1 and ending at the first time the queue is emptied in the immediate phase 2 for the jth batch that follows. Let G2j denote the expected regret accumulated in the remainder of phase 2 of the jth batch. Whenever phase 1 of the jth batch does not happen, there is no regret to be grouped to G1j, and the regret accumulated in phase 2 is entirely in G2j; in this case, the regret accumulated during the entire jth batch is also solely in G2j. Both G1j and G2j count for the regret accumulated because of not having accurate estimates of the service rate as well as not estimating the arrival rate accurately. Intuitively, G1j takes into consideration the regret accumulated because of the existence of a phase 1, and G2j considers the regret accumulated because of the learning system using an incorrect threshold. Despite the subtleties, for easier recall, we refer to Gij as the regret accumulated in phase i{1,2} of batch j.

Let N denote the number of arrivals as a function of which we determine the regret. Then, we have

G˜(N)E[j=1J(G1j+G2j)]j=1N/l2(G1j+G2j),(19)
where JJ(N) is the total number of batches until N arrivals including the batch in progress or initiated by the Nth arrival. The last inequality follows by the observation
Ni=1Jαil2βJl2Jl2,
which implies JN/l2 almost surely (a.s.). When one uses αj that grows like jα, for some α>0, we obtain that J is of order of O(N1/(a+1)). This adjustment would not affect the order of the regret but only the constants; see Sections 4.3 and 4.4.

For each j, we analyze G1j and G2j separately. Let E1j denote the event that phase 1 of the jth batch happens. Because in the proposed algorithm, we always have the first phase 1, we have P[E11]=1. Phase 1 is omitted when the threshold used in the previous phase 2 is nonzero. By the independence of Bj and K(j), for j > 1, we have

P[E1j]=P[E1j|K(j1)=0]P[K(j1)=0]+P[E1j|K(j1)0]P[K(j1)0]=P[Bj=1]P[K(j1)=0].(20)

Let E2j denote the event that K(j)=K¯, and E3j denote the event that the queue lengths of the two systems are the same at the beginning of the jth batch, that is,

E2j{K(j)=K¯} and E3j{Qnj=Q¯nj}.

Also, denote by τK,l the number of arrivals during a busy period of an M/M/1/K queue with initial queue length l. The proof of Lemmas 1 and 2 rely on an upper bound of E[τK,l], which is stated in the following proposition.

Proposition 7.

Consider an M/M/1/K queue with arrival rate λ, service rate μ, and initial queue length 0<lK.

E[τK,l]g(l;K),(21)
where
g(1;K)={λ/μ+1λ/μ1((λμ)K1),λμ,2K,λ=μ,
and for all 1<lK,
g(l;K)={λ/μ+1(λ/μ1)2((1(λμ)l)((λμ)K+1λμ+1)+(l1)(1λμ)),λμ,l(2Kl+1),λ=μ.

In particular, E[τK,l] is of order O((λ/μ)K+K2).

Consider a finite-state Markov chain with state space {0,1,,.K} and with the following transition matrix:

p(0,0)=1;p(l,l+1)=λλ+μ,p(l,l1)=μλ+μ,when l{1,,K1};p(K,K)=λλ+μ,p(K,K1)=μλ+μ;
let g(l;K) denote the expected number of jumps of this Markov chain until it hits zero for the first time when the initial state is l and the threshold is K. Conditional on the first jump, we obtain the following relationship for g(l:K):
g(l;K)=λλ+μg(l+1;K)+μλ+μg(l1;K)+1, when l{1,,K1};g(K;K)=λλ+μg(K;K)+μλ+μg(K1;K)+1;
together with the condition g(0;K)=0, we can solve for g(l;K) and obtain
g(1;K)={λ/μ+1λ/μ1((λμ)K1),λμ,2K,λ=μ,
and for all 1<lK,
g(l;K)={λ/μ+1(λ/μ1)2((1(λμ)l)((λμ)K+1λμ+1)+(l1)(1λμ)),λμ,l(2Kl+1),λ=μ.

From the transition probabilities of the Markov chain, g(n:K) is also the expected number of services and arrivals of the corresponding M/M/1/K queue with arrival rate λ>0, service rate μ>0, and initial queue length l during the busy period that is initiated with n customers in the queue. Because each arrival must also be served when the Markov chain hits zero, E[τK,l]g(l;K)2E[τK,l]+K. Therefore, g(l;K) serves as an upper bound on E[τK,l]. This upper bound is tight in the sense that g(l;K) is at most 2E[τK,l]+K. □

Lemma 1.

For j>eK¯, we have the following:

  1. When K¯>0,

    G1j(R+Cλ)(l12+(K¯+1)l1+(1+K*(j))g(l1;K*(j)))P[E1j];

  2. When K¯=0,

    G1j(R+Cλ)(l12+l1+C5)P[E1j]+(R+Cλ)(1+K*(j))g(l1;K*(j))P[(E2j)c];
    here,
    C5(1+l1)l1λμ.

The function g(l;K) is defined in Proposition 7 and is O((λ/μ)K+K2) for all lK.

Let nj denote the total number of customers that arrived until the beginning of the jth batch, and L1jmin{n|Qnj+l1+n=0}. Recall that E1j denotes the event that phase 1 happens during the jth batch. Using (12) and observing that regret accumulates in G1j only when E1j happens, we have

G1j(R+Cλ)E[i=nj+1nj+l1|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|+|Q¯iQi||E1j]P[E1j]+(R+Cλ)E[i=nj+l1+1nj+l1+L1j|𝟙{Q¯i<K¯i} 𝟙{Qi<Ki}|+|Q¯iQi||E1j]P[E1j](I)+(II).

Note that (I) is a bound on the regret accumulated during phase 1 of the jth batch (when it occurs) and (II) is a bound on the regret accumulated in phase 2 of the jth batch until the queue is emptied for the first time in this phase 2. When K¯>0 or K¯=0, we can follow the same logic to bound (I), that is the regret accumulated during phase 1 for j>eK¯:

(I)(R+Cλ)E[i=njnj+l1(1+K¯+l1)]P[E1j](R+Cλ)(l12+(K¯+1)l1)P[E1j].

Now, we bound (II) in the case K¯>0. We use K*(j) to obtain a bound on the queue length difference of the two systems as well as the expectation of L1j. The queue length of the learning system at the beginning of each phase 2 is at most l1 because the queue length of the learning system is zero at the end of the previous phase 2. Moreover, the threshold used by the learning dispatcher in the jth batch is bounded above by K*(j)l1. Hence, the queue length of the learning system is bounded by K*(j) during phase 2. Consider a system S2 that uses the admission policy with threshold K*(j) and is coupled with the learning system according to Section 2.2.1. Assume that the initial queue length of S2 is the same as the queue length of the learning system at the beginning of the jth phase 2, which is at most l1. Note that the threshold used in the learning system is less than or equal to the one used in S2. Let τ denote the total number of arrivals during the first busy period of the system S2. Using Proposition 2, we get QiQiS2 for nj+l1+1inj+l1+L1j, and E[L1j|E1j]E[τK*(j),l1]. Using Proposition 7, and together with the upper bound K*(j) of the queue length of the learning system, we get

(II)(R+Cλ)(1+K*(j))E[L1j|E1j]P[E1j](R+Cλ)(1+K*(j))g(l1;K*(j))P[E1j],
where F1(j) is defined in the statement of Lemma 1.

Together, we have the following bound for G1j when K¯>0:

G1j(R+Cλ)(l12+(K¯+1)l1+(1+K*(j))g(l1;K*(j)))P[E1j].

In the case of K¯=0, we take a slightly different path of analyzing (II): we consider the threshold used in the jth phase 2 to get a better regret bound compared with using the same argument as in the case K¯>0. We have

(II)=(R+Cλ)E[i=nj+l1+1nj+l1+L1j|𝟙{Q¯i<K¯i}𝟙{Qi<Ki}|+|Q¯iQi||E1jE2j]P[E1jE2j]+(R+Cλ)E[i=nj+l1+1nj+l1+L1j|𝟙{Q¯i<K¯i}𝟙{Qi<Ki}|+|Q¯iQi||E1j(E2j)c]P[E1j(E2j)c](R+Cλ)(1+l1)E[L1j|E1jE2j]P[E1jE2j]+(R+Cλ)(1+K*(j))E[L1j|E1j(E2j)c]P[E1j(E2j)c](R+Cλ)(1+l1)l1λμP[E1j]+(R+Cλ)(1+K*(j))g(l1;K*(j))P[(E2j)c].

The first follows because the total number of customers admitted in phase 1 is l1 and in the case K¯=0 and under E2j, the threshold used in phase 2 is zero. Under E1jE2j, the learning system does not accept any new customers to the queue, and E[E1jE2j] is the number of arrivals during the period of serving all the remaining customers in the queue. Observe that the queue length of the learning system at the beginning of phase 2 is at most l1; conditioning on the time used to serve l1 customers, we get the desired bound on E[E1jE2j]. The bound on E[L1j|E1j(E2j)c] follows the same logic as the bound of E[L1j|E1j]. Combined with the bound for (I), we get the desired result. □

We observe that, under the event E2jE3j, there is no regret accumulated in G2j: indeed, under the event (E1j)cE2jE3j, the dispatcher of the learning system and the dispatcher of the genie-aided system make the same decision on every arrival customer in phase 2 of the jth batch. As a result, their queue lengths are matched and there is no regret accumulated during this exploitation phase, thus, also no regret accumulated in G2j. The threshold used in phase 1 can be considered as the maximum allowed value, namely, K*(j)(l1), because all the arriving customers during phase 1 are admitted. Under the event E2j, the threshold used in the jth phase 2 is the same as the genie-aided system. Therefore, under the event E1jE2jE3j, although phase 1 of the jth batch happens, the queue length at the beginning of the jth batch is the same for both systems, and the thresholds used in the learning system is no smaller than the threshold used in the genie-aided system. The coupling between the learning and genie-aided systems preserves the order between the queue lengths of the two systems as proved in Proposition 2: when the queue length of the learning system hits zero the first time after phase 1, the queue length of the genie-aided system is also zero. Therefore, under event E1jE2jE3j, after the queue length of the learning system hits zero after phase 1, the queue lengths of the learning and genie-aided systems are matched, and no regret is accumulated in G2j.

The next proposition shows that the probability of the event E2jE3j is high. We use De Morgan’s law to get an upper bound on the probability of this event by using already characterized bounds on the probabilities of a few events.

Proposition 8.

Fix jeK¯. Then, we have the following:

  1. In the case K¯>0,

    P[(E2jE3j)c]C1 exp(C2ln1+ϵ(j))+C1 exp(C2ln1+ϵ(j1))+C3 exp(C4βj)+C3 exp(C4βj1)+(cK¯)αj1l2.

  2. In the case K¯=0,

    P[(E2jE3j)c]C1 exp(C2ln1+ϵ(j))+C3 exp(C4βj).

The constants C1, C2, C3, and C4 are defined in (16) and (17), and

cK¯1(μλ+μ)K¯(0,1).

We first consider the case K¯>0. Let E4j denote the event that the queue length of the genie-aided system hits zero during phase 2 of the jth batch. The probability that at least K¯ potential services occur between two consecutive interarrivals is 1cK¯. Because the genie-aided system is an M/M/1/K¯ queue, there are at most K¯ customers in the queue. Because the total number of arrivals during the phase 2 of the jth batch is at least αjl2, we get

P[(E4j)c](cK¯)αjl2.

By Corollary 1, we have

P[(E3j)c|E2j1]P[(E4j1)c|E2j1](cK¯)αj1l2.

Using De Morgan’s laws, we can rewrite the event (E2jE3j)c as (E2j)c(E3j)c, and by using Corollary 2 for j>eK¯, we obtain

P[(E2jE3j)c]P[(E2j)c]+P[(E2j1)c]+P[(E3j)c|E2j1]C1 exp(C2 ln1+ϵ(j))+C1 exp(C2 ln1+ϵ(j1))+C3 exp(C4βj)+C3 exp(C4βj1)+(cK¯)αj1l2.

In case that K¯=0, the queue length of the genie-aided system is always zero, and E3j happens with probability one. Hence,

P[(E2jE3j)c]=P[(E2j)c]C1 exp(C2 ln1+ϵ(j))+C3 exp(C4βj).

This completes the proof. □

Next, we estimate G2j, which considers the regret accumulated during the jth batch after the first time the queue length of the learning system hit zero during the jth phase 2 if there is a phase 1 and considers the regret accumulated during phase 2 if phase 1 did not happen. As we mention before, only under the event (E2jE3j)c, regret is accumulated to G2j.

Lemma 2.

For j>eK¯,

G2j(R+Cλ)((1+K*(j))αjl2+(1+K*(j))g(K*(j);K*(j)))P[(E2jE3j)c],
with g(l;K) defined in Proposition 7.

Let n˜j denote the total number of customers that arrived until the beginning of phase 2 of the jth batch. Note that, when phase 1 did not happen in the jth batch, n˜j=nj, and when phase 1 happened, n˜j=nj+l1. However, because we are analyzing the regret accumulated in phase 2 because of using an incorrect threshold and not conditional on having a phase 1 or no, using n˜j gives simpler expressions during the analysis. By its definition, G2j takes into consideration only part of the regret that is accumulated in phase 2. Because we are interested in finding an upper bound, we double count parts of the regret that are already considered in G1j in the case that there is a phase 1 and compute the regret accumulated during phase 2. Set L2jmin{n|Qn˜j+αjl2+n=0}. This is the total number of arriving customers beyond the first αjl2 ones during the exploitation phase for the jth batch. Using (12) and (E2jE3j)c, we get

G2j(R+Cλ)E[i=n˜j+1n˜j+αjl2+L2j|𝟙{Q¯i<K¯} 𝟙{Qi<K(j)}|𝟙{(E2jE3j)c}]+(R+Cλ)E[i=n˜jn˜j+αjl2+L2j|Q¯iQi| 𝟙{(E2jE3j)c}](R+Cλ)((III)+(IV)).

In what follows, we bound the two expectations on the right-hand side (RHS). For the first expectation, because |𝟙{Q¯i<K¯}𝟙{Qi<K(j)}|1, after splitting phase 2 into two parts, we get

(III)E[i=n˜j+1n˜j+αjl2𝟙{(E2jE3j)c}]+E[i=n˜j+αjl2+1n˜j+αjl2+L2j 𝟙{(E2jE3j)c}]=E[αjl2𝟙{(E2jE3j)c}]+E[L2j 𝟙{(E2jE3j)c}]=αjl2P[(E2jE3j)c]+E[L2j|(E2jE3j)c]P[(E2jE3j)c].

Using a similar way of analyzing L1j in the proof of Lemma 1 but comparing with a coupled system that uses threshold K*(j) and having initial queue length K*(j), we get

E[L2j|(E2jE3j)c]E[τK*(j),K*(j)]g(K*(j);K*(j)).

Together with the preceding inequalities, we get a bound for (III):

(III)(αjl2+g(K*(j);K*(j)))P[(E2jE3j)c].

We can split (IV) in a similar manner as before, and then, together with QiK*(j), we have

(IV)K*(j)(E[i=n˜jn˜j+αjl2 𝟙{(E2jE3j)c}]+E[i=n˜jαjl2n˜j+αjl2+L2j 𝟙{(E2jE3j)c}])K*(j)(αjl2+g(K*(j);K*(j)))P[(E2jE3j)c].

Combining the bounds for (III) and (IV), we get

G2j(R+Cλ)((1+K*(j))αjl2+(1+K*(j))g(K*(j),K*(j)))P[(E2jE3j)c].

And g(l;K) is defined in Proposition 7.

Before proving the regret bound for Algorithm 1, the following remark gives an upper bound on the regret accumulated during the first eK¯ batches in which the upper bound of the threshold used in the phase 2 of the learning systems may be smaller than K¯.

Remark 2.

Recall that the queue length of each batch does not exceed K*(j) in the jth batch. Following the definition of K*(j), when jeK¯,K*(j)K¯+l1+Q0K¯. The regret accumulated during the first eK¯ batches is at the most

G0(R+Cλ)j=1eK¯(K*(j)+K¯+1)(l1+αjl2+g(K*(j);K*(j))),
where g(l;K) is defined in Proposition 7. This bound is loose because it assumes that phase 1 happens at each batch and a worst case assumption of regret being accumulated at all times is enforced. Note that the bound is a finite function of the system parameters.

4.3. Proof of Theorem 1

In the case that K¯>0, using Inequality (19) and Lemmas 1 and 2, we have

j=eK¯N/l2G1j+G2j(R+Cλ)j=eK¯N/l2(l12+(K¯+1)l1+(1+K*(j))g(l1;K*(j)))P[E1j]+(R+Cλ)j=eK¯N/l2((1+K*(j))αjl2+(1+K*(j))g(K*(j);K*(j)))P[(E2jE3j)c].

Substituting values/bounds for P[E1j] and P[(E2jE3j)c] from Corollary 2 and Proposition 8, we get

j=eK¯N/l2G1j+G2jj=eK¯N/l2(R+Cλ)(l12+(K¯+1)l1+(1+K*(j))g(l1,K*(j)))lnϵ(j)j(C1 exp(C2 ln1+ϵ(j))+C3eC4βj)+j=eK¯N/l2(R+Cλ)(1+K*(j))(αjl2+g(K*(j),K*(j)))×(C1 exp(C2ln1+ϵ(j1))+C1 exp(C2 ln1+ϵ(j))+C3eC4βj+C3eC4βj1+(cK¯)αj1l2),
where g(l;K) is defined in Proposition 7 and is of order O((λ/μ)K+K2). Recall that βjj. All terms involved are partial sums of convergent series when αj increases to infinity as a function bounded by polynomial in j. Therefore limN G(N) is bounded, and the proposed algorithm achieves O(1) regret in the case that K¯>0.

4.4. Proof of Theorem 2

Similarly to the proof of Theorem 1, using Inequality (19), Lemmas 1 and 2, Corollary 2, and Proposition 8, we have

j=eK¯N/l2G1j+G2jj=eK¯N/l2(R+Cλ)(l12+l1+C5)lnϵ(j)j+j=eK¯N/l2(R+Cλ)(1+K*(j))g(l1,K*(j))(C1 exp(C2ln1+ϵ(j))+C3 exp(C4βj))+j=eK¯N/l2(R+Cλ)(1+K*(j))(αjl2+g(K*(j);K*(j)))(C1 exp(C2 ln1+ϵ(j))+C3 exp(C4βj)).

The dominant term on the RHS is

j=eK¯N/l2(R+Cλ)(l12+l1+C5)lnϵ(j)j.

When N is large, we have

j=2N/l2lnϵ(j)j=O(ln1+ϵ(N)).

Hence, the regret for K¯=0 is of order O(ln1+ϵ(N)).

Remark 3.

We mention earlier that one can adapt the analysis to the case when only the service rate is unknown or only the arrival rate is unknown by adjusting the probability of the learning system using the optimal thresholds in phase 2 and receiving similar regret bounds. As shown in the preceding proof, in the case when the optimal threshold is zero, the reason why the regret is O(ln1+ϵ(N)) is that phase 1 is likely to happen infinitely often so that enough samples of the service rate can be obtained. This explicit exploration phase is necessary when the service rate is unknown. However, when only the arrival rate is unknown, the learning system always obtains free samples for the arrival rates whether accepting customers to the queue or not. In this case, it is unnecessary to explore explicitly so that an O(1) regret results similar to the case in which the optimal threshold is nonzero when one always omits phase 1 and only the arrival rate is unknown.

Remark 4.

The preceding regret analysis shows that we can obtain constant regret for the case in which the optimal thresholds are nonzeros and an O(ln1+ϵ(N)) regret when zero is an optimal threshold for any fixed ϵ>0. From the proof of Theorem 2, the order of the regret is a result of explicit exploration as it is the dominant term. One natural question is the following: can we further reduce the order of the regret in the case that zero is an optimal threshold, preserving the constant regret in the case that the optimal threshold is nonzero if we reduce P[Bj=1], the probability of having phase 1 when the previous phase 2 uses threshold zero? Following the steps of our proof, we can show that having P[Bj=1]=ln(ln(j))/j results in regret accumulating slower than O(ln1+ϵ(N)) for any ϵ>0 in the case that zero is an optimal threshold and constant regret in the case that the optimal threshold is nonzero. However, this result holds for large enough N as the finite time performance of using P[Bj=1]=ln(ln(j))/j may not outperform our discussed choices for P[Bj=1] as it requires j to be extremely large (but still finite) to show improved performance.

Remark 5.

We believe that the dramatically different behaviors for our algorithm between cases when zero is an optimal threshold and when it is not are fundamental to our problem owing to completely different demands in two parameter regimes: in one case, no customers should be dispatched at all versus the other case in which asymptotically a positive fraction of customers are dispatched. Hence, we conjecture that, for any given learning-based dispatching algorithm, the regret accumulated would grow at least at Ω(ln(N)) when the parameters are chosen in an adversarial manner. Note that our algorithm satisfies this conjecture. We argue later on in Section 6 that a UCB scheme has a worst case regret over parameter choices of Ω(ln(N)).

5. Nonunique Admittance Threshold Case

When the dispatcher uses a static threshold policy, the queue-length process is Markovian and ergodic. Naor (1969) shows that the social welfare (long-term average profit in (1)) is maximized when using the static threshold K¯ that uniquely satisfies (3) by analyzing the stationary distributions of the queue-length process for all possible static threshold policies. When (3) holds with equality and K¯1, static thresholds K¯ and K¯1 are both optimal, and furthermore, policies that (stochastically) alternate between the thresholds K¯ and K¯1 with a fixed probability yield the same long-term average profit, that is, are optimal for the ergodic reward-maximization problem. This complicates our regret analysis as we need to pick a specific ergodic reward-maximizing policy for our regret analysis.

In Section 5.1, we analyze the learned threshold; in Section 5.2, we introduce the specific ergodic reward maximizing genie-aided dispatcher with which we compare, which we label the alternating genie-aided dispatcher, and finally, Section 5.3 is devoted to the analysis of the regret of the learning algorithm compared with the specific genie-aided dispatcher introduced earlier.

5.1. Threshold Used by the Learning Dispatcher in Phase 2

Following Algorithm 1, the threshold used by the learning dispatcher in the jth phase 2 is K(j)=min(K*(j),K), where K is the unique integer that satisfies the inequality V(K,1/m^,ν^)R/C<V(K+1,1/m^,1/ν^), where m^ is the empirical average service time and ν^ is the empirical interarrival time computed using all completed services and observed arrivals before each phase 2. As mentioned earlier, the threshold is fixed throughout each phase 2. Proposition 1 implies that, as long as the estimations are accurate so that Inequalities (6) are satisfied and when jeK¯, the learning dispatcher would use a threshold in {K¯,K¯1} during the jth phase 2. Proposition 3 still holds when equality holds in (3). Unlike in the previous case in which we show that, eventually, the learning dispatcher uses the same threshold K¯ as the genie-aided dispatcher in phase 2, we now show that, as the number of batches goes to infinity, the learning algorithm (eventually) stochastically alternate only between the thresholds K¯ or K¯1.

We first state the analogues of Propositions 4 and 6 and Corollary 2.

Proposition 9.

Let m^(j) denote the empirical service time estimated by the learning dispatcher at the beginning of phase 2 of the jth batch. For the proposed algorithm, in the case that V(K¯,μ,λ)=R/C, we have,

P[|m^(j)=m|>Δ˜1]C˜1exp(C˜2ln1+ϵ(j)),(22)
where
C˜1max{exp(C0(ϵ)8(1+ϵ)),2 exp(Δ˜12/(8m2))exp(Δ˜12/(8m2))1,1},C˜2min{l1μ16(1+ϵ)(λ+μ),18(1+ϵ),l1μΔ˜1232(1+ϵ)m(λm+1)},(23)
with Δ˜1min{δ˜1,2m}, and δ˜1 is a constant for the first inequality in (6), which is one part of the condition needed to reach the conclusion in (7).

Proof.

The proof is the same as the proof of Proposition 4 but with different constants. □

Proposition 10.

Let ν(j) denote the empirical interarrival time estimated by the learning dispatcher at the beginning of phase 2 of the jth batch. For the proposed algorithm, in the case that V(K¯,μ,λ)=R/C, we have,

P[|νν^(j)|>Δ˜2]C˜3exp(C˜4βj),
where
C˜32 exp(Δ˜22/(8ν2))exp(Δ˜12/(8ν2))1 and C˜4l1Δ˜228ν2,(24)
where βj is defined in Proposition 6, and Δ˜2min{δ˜2,2ν}, where δ˜2 is the constant in the second inequality in (6) that is the second part needed to reach the conclusion in (7).

The proof is the same as the proof of Proposition 6 but with different constants.

Corollary 3.

For the proposed algorithm, when jeK¯, in the case that V(K¯,μ,λ)=R/C,

P[{K(j)K¯}{K(j)K¯1}]C˜1 exp(C˜2 ln1+ϵ(j))+C˜3 exp(C˜4βj),(25)
where C˜1 and C˜2 are defined in (23) and C˜3 and C4 are defined in (24).

Proof.

The proof for this proposition follows the same logic as the proof of Corollary 2 but with different constants. □

Corollary 4.

In the case that V(K¯,μ,λ)=R/C, there exists a random index J that is finite with probability one, where the learning algorithm uses threshold K¯ or K¯1 after the Jth batch.

We show that the learning algorithm uses thresholds that are not K¯ nor K¯1 only finitely many times with probability one. From Corollary 3, when K¯>1, we have

j=1P[({K(j)=K¯}{K(j)=K¯1})c]j=1C˜1 exp(C˜2 ln1+ϵ(j))+C˜3 exp(C˜4j2)<.

By the Borel–Cantelli lemma (see Durrett 2016), we have

P[lim supj({K(j)=K¯}{K(j)=K¯1})c]=0,
that is, with probability one, the learning algorithm uses thresholds not in {K¯,K¯1} only a finite number of times. Thus, almost surely, the learning algorithm uses the optimal thresholds K¯ and K¯1 after a finite random time. When K¯=1, a similar proof holds. □

5.2. An Alternating Genie-Aided Dispatcher Coupled with the Learning Dispatcher That Maximizes the Long-Term Average Profit

If we compare our learning algorithm with a genie-aided system that uses a static threshold K¯ (or, alternatively, K¯1), the regret is not constant even when K¯>1. The reason is that the learning dispatcher may switch between the thresholds K¯ and K¯1 in different phase 2 s even when m^(mϵ,m+ϵ), where ϵ is sufficiently small. However, we can compare the queue-length process under the learning dispatcher with an optimal genie-aided dispatcher to which we refer as the alternating genie-aided dispatcher: a dispatcher that may change the threshold used between K¯ and K¯1 at the beginning of any busy cycle (a busy period plus an immediately following idle period). We ensure that the threshold-changing policy of this alternating genie-aided dispatcher is adapted to the filtration generated by the queue lengths of the two systems and the random variable Bj with the threshold remaining unchanged during each busy cycle. It is worth mentioning that, although the learning dispatcher may compute and change the threshold at the beginning of each phase 2 (which may involve multiple busy cycles), only the genie-aided dispatcher may change the threshold at the beginning of a busy cycle. This alternating genie-aided dispatcher is aware of the fact that the learning dispatcher follows Algorithm 1 and can compute the threshold learned by the learning dispatcher. This alternating genie-aided dispatcher is coupled with the learning dispatcher under the coupling described in Section 2.2.1. Moreover, when a customer arrives, having seen the realization of Bj, this genie-aided dispatcher is aware of whether this customer arrives during a phase 1 or 2 of the learning system and picks the proper threshold to use when this customer initiates a busy cycle.

Recall that Ki denotes the threshold used by the learning system at the arrival of the ith customer. Following similar notation as in Section 2 for the alternating genie-aided dispatcher, let K˜i denote the threshold policy used at the arrival of the ith customer, Q˜i denote the queue length right before the arrival of the ith customer, Q˜(t) denote the queue length at time t, τnB denote the time of the beginning of the nth busy cycle, N˜A(τnB) denote the index of the arrival customer who arrives at the beginning of the nth busy cycle, N˜(t) denote the total number of completed busy cycles up to time t, and K˜n denote the threshold used during the nth busy cycle; note that τ1B=0. At the beginning of each busy cycle, the alternating genie-aided dispatcher then chooses a threshold K˜n{K¯,K¯1}, where we have

K˜n={K¯1,if n=1,K¯1,if n>1 and {KN˜A(τnB)K¯1 OR customer N˜A(τnB) arrives during phase 1},K¯,if n>1 and {KN˜A(τnB)K¯ AND customer N˜A(τnB) arrives during phase 2}.(26)

That is, when the customer who initiates a busy cycle in the genie-aided system arrives during phase 1 of the learning system, the genie-aided dispatcher uses threshold K¯1 in the initiated busy cycle. When the customer arrives during phase 2 in the initiated busy cycle, the genie-aided dispatcher uses a threshold from {K¯,K¯1} that is closer to the threshold used by the learning system. This threshold choice helps to preserve the queue-length ordering under desired events as explained in Section 5.3. In other words, for customers i1 and i2 who arrive during the nth busy cycle, that is, N˜A(τnB)i1<i2<N˜A(τn+1B), we have K˜i1=K˜i2=K˜n. This switching policy is adapted to the filtration generated by the queue lengths of the genie-aided and learning systems. Because the learning algorithm always has the first exploration phase, we set K˜1=K¯1.

The following proposition shows the optimality of the alternating genie-aided dispatcher described earlier using the strong law of large numbers for martingales.

Proposition 11.

Consider a dispatcher that uses a static threshold policy, either K¯ or K¯1, during a busy cycle and may switch between these two thresholds only at the beginning of a busy cycle following the switching rule described in (26). The long-term average profit of the system under this dispatcher is the same as a dispatcher using either one of the static thresholds K¯ or K¯1.

Assume the initial queue length is some a{0,1,,K¯}, where the particular value doesn’t impact the asymptotic results. We are interested in finding

lim inft1t(aR+i=1N˜A(t)R𝟙{Q˜iK˜i}0tCQ˜(u)du)=lim inft1t(aR+i=1N˜A(τ2B)1R𝟙{Q˜iK˜1}0τ2BCQ˜(u)du)+lim inft1t(n=2N˜(t)(i=N˜A(τnB)N˜A(τn+1B)1R𝟙{Q˜iK˜n}τnBτn+1BCQ˜(u)du))+lim inft1t(i=N˜A(τN˜(t)+1B)N˜A(t)R𝟙{Q˜iK˜N˜(t)+1}τN˜(t)+1BtCQ˜(u)du).(27)

Let the tuple (Xn,Bn) denote the total net profit and duration of the nth busy cycle under this dispatcher. For the first busy cycle, we have

X1aR+i=1N˜A(τ2B)1R𝟙{Q˜iK˜1}0τ2BCQ˜(u)du, and B1τ2B.

For n2, we have

Xni=N˜A(τn)N˜A(τn+1B)1R𝟙{Q˜iK˜n}τnBτn+1BCQ˜(u)du, and Bnτn+1BτnB.

We can rewrite (27) as

lim inft1tn=2N˜(t)Xn+lim inft1t(X1+i=N˜A(τN˜(t)+1B)N˜A(t)R𝟙{Q˜iK˜N˜(t)+1}τN˜(t)+1BtCQ˜(u)du).

When the initial queue length is finite, E[B1] and E[(B1)2] are finite; see Takagi and Tarabia (2009).

Let (YnK¯,BnK¯) denote the total net profit and the duration of the nth busy cycle of a dispatcher that uses static threshold K¯ and with initial queue length one, and let YK¯(t) denote the accumulated total net profit of this dispatcher up to time t. Setting the initial queue length to one is owing to a generic busy cycle starting as such. The random variables (YnK¯,BnK¯) are i.i.d., and YK¯(t) is a renewal reward process, see Durrett (2016, section 3.1). Similarly, we can define (YnK¯1,BnK¯1) and YK¯1(t) for a dispatcher that uses static threshold K¯1. Naor (1969) shows that there exists a constant O denoting the optimal long-term average profit of the dispatcher, for which, with probability one,

limt1tYK¯(t)=limt1tYK¯1(t)=O.

By the renewal–reward theorem (Durrett 2016, section 3.1), we have

E[Y1K¯]=E[B1K¯]O, and E[Y1K¯1]=E[B1K¯1]O.

Let F˜n1F˜τn denote the sigma-algebra generated by the queue-length process of the coupled learning dispatcher and the dispatcher described in Proposition 11 up to time τnB (the end of the (n1)th busy cycle of the dispatcher described in Proposition 11). By the independence of the Poisson arrival and Poisson potential service process, the distribution of (Xn,Bn) conditioned on F˜n1 is the same as the distribution of (Xn,Bn) conditioned on the filtration generated by K˜n. Moreover, for n2,(Xn,Bn) conditioned on the event {K˜n=K¯} has the same distribution as (Y1K¯,B1K¯) and (Xn,Bn) conditional on the event {K˜n=K¯1} has the same distribution as (Y1K¯1,B1K¯1). Using these, for i2, we have

E[Bn]=E[Bn|K˜n=K¯]P[K˜n=K¯]+E[Bn|K˜n=K¯1]P[K˜n=K¯1]=E[B1K¯]P[K˜n=K¯]+E[B1K¯1]P[K˜n=K¯1],
and similarly,
E[(Bn)2]=E[(Bn)2|K˜n=K¯]P[K˜n=K¯]+E[(Bn)2|K˜n=K¯1]P[K˜n=K¯1]=E[(B1K¯)2]P[K˜n=K¯]+E[(B1K¯1)2]P[K˜n=K¯1].

Both B1K¯ and B1K¯1 have finite first and second moments Takagi and Tarabia (2009), and thus, so does Bi.

Let N˜joinn denote the number of the customers joining the queue during the nth busy cycle under the dispatching policy described in Proposition 11. Observe that the total number of arrivals joining the queue and services are equal during a busy cycle except for the first one for which there are exactly a more service completions than the number of customers joining the queue during the first busy cycle. When there are at least K¯ potential services between two consecutive arrivals, the queue length under the dispatcher described in Proposition 11 hits zero, and a busy period ends. Therefore, for any integer M, we have

P[N˜joinn>M](1(μλ+μ)K¯)M,
which then implies that the random variable N˜Ji has finite first and second moments.

Because |Xn|RN˜joinn+CK¯Bn a.s., for all n2, and |X1|RN˜join1+aR+CK¯B1 a.s., we can conclude that Xn also has finite first and second moments, and it is clear that, with probability one,

lim inft1t(X1+n=N˜A(τN˜(t)+1B)N˜A(t)R𝟙{Q˜iK˜N˜(t)+1}τN˜(t)+1BtCQ˜(u)du)=0.

For almost every sample path, there exists t* such that N˜(t)>1 for all tt*, and we have the following upper and lower bounds with probability one:

lim inft1n=1N˜(t)+1Bin=2N˜(t)Xnlim inft1tn=2N˜(t)Xnlim inft1n=2N˜(t)Bni=2N˜(t)Xn.

We show lim inft(1/t)n=2N˜(t)Xn=O a.s. by showing that, with probability one, both

lim inft1n=1N˜(t)+1Bnn=2N˜(t)Xn=O, and(28)
lim inft1n=2N˜(t)Bnn=2N˜(t)Xn=O.(29)

Note that we have

lim inft1n=1N˜(t)+1Bnn=2N˜(t)Xn=lim inftn=2N˜(t)Bnn=1N˜(t)+1Bn1n=2N˜(t)Bnn=2N˜(t)Xn=lim inftN˜(t)+1n=1N˜(t)+1Bn×n=2N˜(t)BnN˜(t)1×N˜(t)1N˜(t)+1×1n=2N˜(t)Bnn=2N˜(t)Xn.

We can also rewrite (29) as

lim infnN˜(t)1n=2N˜(t)Bn1N˜(t)1n=2N˜(t)(XnBnO)=0.

Note that limtN˜(t)= and limtn=2N˜(t)Bn= a.s., which, in turn, imply that a.s. we have

lim inftN˜(t)+1n=1N˜(t)+1Bn=lim infkkn=1kBn=lim inftN˜(t)1n=2N˜(t)Bn and limtN˜(t)1N˜(t)+1=limkk1k+1=1.

Then, in order to establish (28) and (29), it is sufficient to show that, with probability one,

lim infk1k1n=2k(XnBnO)=0, and(30)
0<lim infkkn=1kBnlim supkkn=1kBn<.(31)

We prove (30) by using the strong law of large numbers for martingales (Csörgő 1968, theorem 1). Let Mk=n=2k(XnBnO) for k2,M1=0. Clearly, E[|Mk|]< for all k. Also,

E[Mk+1Mk|Fk˜]=E[Xk+1Bk+1O|Fk˜]=E[Xk+1Bk+1O|K˜k]=𝟙{K˜k+1=K¯}E[Y1K¯B1K¯O]+𝟙{K˜k+1=K¯1}E[Y1K¯1B1K¯1O]=0.(32)

The second equality follows because the distribution of (Xn,Bn) conditioned on F˜n1 is the same as the distribution of (Xn,Bn) conditioned on the filtration generated by K˜n for all n2. Therefore, we have shown that Mk is a martingale with respect to filtration {F˜k}k1 with martingale difference sequence XkBkO for k2.

Next, we show that k=2k2E[(XkBkO)2] is finite. For k2, we have

E[(XkBkO)2]=E[(i=N˜A(τkB)N˜A(τk+1B)1R𝟙{Q˜iK˜k}τkBτk+1BCQ˜(u)duBnO)2]E[(i=N˜A(τkB)N˜A(τk+1B)1R𝟙{Q˜iK˜k})2+(τkBτk+1BCQ˜(u)du+BnO)2]E[R2(N˜joink)2+(Bk)2(O+CK¯)2],
where we recall that N˜joink denotes the customers joining the queue during the kth busy cycle and Bk=τk+1BτkB is the duration of the kth busy cycle. When k2, both N˜joink and Bk have finite second moments that do not depend on k so that k=2k2E[(XkBkO)2]<. Therefore, by the strong law of large numbers for martingales (Csörgő 1968, theorem 1), (30) holds.

Next, we prove (31). Consider a dispatcher that uses the static threshold policy K¯, which is coupled with the dispatcher described in Proposition 11, and also has initial queue length a. The duration of the nth busy cycles of this dispatcher is denoted B˜nK¯. The random variables B˜nK¯s are i.i.d. for all n2. Although having a different distribution, B˜1K¯ is independent of B˜nK¯ for all n2.

Using Proposition 2, observe that, on any sample path, when the dispatcher that uses the static threshold K¯ has experienced k busy periods, the dispatcher described in Proposition 11 has experienced more than k busy periods. Thus, we can conclude that, with probability one,

n=1kB˜iK¯n=1kBk,
for all k. Moreover, because BnK¯s have finite first moments (Takagi and Tarabia 2009) and are nonnegative, they are finite a.s. Therefore, limk k/n=1kB˜nK¯=1/E[B2K¯] exists a.s. and is strictly positive. Therefore, with probability one, we have
lim infkkn=1kBnlimkkn=1kB˜nK¯=1E[B2K¯]>0.

Similarly, comparing with the dispatcher using static threshold policy K¯1 that is coupled with the genie-aided dispatcher described in Proposition 11, with probability one, we have

lim supkkn=1kBnlimkkn=1kB˜nK¯1=1E[B2K¯1]<.

The last two results imply (31). Then, (31) and (30) prove the desired result. □

Remark 6.

When there exists a unique optimal threshold policy, the definition of regret is straightforward and without any ambiguity. However, in the case in which there are multiple optimal threshold policies, we need to define the regret with respect to one of the optimal policies. Proposition 11 shows that the alternating genie-aided system is asymptotically optimal for almost all sample paths in the sense that it achieves the same long-term average profit as the system that uses either static threshold K¯ or K¯1 starting from the beginning. The total net profit achieved by this alternating genie-aided system up to time T is not necessarily equal to the total net profit achieved by the genie-aided system using static threshold K¯ or K¯1. These three policies (including the two static policies) do not necessarily achieve the same net profit up to time T on given sample paths of the arrival and service processes. Note that, by Proposition 2, the net profit process of the alternating genie-aided system during any busy cycle is either the same as the gain of one of the systems using static thresholds K¯ and K¯1 or the net profit during the busy cycle is no smaller than the gain in the system using the static threshold K¯: consider the case that the alternating system switches from using threshold K¯1 to K¯ and the queue length hits K¯ during the current busy cycle. This is the only case in which the behavior of the alternating genie-aided system may be different from the two systems using a static threshold. However, during the time between the switch and the time that the queue length of the alternating system hits K¯ in the current busy cycle, the queue length of the system using threshold K¯ is greater than or equal to the queue length of the alternating system. Moreover, the number of customers being served is the same for these two systems (in the current busy cycle). A similar but opposite comparison can be made with the system using static threshold K¯1. In fact, the total net profit achieved (as a function of time) by the two systems using the static thresholds K¯ and K¯1, respectively, are not necessarily equal on given sample paths of the arrival and service processes either. We expect that the difference between the net profit of pairs of such systems obeys a central limit theorem behavior (including a functional form of the central limit theorem) when appropriately normalized and scaled (in time).

Take as a concrete example the situation in which K¯=1 and K¯1=0 are both optimal thresholds and assume that the initial queue length is zero for both systems. Using the inequalities in (3), we get that these two optimal thresholds only occur when C/μ=R. The system that uses the static threshold zero does not admit any customers into the system and clearly achieves a total net profit equal to zero for any time T. The system that uses the static threshold one admits a customer in the queue if and only if the system is empty when this customer arrives. The busy periods of this system using the static threshold one are exactly the periods when a single customer is served, and the expected net profit during any busy period of this system is RC/μ=0. However, this does not imply that the total net profit up to time T of the system using threshold one is zero. In fact, the difference of the total net profit between these two systems over the busy periods of the system using threshold one is a sum of mean-zero random variables (with each random variable being RC×S, where SEXP(μ) is the service time of the customer in service), which, intuitively, leads to the claimed central limit theorem behavior. Furthermore, by the (finite-time) law of the iterated logarithm (Balsubramani 2014), along (almost all) sample paths, the difference of the total net profit of the two systems may grow at most as O(T ln(ln(T))) (with high probability).

For this example, we can also carry out an explicit analysis of E[G(t)], the expected total net profit up to any time t of the system using static threshold one. With the assumption that the initial queue length is zero, it is easier to consider the busy cycle as the idle period together with the consecutive busy period. Let (Yn1,Bn1) denote the total net profit and the duration of the nth busy cycle of the dispatcher that uses threshold one. As mentioned in the previous paragraph, E[Yn1]=0 for all n. The random variables Bn1 are i.i.d. and have the same distribution as A + S, where A is an EXP(λ) random variable and S is an EXP(μ) random variable independent of A. Let N(t) denote the number of completed busy cycles until time t, n(t)=E[N(t)] denote the expected number of completed busy cycles up to time t, σs(t) denote the residual service time of the current busy cycle at time t, and τt=n=1N(t)+1Bn1 denote the end time of the current busy cycle. Recalling that the reward R is given to the dispatcher at each service completion, we have

E[G(t)]=E[G(τt)]R+CE[σs(t)].

Note that n(t) is the renewal function of the associated (alternating) renewal process with renewal interval distributed the same as A + S. By standard renewal theory arguments, n(t) is finite for all t, and N(t)+1 is a stopping time of the sequence (Yn1,Bn1). Applying Wald’s equality, we get

E[G(τt)]=E[i=1N(t)+1Yi1]=E[N(t)+1]E[Y11]=0.

Note that the distribution of σs(t) follows EXP(μ): if at time t the busy period has not started yet, clearly the residual service time is an EXP(μ) random variable. If there is a customer being served at time t, the busy cycle ends at the completion of this service. Using the memoryless property of exponential random variable, the residual service time is again an EXP(μ) random variable. Then, using E[G(τt)]=0, we get

E[G(t)]=E[G(τt)]R+CE[σs(t)]=0R+C/μ=0.

Despite admitting a customer when the queue is empty, the expected net profit at any time is exactly zero for the dispatcher using static threshold one when both K¯=1 and K¯1=0 are optimal thresholds. We expect that a similar but more complicated computation using renewal theory (as the memoryless argument no longer holds for the busy period, which is now a phase-type distribution, plus we need to determine the remaining workload to be served) can be carried out for systems using threshold K¯>1 and K¯1>0, when both are optimal thresholds. We expect that, as t, the expected total net profit of the two systems using static thresholds differ by at most a constant, and so is the difference of the expected total net profit of the alternating system and the two systems using a static threshold. These questions are outside the scope of the paper and are left for future research.

5.3. Regret Analysis with Respect to the Alternating Genie-Aided Dispatcher

In Proposition 11, we prove that the alternating genie-aided dispatcher described in Section 5.2 that uses K¯ and K¯1 in favor of the learning algorithm is optimal for (1). Next, we bound the regret of the learning dispatcher when compared with this genie-aided dispatcher.

Recall from Section 5.2 that K˜i denotes the threshold used by the alternating genie-aided dispatcher at the arrival of the ith arriving customer.

Following (12), we have

G(t)(R+Cλ)E[i=1NA(t)|𝟙{Q˜i<K˜i}𝟙{Qi<Ki}|+|Q˜iQi|].

Similar to the earlier analysis, assuming that both systems start with the same initial queue length, we use G˜1j to denote the expected regret accumulated during the (potential) phase 1 and the first time the queue is emptied in the consecutive phase 2 for the jth batch. Again, we use G˜2j to denote the expected regret accumulated in the remainder of (the phase 2 of the) jth batch.

Set E˜2j{K(j)=K¯}{K(j)=K¯1}. We reuse the events E1j and E3j that were first introduced in Section 4. Recall that E1j denotes the event that phase 1 of the jth batch happens, and E3j={Qnj=Q˜nj} denotes the event that at the beginning of the jth phase 2 of the learning system, the queue length of the two systems are the same.

Only under the event E1j is there a regret contribution to G˜1j (because, otherwise, phase 1 of the jth batch is omitted, and the queue length at the beginning of phase 2 is zero). Under the event (E1j)cE˜2jE3j, there is no regret contribution to G˜2j: indeed, for this batch of customers, E˜2j ensures the learned threshold is either K¯ or K¯1. The event (E1j)c ensures that phase 1 is omitted, so the queue length at the beginning of this phase 2 of the learning system is zero. Moreover, E3j ensures that the queue length of the alternating genie-aided system is also zero at this time, which means that the arrival of the first customer of this phase 2 initiates a busy cycle for both systems. In this case, the alternating genie-aided system picks the same threshold used as the learning system for all the busy cycles in this phase 2. Both systems make the same choices of admitting each arrival in this phase 2, and the queue-length processes of the two systems also coincide for the entire phase 2. Under the event E1jE˜2jE3j, although phase 1 happens, Proposition 2 tells us that the queue length of the learning system at the end of phase 1 is no smaller than the queue length of the genie-aided system. The event E˜2j ensures that the threshold used by the learning system during the entire phase 2 is no smaller than the threshold used by the genie-aided system (because the genie-aided system would be either using the same threshold as the learning system when a busy cycle is initiated by a customer who arrives during phase 2 or using threshold K¯1 when a busy cycle is initiated by a customer who arrives during phase 1) when the queue length of the learning system hits zero for the first time after phase 1, the queue length of the genie-aided system also hits zero. The next proposition gives a bound that holds in the current setting for the probability of (E˜2jE3j)c.

Proposition 12.

Fix jeK¯. In the case that V(K¯,μ,λ)=R/C, we have the following:

P[(E˜2jE3j)c]C˜1 exp(C˜2 ln1+ϵ(j))+C˜1 exp(C˜2 ln1+ϵ(j1))+C˜3 exp(C˜4βj)+C˜3 exp(C˜4βj1)+(cK¯)αj1l2.

C˜1,C˜2,C˜3, and C˜4 are defined in (23) and (24), and

cK¯1(μλ+μ)K¯(0,1).

The proof for both cases K¯>1 and K¯=1 follows the same logic as in the case K¯>0 in Proposition 8.

Because we are using l1, K*(j), and K¯ to bound the queue length in the proof of Lemmas 1 and 2, these two lemmas still hold when the optimal threshold is not unique. It should be now clear that Theorems 1 and 2 also hold when equality holds in (3).

6. Simulation-Based Numerical Results

In this section, we demonstrate the performance of our proposed Algorithm 1 using simulations. To compute the regret, we compare our algorithm to the genie-aided system that has the knowledge of the arrival and service rates and uses the optimal strategy proposed by Naor (1969). For the simulations, we set the initial queue length to be zero for both the genie-aided and learning systems. For all numerical experiments, unless specified otherwise, we use the following set of parameters: l2=10,C=R=1, E[Bj]=ln(j)/j,αj=j, where recall that l2 is the minimum length of phase 2, C is the cost per unit time, R is the reward granted to the dispatcher when each service completes, Bj is the random variable that controls the probability of having phase 1 when the threshold used in the previous phase 2 is zero, and αj is the rate at which the minimum length of phase 2 increases. Note that, unless specified otherwise, we use ϵ = 1 in E[Bj]=lnϵ(j)/j. We vary μ and λ for different experiments and explore zero and nonzero optimal threshold cases as well as the cases in which the optimal threshold is unique and when it is not unique. To show the pattern of the regret within a reasonable number of arriving customers, when the largest optimal threshold is zero, we use l1=1, and when the largest optimal threshold is positive, we use l1=3, where l1 is the length of phase 1 (when used), and stays unchanged for all batches. Our theoretical analysis holds for arbitrary choices of the constants l11. However, when l1 is large and the service rate is small, it takes a long time for the queue to empty during phase 2 and, therefore, requires more arrivals to show the correct asymptotic behavior of the regret.

The finite-time performance of the simulated results agrees qualitatively with our upper bound: when an optimal strategy is to use threshold zero, the learning system achieves an expected regret that grows in a sublinear manner, and when all optimal strategies use a nonzero threshold, the learning system achieves an O(1) expected regret.

6.1. Expected Regret with Nonzero Optimal Thresholds

Figure 1(a) shows the variation of the (expected) regret with respect to the number of arrivals for μ = 6 and μ=6.5 when l1=3 and λ = 1. The regret is averaged over 1,000 simulations, and there are more than 2*105 customer arrivals to the system. The optimal threshold is unique, and the genie-aided dispatcher uses the threshold K¯=5 in both cases that are plotted in Figure 1(a). The initial upper bound is K*(1)=l1, which is smaller than the optimal threshold but increases slowly so that eventually K¯<K*(j) for large j. As shown in the analysis and the numerical experiments, the regret is O(1). Figure 1(b) shows the regret plot with respect to the number of arrivals for μ = 2, λ = 1, and R = 129/32 with l1=3. The regret is averaged over 2,000 simulations, and there are more than 2*105 customer arrivals to the system. In this case, the optimal threshold is not unique: both K¯1=4 and K¯=5 are optimal thresholds. The alternating genie-aided algorithm uses the policy that is described in Proposition 11 and only changes the threshold used between busy cycles. Similarly, as in Figure 1(a), the learning algorithm is not able to use K¯ in the first few batches because of the truncation. The plots indicate that constant regret is accumulated, which is consistent with our analytical results; interestingly, in all cases, convergence to the constant regret value happens rapidly.

Figure 1. Regret of the Learning System When All Optimal Thresholds Are Positive
Notes. We set C = 1, E[Bj]=ln(j)/j,K*(j)ln(j), and αj=j. (a) λ = 1, R = 1, and the optimal threshold is K¯=5. (b) λ = 1, R=12932, and the optimal thresholds {4, 5} (K¯=5).

6.2. Expected Regret with Zero Being an Optimal Threshold

Figure 2(a) shows how the regret changes with respect to the number of arrivals for μ=0.8 and μ=0.9 when l1=1 and λ = 1. The regret is averaged over 2,000 simulations, and there are more than 105 customers arrived in the system. In both cases shown in Figure 2(a), the genie-aided dispatcher uses threshold K¯=0. Figure 2(b) shows the regret plot with respect to the number of customers for μ = 1 and λ = 1 when l1=3. The regret is averaged over 2,000 simulations, and there are more than 2*105 customers arrived in the system. In this case, the optimal threshold is not unique: both K¯1=0 and K¯=1 are optimal thresholds. The alternating genie-aided dispatcher uses the policy that is described in Proposition 11 and only changes the threshold between busy cycles. The plots indicate that sublinear regret is accumulated in all cases. Here, when the learning dispatcher uses threshold zero in phase 2 of a given batch, the existence of the forced exploration phase in the next batch results in regret being accumulated. Note that, for all plots shown in Figure 2, the optimal thresholds can be used by the learning dispatcher in phase 2 right from the first batch.

Figure 2. Regret of the Learning System When an Optimal Threshold Is Zero
Notes. We set C=R=1,E[Bj]=ln(j)/j,K*(j)ln(j) and αj=j. (a) λ = 1, and the optimal threshold is K¯=0. (b) λ = 1, and the optimal thresholds are {0, 1}; K¯=1.

6.3. Expected Regret with Different Choices of K*(j)

We introduce truncation with the parameter K*(j) in our analysis because we need a bound on the worst case queue length for the learning system. We obtained a particular order of the regret with the choice of K*(j)=max{ln(j),0}+l1+Q0. Next, we explore the impact of different choices of K*(j) in Figure 3. We use ∼ to indicate the order at which K*(j) increases: specifically, K*(j)f(j) means K*(j)=max{f(j),0}+l1+Q0. The regret values are averaged over 2,000 simulations, and there are more than 3*105 arrival customers that arrive in more than 700 batches. In Figure 3, we use μ = 3, λ=3.5, and R = 21. The optimal threshold is K¯=8. The M/M/1 queue with μ = 3 and λ=3.5 is not stable. Despite this, Figure 3(b) suggests that constant regret is achieved for various truncation choices. However, when no truncation is enforced, the regret accumulated seems to grow linearly with respect to the number of arrivals; see Figure 3(a). This suggests that the truncation helps to ensure a lower regret, yet one may use a K*(j) that grows faster than ln(j). Confirming this through analysis is a topic to explore in future research.

Figure 3. Regret of the Learning System When μ = 3, λ=3.5, R = 21, and the Optimal Threshold Is Eight Using and Not Using the Truncation for the Threshold Used in Phase 2
Notes. We set C=1,E[Bj]=ln(j)/j and αj=j. (a) With the no-truncation option included. (b) Excluding the no-truncation option.

6.4. Expected Regret with Different Choices of αj

We introduce αjl2 to be the minimum length of phase 2 for the jth batch. Figure 4 plots the average regret accumulated with different choices of αj’s. In particular, Figure 4(a) is the log versus log-log plot of the regret accumulated when μ=0.8, λ = 1 with more than 2*105 arrival customers, and Figure 4(b) plots the regret accumulated when μ = 3, λ=3.5 with more than 10*105 arrival customers. We use αjf(j) to denote αj=max{f(j),1}. The regret is averaged over 2,000 simulations in both plots. Figure 4 suggests that, for all these choices of αj, a sublinear regret is accumulated, and having an αj that grows slower may still be able to achieve the regret bounds proved for αj=j.

Figure 4. Regret Accumulated for Different Choices of αj
Notes. We set C=1,E[Bj]=ln(j)/j and K*(j)ln(j). (a) Log versus log-log regret plot on regret accumulated when μ=0.8, λ = 1, and R = 1. Optimal threshold is K¯=0. (b) Regret accumulated when μ = 3, λ=3.5, and R = 21. Optimal threshold is K¯=8.

6.5. Expected Regret with Different Choices of E[Bj]

We also examine difference choices of E[Bj], which controls the probability of having a phase 1 when the threshold used in the previous phase 2 is zero. Figure 5 shows the plots of various choices of E[Bj]. From these finite-time experiments, it seems that having a high enough chance to explore during the first few batches the learning dispatcher observes helps to reduce the regret accumulated. However, comparing the plots of E[Bj]=ln4(j)/j2 and E[Bj]=ln(j)/j in Figure 5(a), it seems that only having a high probability of exploration for the first few batches is not enough to achieve O(1) regret because the slope of the plot for E[Bj]=ln(j)/j decreases a lot faster than the plot of E[Bj]=ln4(j)/j2. Although all the choices of E[Bj] seem to achieve sublinear regret for the case K¯=0, always having the exploration phase when the threshold used in the previous phase 2 is zero accumulates a higher regret with a different scaling behavior.

Figure 5. Regret Accumulated When the Choices of E[Bj] Vary
Notes. We set C=R=1,K*(j)ln(j) and αj=j. (a) Average regret plot when μ=1.3, λ = 1. The optimal threshold is K¯=1. (b) Log versus log-log regret plot when μ=0.8, λ = 1. The optimal threshold is K¯=0.

6.6. Expected Regret with Different Values of μ and λ

Figure 6 plots the average regret accumulated when seeing more than 3*105 arriving customers when fixing one of the pair of arrival and service rates and varying the other. The regret values are averaged over 600 simulations. From the plot, we observe that, when the arrival rate is fixed, as the service rate increases, in general, the regret decreases. However, the decrease is not strict and instead is nonmonotonic, and the large cusps are usually around the parameter choices that have nonunique optimal thresholds. When the service rate is fixed, as the arrival rate increases, the regret follows a similar increasing/decreasing trend.

Figure 6. Regret Plot for Various Arrival and Service Rates
Notes. We set C=R=1,E[Bj]=ln(j)/j,K*(j)ln(j), and αj=j. (a) Average regret plot versus various λ’s when μ = 6. (b) Average regret plot versus various μ’s when λ = 1.

6.7. Comparison with Benchmark Algorithms

We also compare the finite time performance of our proposed Algorithm 1 with a few benchmark algorithms. In Figures 7 and 8, we compared Algorithm 1 with the estimate-then-optimize (ETO) and UCB algorithms when there are more than 3*105 arrival customers and the regrets are averaged over 2,000 simulations. We use ETO(M) to denote the ETO algorithm that always accepts the first M customers. We use the UCB algorithm described in Lattimore and Szepesvári (2020, section 7.1) but with UCB bias subtracted from the estimated average service time. Figure 7(a) plots the log of average regret for the case when μ=0.8, λ = 1 and the optimal threshold is zero. Figure 7(b) plots the log of average regret for the case when μ = 3, λ=3.5, and the optimal threshold is eight. For the parameters used in these two plots, the optimal threshold is unique. Figure 8(a) plots the average regret for the case when μ = 1, λ = 1, and the optimal thresholds are {1, 0}. Figure 8(b) plots the average regret for the case when μ = 2, λ = 1, and the optimal thresholds are {5, 4}. For the parameter choices in Figure 8, the optimal threshold is not unique. The regret values in these two plots are computed with respect to the alternating genie-aided system that would change the threshold used between {K¯,K¯1} according to the threshold used by Algorithm 1, ETO, or UCB.

Figure 7. Log of Regret Accumulated When Using Different Algorithms When the Optimal Threshold Is Unique
Notes. Alg1 is the learning algorithm proposed in Algorithm 1. We set C=1,E[Bj]=ln(j)/j,K*(j)ln(j), and αj=j. ETO(M) is the estimate-then-optimize algorithm that always accepts the first M customers. UCB is the upper confidence bound algorithm. (a) Log average regret plot when μ=0.8, λ = 1, R = 1, and K¯=0. (b) Log average regret plot when μ = 3, λ=3.5, R = 21, and K¯=8.
Figure 8. Log of Regret Accumulated When Using Different Algorithms When the Optimal Thresholds Are Not Unique
Notes. Alg1 is the learning algorithm proposed in Algorithm 1. We set C = 1, E[Bj]=ln(j)/j,K*(j)ln(j), and αj=j. ETO(M) is the estimate-then-optimize algorithm that always accepts the first M customers. UCB is the upper confidence bound algorithm. (a) Log averaged regret plot when μ = 1 and λ = 1. Both K¯=1 and K¯1=0 are optimal thresholds. (b) Log of average regret plot when μ = 2, λ = 1, and R = 129/32. Both K¯=5 and K¯1=4 are optimal thresholds.

The order of the regret accumulated by Algorithm 1 and UCB are similar in Figures 7(b) and 8(b). However, in Figures 7(a) and 8(a) in which zero is an optimal threshold, UCB achieves constant regret, yet Algorithm 1 achieves a sublinear regret. It is likely that the regret accumulated by Algorithm 1 would slowly increase as the number of arrivals increases and eventually becomes larger than the regret of the UCB algorithm. Our algorithm may choose to use threshold zero, and then a phase 1 may be enforced, and regret accumulates because of this. In Figure 9, we compare the finite time performance of our proposed algorithm with UCB when μ=1.1 and λ = 1 with 2,000 simulations and more than 106 arrival customers. In this case, one is the unique optimal threshold. As we can observe from Figure 9, the regret of UCB increases in a (approximately) linear fashion, whereas our proposed algorithm is able to achieve constant regret. In fact, we can argue the following for UCB-based dispatching (under the simpler setting of the arrival rate being known):

  1. When the optimal threshold(s) is positive, then some bad initial service time samples can result in the estimated threshold being zero. This bad event happens with positive probability for all μ>CR (the probability decreases to zero as μ). Whenever this bad event occurs, then the UCB-based dispatching algorithm stops dispatching customers, obtains no new service time samples, and incurs linear regret.

  2. When zero is an optimal threshold, then the corresponding bad event of estimating the threshold as positive is more benign. This holds as dispatching more customers only results in more service-time samples, which then help to correct inaccurate estimates. Hence, we expect to achieve a constant or slowly growing (sublinear) regret.

Figure 9. Regret Accumulated When μ=1.1, λ = 1, C=R=1, and K¯=1
Notes. Alg1 is the learning algorithm proposed in Algorithm 1. We set l1=l2=30,Bj=ln(j)/j,K*(j)ln(j) and αj=j. UCB is the upper confidence bound algorithm.

Note that this explanation supports the conjecture in Remark 5 because the worst case (over parameters) regret of UCB is expected to be linear in N. Moreover, because UCB needs to compute the estimated threshold at every arrival, it requires more computation when compared with Algorithm 1.

6.8. Comparison of Different Genie-Aided Algorithms

Figure 10 compares the accumulated net gain between the alternating genie-aided algorithm (“AG algo” in the legend) coupled with Algorithm 1 and the genie-aided algorithms using threshold K¯ (“ThreshK algo” in the legend) or K¯1 (“ThreshK-1 algo” in the legend) when optimal thresholds are not unique; the accumulated net gain of the genie-aided algorithm using threshold K¯1 are scaled to be zero. Figure 10 plots the difference between the net gain obtained by the alternating genie-aided system and the genie-aided system using static threshold K¯1 and the difference of the net gain between two genie-aided systems using static threshold K¯ and K¯1 over two sets of parameters. We also include the regret accumulated by the learning algorithm compared with the genie-aided algorithm using threshold K − 1. The performances of the algorithms are averaged over 18,000 simulations. As we can observe from the plots, the regret accumulated by the learning algorithm (with respect to either the alternating genie-aided system or the genie-aided system using threshold K − 1) dominates the performance difference between the alternating genie-aided system and the genie-aided system using threshold K − 1, and the performing difference between the genie-aided system using threshold K and the genie-aided system using threshold K − 1. This is more evidence in favor of Remark 6.

Figure 10. Performance Difference Between the Alternating Genie, the Genie Algorithm Using Threshold K¯, and the Genie Algorithm Using Threshold K¯1
Notes. The accumulated net gain of the genie algorithm using threshold K¯1 is scaled to be zero. (a) μ=λ=C=R=1. Both K¯=1 and K¯1=0 are optimal thresholds. (b) μ = 2, λ = 1, and R = 129/32. Both K¯=5 and K¯1=4 are optimal thresholds.

7. Conclusions

In this paper, we considered a social welfare–maximizing problem, which was first proposed and studied in Naor (1969). We studied the learning problem of finding the proper threshold admission policy when the service and arrival rates are unknown. We proposed a learning algorithm that consists of batches in which each batch has an optional exploration phase with a fixed length and an exploitation phase. When the optimal policy is unique, we showed that our learning algorithm achieves an O(1) regret whenever the optimal threshold is nonzero and achieves an O(ln1+ϵ(N)) regret when the optimal threshold is zero, where N denotes the total number of arrival customers to the systems. When the optimal policy is not unique, we specified a particular optimal policy to compare with and proved that similar regret bounds hold for our learning algorithm.

In our analysis, we assumed Poisson arrivals and exponentially distributed services with fixed arrival and service rate. We want to adapt our algorithm to more general arrival processes and service-time distributions such as the models in Lippman and Stidham (1977) and Johansen and Stidham (1980) so that a small regret is obtained in these more general settings too, such as generalization to optimal admission control in an M/G/1 queue with our information structure. This problem has received attention—see Oz (2022)—under a different information structure in which only the queue length is observed by arrivals. Under this setting, the analytical optimal strategy for this problem is still unknown and may be time-varying; see Oz (2022) for details. However, the problem may be tractable with our information structure as the Markov state—number in service and service time elapsed of customer currently being served—is observable and MDP theory could be applied. Another possible direction is to consider a single queue with a buffer but with multiple servers as in the model in Knudsen (1972). Again, the aim would be to adapt our current learning algorithm to this setting as well, achieving low regret. Finally, we conjectured that the order of the regret accumulated for the worst case choice of parameters would grow at least as Ω(ln(N)); see Remark 5. Proving (or disproving) this conjecture is yet another problem for future work.

Acknowledgments

The authors are grateful to the associate editor and two anonymous referees for valuable comments on an earlier version of the paper.

Endnotes

1 We show how to translate the regret from the number of arrivals to a time horizon.

2 We discuss what we mean by “optimal” in Remark 6 after we specify the strategy to which we compare our learning algorithm in the case that there are multiple optimal thresholds.

References

  • Adler S, Moharrami M, Subramanian V (2022) Learning a discrete set of optimal allocation rules in queueing systems with unknown service rates. Preprint, submitted February 4, https://arxiv.org/abs/2202.02419.Google Scholar
  • Agrawal S, Jia R (2022) Learning in structured MDPs with convex cost functions: Improved regret bounds for inventory management. Oper. Res. 70(3):1646–1664.LinkGoogle Scholar
  • Atar R, Castiel E, Shadmi Y (2022) Scheduling in the high uncertainty heavy traffic regime. Preprint, submitted April 12, https://arxiv.org/abs/2204.05733.Google Scholar
  • Balsubramani A (2014) Sharp finite-time iterated-logarithm martingale concentration. Preprint, submitted May 12, https://arxiv.org/abs/1405.2639.Google Scholar
  • Bertsekas D (2019) Reinforcement Learning and Optimal Control (Athena Scientific, Belmont, MA).Google Scholar
  • Buyukkoc C, Varaiya P, Walrand J (1985) The cμ rule revisited. Adv. Appl. Probab. 17(1):237–238.Google Scholar
  • Chen Y, Hasenbein JJ (2020) Knowledge, congestion, and economics: Parameter uncertainty in Naor’s model. Queueing Systems 96(1–2):83–99.Google Scholar
  • Chen X, Liu Y, Hong G (2023) An online learning approach to dynamic pricing and capacity sizing in service systems. Oper. Res., ePub ahead of print June 12, https://doi.org/10.1287/opre.2020.612.Google Scholar
  • Choudhury T, Joshi G, Wang W, Shakkottai S (2021) Job dispatching policies for queueing systems with unknown service rates. Proc. 22nd Internat. Sympos. Theory Algorithmic Foundations Protocol Design Mobile Networks Mobile Comput. (Association for Computing Machinery, New York), 181–190.Google Scholar
  • Cohen A (2019a) Asymptotic analysis of a multiclass queueing control problem under heavy traffic with model uncertainty. Stochastic Systems 9(4):359–391.LinkGoogle Scholar
  • Cohen A (2019b) Brownian control problems for a multiclass M/M/1 queueing problem with model uncertainty. Math. Oper. Res. 44(2):739–766.LinkGoogle Scholar
  • Cohen A, Saha S (2021) Asymptotic optimality of the generalized cμ rule under model uncertainty. Stochastic Processes Appl. 136:206–236.Google Scholar
  • Cox DR, Smith WL (1961) Queues. Methuen’s Monographs on Statistical Subjects, Methuen & Co., Ltd., London (John Wiley & Sons, Inc., New York).Google Scholar
  • Csörgő M (1968) On the strong law of large numbers and the central limit theorem for martingales. Trans. Amer. Math. Soc. 131:259–275.Google Scholar
  • Durrett R (2016) Essentials of Stochastic Processes, Springer Texts in Statistics (Springer, Cham, Switzerland).Google Scholar
  • Jia H, Shi C, Shen S (2022) Online learning and pricing for service systems with reusable resources. Oper. Res., ePub ahead of print November 10, https://doi.org/10.1287/opre.2022.2381.LinkGoogle Scholar
  • Johansen SG, Stidham S Jr (1980) Control of arrivals to a stochastic input-output system. Adv. Appl. Probab. 12(4):972–999.Google Scholar
  • Knudsen NC (1972) Individual and social optimization in a multiserver queue with a general cost-benefit structure. Econometrica 40:515–528.Google Scholar
  • Krishnasamy S, Arapostathis A, Johari R, Shakkottai S (2018a) On learning the cµ rule in single and parallel server networks. Preprint, submitted February 2, https://arxiv.org/abs/1802.06723.Google Scholar
  • Krishnasamy S, Sen R, Johari R, Shakkottai S (2021) Learning unknown service rates in queues: A multiarmed bandit approach. Oper. Res. 69(1):315–330.LinkGoogle Scholar
  • Krishnasamy S, Akhil PT, Arapostathis A, Sundaresan R, Shakkottai S (2018b) Augmenting max-weight with explicit learning for wireless scheduling with switching costs. IEEE/ACM Trans. Networking 26(6):2501–2514.Google Scholar
  • Lattimore T, Szepesvári C (2020) Bandit Algorithms (Cambridge University Press, Cambridge, UK).Google Scholar
  • Lippman SA, Stidham S Jr (1977) Individual vs. social optimization in exponential congestion systems. Oper. Res. 25(2):233–247.LinkGoogle Scholar
  • Naor P (1969) The regulation of queue size by levying tolls. Econometrica 37(1):15–24.Google Scholar
  • Neely MJ, Rager ST, La Porta TF (2012) Max-weight learning algorithms for scheduling in unknown environments. IEEE Trans. Automatic Control 57(5):1179–1191.Google Scholar
  • Oz B (2022) Optimal admission policy to an observable M/G/1 queue. Queueing Systems 100(3–4):477–479.Google Scholar
  • Shwartz A, Makowski AM (1986) An optimal adaptive scheme for two competing queues with constraints. Bensoussan FA, Lions JL, eds. Analysis and Optimization of Systems, vol. 83 (Springer, Berlin), 515–532.Google Scholar
  • Smith WE (1956) Various optimizers for single-stage production. Naval Res. Logist. Quart. 3:59–66.Google Scholar
  • Stahlbuhk T, Shrader B, Modiano E (2021) Learning algorithms for minimizing queue length regret. IEEE Trans. Inform. Theory 67(3):1759–1781.Google Scholar
  • Sutton RS, Barto AG (2018) Reinforcement Learning: An Introduction, 2nd ed., Adaptive Computation and Machine Learning (MIT Press, Cambridge, MA).Google Scholar
  • Takagi H, Tarabia AMK (2009) Explicit probability density function for the length of a busy period in an M/M/1/K queue. Yue W, Takahashi Y, Takagi H, eds. Advances in Queueing Theory and Network Applications (Springer, New York), 213–226.Google Scholar
  • Vershynin R (2018) High-Dimensional Probability, Cambridge Series in Statistical and Probabilistic Mathematics, vol. 47 (Cambridge University Press, Cambridge, UK).Google Scholar
  • Wainwright MJ (2019) High-Dimensional Statistics, Cambridge Series in Statistical and Probabilistic Mathematics, vol. 48 (Cambridge University Press, Cambridge, UK).Google Scholar
  • Walton N, Xu K (2021) Learning and information in stochastic networks and queues. Preprint, submitted May 18, https://arxiv.org/abs/2105.08769.Google Scholar
  • Yang Z, Srikant R, Ying L (2023) Learning while scheduling in multi-server systems with unknown statistics: MaxWeight with discounted UCB. Ruiz F, Dy J, van de Meent JW, eds. Proc. 26th Internat. Conf. Artificial Intelligence Statist., vol. 206 (PMLR, New York), 4275–4312.Google Scholar
  • Zhong Y, Birge JR, Ward A (2022) Learning the scheduling policy in time-varying multiclass many server queues with abandonment. Preprint, submitted May 9, https://dx.doi.org/10.2139/ssrn.4090021.Google Scholar