1 Introduction

A classical result for the steady-state queue-length distribution of single-class queueing systems is the following: The distribution of the queue length just before an arrival epoch equals the distribution of the queue length just after a departure epoch. The constraint for this result to be valid is that, with probability one, arrivals, and also service completions, occur individually, i.e., not in batches. The result then follows by a simple level-crossing argument: In steady state the event that a customer arrives to find j customers present occurs just as often as the event that a customer leaves j customers behind, for all \(j=0,1,\ldots \). See [7], pp. 154–156, for a formal statement and proof (due to P.J. Burke, unpublished) of this result.

At first sight this level-crossing argument breaks down in higher dimensions, for example, in the case of multiple customer classes. Indeed, with \({\varvec{x} }\ge {\varvec{0}}\) and \({\varvec{e}}_k\) being a unit vector with 1 in the kth coordinate and zero elsewhere, an m-dimensional process can leave state \({\varvec{x}}\) because of an arrival of a customer of type i, and enter that state from state \({\varvec{x}}+{\varvec{e}}_k\) because of a departure of a customer of another type k. However, we shall argue that it is easy to write down a more global balance equation for multidimensional queue length processes for a large class of queues and queueing networks—also when service times are not exponentially distributed, and even when arrivals may occur in batches. We shall explore that fact to obtain a simple relation between the steady-state joint queue-length distribution at arrival epochs (which under various circumstances is equal to the time average distribution) and at service completion epochs. Once one has a relation between the probability generating function (PGF) at arbitrary epochs and at service completion epochs, one can find the former when one has the latter. The latter results are indeed known in an M / G / 1 setting, where it is natural to look at departure epochs. This will yield both new results (for multiclass queueing models with fixed priorities and for the longer-queue model), as well as new and simple derivations of known results, for example, polling models.

The research for the present paper was initially motivated by the desire to provide an intuitive explanation of a result in [4] regarding the steady-state joint queue-length distribution in a large class of polling models. That distribution turned out to have a remarkably simple relation with a weighted sum of the joint queue length distributions at departure epochs of customers from each of the queues. In Sect. 2 we provide such an explanation. Although balance equations are intuitively appealing, their mathematical verification may require a large amount of work. This motivates us to derive distributional relationships for queue lengths in a unified way using a general tool. The so-called rate conservation law is such a tool as demonstrated in [14] (see also [1, 15]). This method is applicable to a general model, but requires Palm distributions, which may not be easy to understand. In Sect. 3 of this paper we take another approach, based on a time evolution of a sample path. This approach is parallel to the rate conservation law, but does not require Palm distributions, which are replaced by sample averages. We apply it to a general model and derive a distributional relationship among different embedded epochs. In Sect. 4 a nonstationary version of the distributional relationship is derived with some error term, which vanishes as time goes to infinity. Our main result, viz. Theorem 1, as well as the nonstationary results, is novel to the best of our knowledge.

Literature review Hébuterne [11] provides a generalization of the above-mentioned classical result of Burke in two directions: He allows (i) batch arrivals, with batches of random size, and (ii) batch services, with batches of fixed size. He also points out that emptying the queue up to N customers is beyond the scope of the analysis, because then the batch sizes are not independent of the system state. Fakinos [9] manages to treat a quite general group-arrival group-departure queue. He treats the batch size problem by assuming that customers within a departing group are randomly ordered, and that they leave the system according to their order. Papaconstantinou and Bertsimas [16] generalize Burke’s result to the multiserver \(E_k/G/s\) queue. Kim [13] combines the features of batch arrivals, batch services and multiple servers, also allowing multiple customer classes. He does not explicitly address the issue of customers in a departing group being randomly ordered. Hébuterne and Rosenberg [12] focus on the G / G / 1 queue with batch services and finite capacity. Takine has obtained several relations between queue lengths at random instants and at departure instants; see in particular the very general Theorem 1 in [19], for a single server queue with multiple Markovian arrival streams—an extension of Markovian arrival processes to (possibly correlated) multiple arrival streams.

Organization of the paper Section 2 provides a short proof of a result in [4] by using a multidimensional queue-length balance argument. Section 3 derives the distributional relationship for an open queueing network under a very general setting in Theorem 1. Extensions to the nonstationary case are discussed in Sect. 4. Some applications are presented in Sect. 5. Section 6 contains concluding remarks.

2 A balance equation for a class of polling models

In this section we provide a simple relation between the steady-state joint queue-length distribution at arbitrary epochs and at departure epochs for polling models. This relation, which is derived by introducing a multidimensional queue-length balance argument, is used to provide a short, but somewhat intuitive, derivation of Theorem 1 of [4]. In the next section we shall extend that balance equation in a very general setting and give a rigorous derivation. Let us first describe the polling model studied in [4].

Consider a system of \(m\ge 1\) infinite-buffer queues \(Q_1,\ldots , Q_m\) and a single server S. Queues are indexed by \(J=\{1,2,\ldots ,m\}\). The service times of customers in \(Q_i\) are i.i.d. (independent, identically distributed) positive random variables generically denoted by \(B_i\), with means \(b_i:=\mathbb {E}B_i\). Denote the Laplace–Stieltjes transform (LST) of \(B_i\) by \(\tilde{B}_i(\cdot )\). The server moves among the queues in a cyclic order. When S moves from \(Q_i\) to \(Q_{i+1}\), it incurs a switchover period. The durations of successive switchover times are i.i.d. nonnegative random variables, which we generically denote by \(S_i\). Denote the LST of \(S_i\) by \(\tilde{S}_i(\cdot )\) and assume that \(s_i:=\mathbb {E}S_i<\infty \); let \(s:=\sum _{i=1}^m s_i\). Customers arrive at \(Q_i\) according to a Poisson process with rate \(\lambda _i\); let \(\lambda :=\sum _{i=1}^m\lambda _i\). We do not assume anything about the service disciplines at \(Q_i\). Define \(\rho _i:=\lambda _i b_i\) as the traffic intensity at \(Q_i\); let \(\rho :=\sum _{i=1}^m\rho _i\). We assume that \(\rho < 1\), which is a necessary condition for the system to be stable. In what follows we shall write \(\varvec{z}\) for an m-dimensional vector in \(\mathbb {R}^m\), \(\varvec{z}=(z_1,\ldots ,z_m)\), and we assume that \(|z_i| \le 1\) for every \(i \in J\). We implicitly use the convention that any index summation is modulo m, for example, \(Q_{m+1}\equiv Q_1\).

Assume that all the usual independence assumptions hold between the service times, the switchover times and the interarrival times. We assume that the ergodicity conditions are fulfilled and we restrict ourselves to results for the stationary situation.

Now introduce the PGF of various joint queue-length distributions: \(V^b_i(\varvec{z})\) and \(V^c_i(\varvec{z})\) denote the PGFs of the joint queue-length distribution at visit beginnings and visit completions at \(Q_i\), while \(S^b_i(\varvec{z})\) and \(S^c_i(\varvec{z})\) denote the PGFs of the joint queue-length distribution at service beginnings and service completions at \(Q_i\); \(L(\varvec{z})\) denotes the PGF of the joint queue-length distribution at an arbitrary time in steady state. Theorem 1 of [4] states that, with mean cycle time \(\mathbb {E}C = \frac{s}{1-\rho }\):

$$\begin{aligned} L(\varvec{z})= \frac{1}{\mathbb {E}C}\sum _{i=1}^m\left( \frac{V^b_i(\varvec{z})-V^c_i(\varvec{z})}{\Sigma (\varvec{z})} \frac{z_i\left( 1-\tilde{B}_i(\Sigma (\varvec{z}))\right) }{z_i-\tilde{B}_i(\Sigma (\varvec{z}))} + \frac{V^c_i(\varvec{z})-V^b_{i+1}(\varvec{z})}{\Sigma (\varvec{z})} \right) , \end{aligned}$$
(1)

with \(\Sigma (\varvec{z}):=\sum _{j=1}^m \lambda _j(1-z_j)\).

Its proof in [4] is based on the following relations:

  1. (i)

    a balance relation for polling systems, which is due to Eisenberg [8] and which was generalized in [3]:

    $$\begin{aligned} \gamma _i V^b_i(\varvec{z})+S^c_i(\varvec{z})= S^b_i(\varvec{z})+\gamma _i V^c_i(\varvec{z}), \quad i \in J. \end{aligned}$$
    (2)

    Here \(\gamma _i:=1/\lambda _i\mathbb {E}C\) represents the reciprocal of the mean number of customers served at \(Q_i\) per visit, i.e., the long-term ratio of visit beginnings to service beginnings.

  2. (ii)

    an obvious relation between queue lengths at the beginning and end of a service time:

    $$\begin{aligned} S^c_i(\varvec{z})=S^b_i(\varvec{z})\frac{\tilde{B}_i(\Sigma (\varvec{z}))}{z_i}, \quad i \in J. \end{aligned}$$
    (3)
  3. (iii)

    an obvious relation between queue lengths at the beginning and end of a switchover time:

    $$\begin{aligned} V^b_{i+1}(\varvec{z})=V^c_i(\varvec{z})\tilde{S}_i\left( \Sigma (\varvec{z})\right) , \quad i \in J. \end{aligned}$$
    (4)
  4. (iv)

    a stochastic mean value theorem, expressing \(L(\varvec{z})\) as an average over the PGFs of the joint queue-length distribution at an arbitrary moment during a visit to \(Q_i\) (\(X_i(\varvec{z})\)) and during a switchover period between \(Q_i\) and \(Q_{i+1}\) (\(Y_i(\varvec{z})\)):

    $$\begin{aligned} L(\varvec{z})=\frac{1}{\mathbb {E}C}\sum _{i=1}^m\left( \frac{b_i}{\gamma _i} X_i(\varvec{z}) + s_iY_i(\varvec{z}) \right) , \end{aligned}$$
    (5)

    where, for \(i \in J\),

    $$\begin{aligned}&X_i(\varvec{z})=S^b_i(\varvec{z}) \tilde{B}_i^{\text {past}}(\Sigma (\varvec{z})), \end{aligned}$$
    (6)
    $$\begin{aligned}&Y_i(\varvec{z})=V^c_i(\varvec{z}) \tilde{S}_i^{\text {past}}(\Sigma (\varvec{z})), \end{aligned}$$
    (7)

    where \(\tilde{B}_i^{\text {past}}(\cdot )\) and \(\tilde{S}_i^{\text {past}}(\cdot )\) are the LST’s of the past (elapsed) parts of \(B_i\) and \(S_i\), respectively, that is, they are defined as

    $$\begin{aligned} \tilde{B}_i^{\text {past}}(\Sigma (\varvec{z})) = \frac{1 - \tilde{B}_i(\Sigma (\varvec{z}))}{b_{i} \Sigma (\varvec{z})}, \qquad \tilde{S}_i^{\text {past}}(\Sigma (\varvec{z})) = \frac{1 - \tilde{S}_i(\Sigma (\varvec{z}))}{s_{i} \Sigma (\varvec{z})}. \end{aligned}$$

    Starting from (5), substituting (6) and (7), and using (2) and (3) to eliminate all \(S^c_i(\varvec{z})\) and \(S^b_i(\varvec{z})\), yields (1).

Remark 1

In [4], zero switchover times are also allowed; the same result (1) is shown to hold.

In Theorem 1 of [4] it was subsequently observed that one may simplify (1) as follows, by using (2) and (3):

$$\begin{aligned} L(\varvec{z}) = \frac{\sum _{i=1}^m \lambda _i (1-z_i) S^c_i(\varvec{z})}{\sum _{i=1}^m \lambda _i(1-z_i)}. \end{aligned}$$
(8)

This formula is remarkably simple; please notice that it does not involve the service time distributions, and that the service disciplines at the various queues also do not play a role, which suggests that (1) is based on very general principles. This is the formula for which we would like to provide a short proof. In combination with (2)—(4) it also gives a short proof of (1). In other words, one can obtain an expression for the PGF of the joint steady-state queue-length distribution in a large class of polling systems by just using the elementary balance equations (2) and (9), combined with the obvious relations (3) and (4).

Short proof of (8).

First rewrite (8) as

$$\begin{aligned} \sum _{i=1}^m \lambda _i(1-z_i) L(\varvec{z}) = \sum _{i=1}^m \lambda _i (1-z_i) S^c_i(\varvec{z}). \end{aligned}$$
(9)

Secondly observe that, because of the Poisson arrival processes, \(L(\varvec{z})\) is also the PGF of the joint queue-length distribution just before an arrival at \(Q_i\), \(i \in J\) by PASTA (Poisson Arrival See Time Averages, for example, see [1, 15]).

Thirdly invert the transform expressions on both sides of (9), yielding, for \({\varvec{x}}\ge {\varvec{0}}\) and \({\varvec{e}}_i\) being the unit vector with 1 in the ith coordinate and zero elsewhere,

$$\begin{aligned} \sum _{i=1}^m \lambda _i \pi ^{e}_i({\varvec{x}})-\sum _{i=1}^m \lambda _i \pi ^{e}_i({\varvec{x}}-{\varvec{e}}_i) =\sum _{i=1}^m \lambda _i \pi _i^d({\varvec{x}})-\sum _{i=1}^m \lambda _i \pi _i^d({\varvec{x}}-{\varvec{e}}_i), \end{aligned}$$
(10)

where \(\pi _i^d(\cdot )\) indicates that we consider the joint queue-length distribution immediately after a departure from \(Q_i\), and \(\pi ^{e}_i(\cdot )\) denotes that we view the system just before an external arrival at \(Q_i\). Fourthly we reshuffle the terms:

$$\begin{aligned} \sum _{i=1}^m \lambda _i \pi ^{e}_i({\varvec{x}})+\sum _{i=1}^m \lambda _i \pi _i^d({\varvec{x}}-{\varvec{e}}_i) =\sum _{i=1}^m \lambda _i \pi _i^d({\varvec{x}})+\sum _{i=1}^m \lambda _i \pi _i^{e}({\varvec{x}}-{\varvec{e}}_i). \end{aligned}$$
(11)

Finally observe that the left-hand side of (11) represents the rate out of state \({\varvec{x}}\), and the right-hand side represents the rate into that state. Indeed the first term on the left-hand side corresponds to arrivals which find \({\varvec{x}}\) customers in the system. The second term on the left-hand side is slightly less obvious. It corresponds to departures that take place in state \({\varvec{x}}\). Notice that the rate at which customers depart from \(Q_i\) equals \(\lambda _i\) (although the departure process will not be a Poisson process), and that \(\pi _i^d({\varvec{x}}-{\varvec{e}}_i)\) is the fraction of departures from \(Q_i\) which take the system out of state \({\varvec{x}}\). Similarly interpret the terms on the right-hand side. We conclude that (8) amounts to a simple flow balance formula.

Remark 2

A similar flow balance argument was used in [5] to derive a queue-length expression in an M / G / 1 FCFS queue with multiple customer classes.

Remark 3

Observe that (8) immediately gives the formula for the marginal distributions. Indeed, for a vector \(\varvec{z}_{m,i}=(1,\ldots ,1,z_i,1,\ldots ,1)\), \(L(\varvec{z}_{m,i})=S^c_i(\varvec{z}_{m,i})\). From the well-known “step” (level-crossing) argument it follows that \(S^c_i(\varvec{z}_{m,i})\) is also the PGF of the queue-length distribution in \(Q_i\) at an arrival epoch at \(Q_i\). By PASTA it is also the PGF of the steady-state distribution of \(Q_i\).

Next take \(\varvec{z}_T=(z,\ldots ,z)\). (8) now states that the PGF of the distribution of the total queue length (in terms of z) equals \(\sum _{i=1}^m \lambda _i S^c_i(\varvec{z}_T)/\sum _{j=1}^m \lambda _j\). This formula may be interpreted as follows. By PASTA, \(L(\varvec{z}_T)\) is also the PGF of the distribution of the total queue length at an arrival epoch. By a level-crossing argument it follows that this equals the PGF of the distribution of the total queue length just after a departure epoch. The result now follows from the observation that a fraction \(\lambda _i / \sum _{j=1}^m \lambda _j\) of the departure epochs refers to a departure from \(Q_i\).

Remark 4

Relation (8) may be viewed as an m-dimensional version of the above-mentioned one-dimensional “step” (level-crossing) relation that holds for queues with single arrivals and single departures.

3 Formal derivations under a general framework

In this section we aim to derive distributional relationships at arrival and departure instants for various queues and their network models in a unified way, under general settings. Roughly speaking these settings allow simultaneous external arrivals, simultaneous departures and routing at different stations; however, we do not allow an external arrival to coincide with a departure. We use their time evolutions in sample paths for deriving the relationships rather than using flow balance.

We describe a queueing network system under a fairly general framework. We consider an open queueing network system with m queues, where queues uniquely belong to service facilities, which are called stations. Queues in the same station may be distinguished by customer classes. Each station may have multiple servers, which may change in time. External arrivals at queues are general as long as they satisfy certain stationarity conditions. Customers completing service may be routed among queues depending on the state of the whole system. Thus, this model is quite general and very flexible.

To describe this model we introduce a stochastic process. Queues are still indexed by \(J=\{1,2,\ldots ,m\}\). Let

$$\begin{aligned} {\varvec{X}}(t)=(X_1(t),\ldots ,X_m(t)), \end{aligned}$$

where \(X_{i}(t)\) represents the length of queue i at time t, which includes customers in service. Here each queue belongs to a single station. There is a mapping from queues to stations, which will be given when needed.

In addition to \({\varvec{X}}(t)\), the following counting processes count the number of specified events until time \(t\ge 0\), for \(i\in J\):

  • \(N^{e}_{i}(t)\)—external arrivals at queue i,

  • \(N^{d}_{i}(t)\)—departures from queue i,

  • \(N^{r}_{i}(t)\)—internal arrivals at queue i (transition from some queue).

With \({\varvec{N}}^u(t)=(N_1^u(t),\ldots ,N_m^u(t))\) for \(u=e,d,r\), we consider the process

$$\begin{aligned} {\varvec{Z}}(t) \equiv ({\varvec{X}}(t),{\varvec{N}}^{e}(t),{\varvec{N}}^{d}(t),{\varvec{N}}^{r}(t))\ . \end{aligned}$$

All processes are assumed right-continuous with left limits. Let \(\Delta {\varvec{X}}(t) = {\varvec{X}}(t) - {\varvec{X}}(t-)\). \(\Delta {\varvec{N}}^{u}(t)\) is similarly defined and is in \(\mathbb {Z}_+^m\) for \(u = e,d,r\), where \(\mathbb {Z}_{+}\) is the set of nonnegative integers.

For \(u=e,d,r\), denote

$$\begin{aligned} |{\varvec{N}}^{u}|(t) = \sum _{i \in J} N^{u}_{i}(t) \end{aligned}$$

and assume that

  1. (i)

    \({\varvec{X}}(0), {\varvec{N}}^{e}(t),{\varvec{N}}^{d}(t),{\varvec{N}}^{r}(t)\) are all finite (in \(\mathbb {Z}_+^m\)) for each \(t \ge 0\).

  2. (ii)

    \(\Delta |{\varvec{N}}^{e}|(t) \Delta |{\varvec{N}}^{d}|(t) = 0\) for each \(t \ge 0\). That is, external arrivals and service completions cannot occur simultaneously.

We also need to define the intermediate state

$$\begin{aligned} {\varvec{X}}^{d}(t) = {\varvec{X}}(t) - \Delta {\varvec{N}}^{r}(t)\in \mathbb {Z}_+^m\ . \end{aligned}$$
(12)

This differs from \({\varvec{X}}(t)\) only at departure epochs, and it describes the state “after” a departure and “before” an internal arrival at a different queue.

Clearly the following dynamics hold:

$$\begin{aligned} {\varvec{X}}(t) = {\varvec{X}}(0) + {\varvec{N}}^{e}(t) - {\varvec{N}}^{d}(t) + {\varvec{N}}^{r}(t)\in \mathbb {Z}_+^m\ . \end{aligned}$$
(13)

Because of (i) \({\varvec{X}}(t)\) and \({\varvec{X}}^{d}(t)\) are also finite. It may be natural to assume that \(|{\varvec{N}}^{r}|(t) \le |{\varvec{N}}^{d}|(t)\) for \(t \ge 0\), but we do not require it in this section.

Thus, \({\varvec{X}}(t)\) is the state of the system at time t of an input–output system driven by the counting processes \({\varvec{N}}^{e},{\varvec{N}}^{d},{\varvec{N}}^{r}\). The dynamics of (12) and (13) indicates that we adopt the departure first framework. We have used queueing terminologies, but our results are valid as long as the above mathematical assumptions and (13) are satisfied.

In general \(|{\varvec{N}}^{e}|(t), |{\varvec{N}}^{d}|(t)\) and \(N^{e}_{i}(t)\) and \(N^{d}_{i}(t)\) may have jumps greater than one, which is not convenient to describe the time evolution of \({\varvec{Z}}(t)\). Thus, for \(u=e,d\), we introduce

$$\begin{aligned} |\tilde{{\varvec{N}}}^u|(t) = \sum _{0<s\le t} 1(\Delta |{\varvec{N}}^u|(s)\ge 1), \qquad {\tilde{N}}^{u}_{i}(t) = \sum _{0<s\le t} 1(\Delta N^u_i(s)\ge 1), \end{aligned}$$

then \(\Delta |\tilde{{\varvec{N}}}^{u}|(t) \le 1\) and \(\Delta \tilde{N}^{u}_{i}(t) \le 1\), that is, \(|\tilde{{\varvec{N}}}^{u}|\) and \(\tilde{N}^{u}_{i}\) are simple point processes for \(u=e,d\). Set \(t_0^e=t_0^d=t_{i,0}^e=t_{i,0}^d=0\) for \(i\in J\), and, for \(n\ge 1\) and \(i\in J\), let \(t^e_n,t^d_n,t^e_{i,n},t^d_{i,n}\) be the \(n^{\text {th}}\) jump epoch of \(|\tilde{{\varvec{N}}}^e|,|\tilde{{\varvec{N}}}^d|,\tilde{N}^e_i,\tilde{N}^d_i\), respectively (of course, if the corresponding process is not terminating and such an epoch exists).

Another basic assumption on the counting processes is

  1. (iii)

    There exist finite and positive numbers \(\lambda ^{u}\), \(u=e,d\) such that

    $$\begin{aligned} \lambda ^{u} = \lim _{t \rightarrow \infty } \frac{1}{t} |\tilde{{\varvec{N}}}^{u}|(t)\ , \end{aligned}$$
    (14)

    a.s. (almost surely) w.r.t. the underlying probability measure \(\mathbb {P}\).

We further assume the following ergodic type conditions:

  1. (iv)

    There exist probability distributions \(\pi ^{e}\) and \(\pi ^{d}\) such that

    $$\begin{aligned}&\lim _{n \rightarrow \infty } \frac{1}{n} \sum _{\ell =1}^{n} 1({\varvec{X}}(t^{e}_{\ell }-) = {\varvec{x}}, \Delta {\varvec{N}}^{e}(t^{e}_{\ell }) = {\varvec{y}}) = \pi ^{e}({\varvec{x}},{\varvec{y}}), \quad \mathrm{a.s., } \quad {\varvec{x}}, {\varvec{y}} \in \mathbb {Z}_+^m, \end{aligned}$$
    (15)
    $$\begin{aligned}&\lim _{n \rightarrow \infty } \frac{1}{n} \sum _{\ell =1}^{n} 1({\varvec{X}}^{d}(t^{d}_{\ell }) = {\varvec{x}}, \Delta {\varvec{N}}^{d}(t^{d}_{\ell }) = {\varvec{y}}, \Delta {\varvec{N}}^{r}(t^{d}_{\ell }) = {\varvec{z}}) = \pi ^{d}({\varvec{x}},{\varvec{y}},{\varvec{z}}), \quad \mathrm{a.s.,}\nonumber \\&\qquad \qquad \qquad \qquad \qquad \qquad {\varvec{x}}, {\varvec{y}}, {\varvec{z}} \in \mathbb {Z}_+^m . \end{aligned}$$
    (16)

From the definitions in (iv) \(\pi ^{e}\) and \(\pi ^{d}\) are considered as the embedded stationary distributions just before arrival epochs and just after departure epochs but before internal arrivals, respectively. They correspond to Palm distributions concerning their counting processes in the time stationary framework (for example, see [1]).

Since the process \({\varvec{X}}(t)\) is vector-valued, it is not so convenient for manipulations. So we introduce a test function \(f:\mathbb {Z}_{+}^{m}\rightarrow \mathbb {R}\). In the setting (i)–(iv) we will derive distributional relationships among characteristics at different embedded instants using the test function f. For this we need the following lemma.

Lemma 1

If (15) holds, then, for any bounded function \(g:\mathbb {Z}_+^{2m}\rightarrow \mathbb {R}\), we have

$$\begin{aligned}&\lim _{n \rightarrow \infty } \frac{1}{n} \sum _{\ell =1}^{n} g({\varvec{X}}(t^{e}_{\ell }-),\Delta {\varvec{N}}^{e}(t^{e}_{\ell })) = \sum _{{\varvec{x}},{\varvec{y}} \in \mathbb {Z}_+^m} g({\varvec{x}},{\varvec{y}}) \pi ^{e}({\varvec{x}},{\varvec{y}}), ~~~ \mathrm{a.s.} \end{aligned}$$
(17)

Similarly, if (16) holds, then, for any bounded function \(h:\mathbb {Z}_+^{3m}\rightarrow \mathbb {R}\), we have

$$\begin{aligned}&\lim _{n \rightarrow \infty } \frac{1}{n} \sum _{\ell =1}^{n} h({\varvec{X}}^{d}(t^{d}_{\ell }),\Delta {\varvec{N}}^{d}(t^{d}_{\ell }),\Delta {\varvec{N}}^{r}(t^{d}_{\ell })) = \sum _{{\varvec{x}},{\varvec{y}},{\varvec{z}} \in \mathbb {Z}_+^m} h({\varvec{x}},{\varvec{y}},{\varvec{z}}) \pi ^{d}({\varvec{x}},{\varvec{y}},{\varvec{z}}), ~~~ \mathrm{a.s.} \end{aligned}$$
(18)

This lemma may look obvious, but its proof is not immediate because we need to verify the exchange of limits. We prove it in the appendix.

We are now ready to prove distributional relationships. First we denote the expectations under \(\pi ^{e}\) and \(\pi ^{d}\) by \(\mathbb {E}^{e}\) and \(\mathbb {E}^{d}\), respectively. That is,

$$\begin{aligned} \mathbb {E}^{e}g({\varvec{X}}, {\varvec{Y}})&= \sum _{{\varvec{x}},{\varvec{y}} \in \mathbb {Z}_+^m} g({\varvec{x}},{\varvec{y}}) \pi ^{e}({\varvec{x}},{\varvec{y}}), \end{aligned}$$
(19)
$$\begin{aligned} \mathbb {E}^{d}h({\varvec{X}},{\varvec{Y}},{\varvec{Z}})&= \sum _{{\varvec{x}},{\varvec{y}},{\varvec{z}} \in \mathbb {Z}_+^m} h({\varvec{x}},{\varvec{y}},{\varvec{z}}) \pi ^{d}({\varvec{x}},{\varvec{y}},{\varvec{z}}). \end{aligned}$$
(20)

Note that \({\varvec{Y}}\) in \(\mathbb {E}^{e}\) represents sizes of externally arriving batches, while \({\varvec{Y}}\) in \(\mathbb {E}^{d}\) represents sizes of departing batches.

Theorem 1

In the setting (i)–(iv), for any bounded function \(f:\mathbb {Z}_+^m\rightarrow \mathbb {R}\), we have

$$\begin{aligned} \lambda ^{e} \mathbb {E}^{e}\big [f({\varvec{X}}+ {\varvec{Y}}) - f({\varvec{X}})\big ] + \lambda ^{d} \mathbb {E}^{d}\big [f({\varvec{X}} + {\varvec{Z}}) - f({\varvec{X}})\big ] = \lambda ^{d} \mathbb {E}^{d} \big [f({\varvec{X}} + {\varvec{Y}}) - f({\varvec{X}}) \big ].\nonumber \\ \end{aligned}$$
(21)

Proof

Since \(f({\varvec{X}}(t))\) changes in time only at the counting instants \(t^{e}_{n}\) or \(t^{d}_{n}\), we have (with \(\Delta \) being defined as earlier in this section)

$$\begin{aligned} f({\varvec{X}}(t)) - f({\varvec{X}}(0))&= \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{e}|(t)} \Delta f({\varvec{X}}(t^{e}_{\ell })) + \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} \Delta f({\varvec{X}}(t^{d}_{\ell })). \end{aligned}$$
(22)

Recalling (12), we have \({\varvec{X}}(t^{d}_{\ell }) = {\varvec{X}}^{d}(t^{d}_{\ell }) + \Delta {\varvec{N}}^{r}(t^{d}_{\ell })\), and this and (13) yield

$$\begin{aligned} {\varvec{X}}(t^{d}_{\ell }-)&= {\varvec{X}}(t^{d}_{\ell }) + \Delta {\varvec{N}}^{d}(t^{d}_{\ell }) - \Delta {\varvec{N}}^{r}(t^{d}_{\ell }) = {\varvec{X}}^{d}(t^{d}_{\ell }) + \Delta {\varvec{N}}^{d}(t^{d}_{\ell }). \end{aligned}$$

From these \({\varvec{X}}(t^{d}_{\ell })\) and \({\varvec{X}}(t^{d}_{\ell }-)\) we have

$$\begin{aligned} \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} \Delta f({\varvec{X}}(t^{d}_{\ell }))&= \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} (f({\varvec{X}}(t^{d}_{\ell })) - f({\varvec{X}}^{d}(t^{d}_{\ell }))) + \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} (f({\varvec{X}}^{d}(t^{d}_{\ell })) \nonumber \\&\quad - f({\varvec{X}}(t^{d}_{\ell }-))) \nonumber \\&= \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} (f({\varvec{X}}^{d}(t^{d}_{\ell })+\Delta {\varvec{N}}^{r}(t^{d}_{\ell })) - f({\varvec{X}}^{d}(t^{d}_{\ell }))) \nonumber \\&\quad + \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} (f({\varvec{X}}^{d}(t^{d}_{\ell })) - f({\varvec{X}}^{d}(t^{d}_{\ell }) + \Delta {\varvec{N}}^{d}(t^{d}_{\ell }))) . \end{aligned}$$
(23)

It follows from (22) and (23) that

$$\begin{aligned}&\sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{e}|(t)} (f({\varvec{X}}(t^{e}_{\ell }-) + \Delta {\varvec{N}}^{e}(t^{e}_{\ell })) - f({\varvec{X}}(t^{e}_{\ell }-))) + \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} (f({\varvec{X}}^{d}(t^{d}_{\ell })+\Delta {\varvec{N}}^{r}(t^{d}_{\ell })) \nonumber \\&\qquad - f({\varvec{X}}^{d}(t^{d}_{\ell }))) \nonumber \\&\quad = \sum _{\ell = 1}^{|\tilde{{\varvec{N}}}^{d}|(t)} (f({\varvec{X}}^{d}(t^{d}_{\ell }) + \Delta {\varvec{N}}^{d}(t^{d}_{\ell })) - f({\varvec{X}}^{d}(t^{d}_{\ell }))) + f({\varvec{X}}(t)) - f({\varvec{X}}(0)). \end{aligned}$$
(24)

Dividing both sides of this equation by t and letting \(t \rightarrow \infty \) yields (21) by (14)–(16) and Lemma 1 because f is bounded. \(\square \)

The assumptions of Theorem 1 exclude arrivals and departures occurring simultaneously, but allow them to occur separately as multiple simultaneous external arrivals or multiple simultaneous departures and routing. The model as well as the distributional relationship may be too general for queueing networks. To make them more specific we make the following assumption:

  1. (v)

    There exist finite and nonnegative numbers \(\lambda ^{d}_{A}\) for nonempty \(A \subset J\), that is, \(A \in 2^{J} {\setminus } \{\emptyset \}\), such that

    $$\begin{aligned} \lambda ^{d}_{A} = \lim _{t \rightarrow \infty } \frac{1}{t} \tilde{N}^{d}_{A}(t), \qquad \mathrm{a.s.,} \end{aligned}$$
    (25)

where, with the notation \(S_{A} \equiv \{{\varvec{x}} \in \mathbb {Z}_{+}^{m}; x_{i} > 0, i \in A, x_{j} = 0, j \in J {\setminus } A\}\),

$$\begin{aligned} \tilde{N}^{d}_{A}(t) = \sum _{0<s\le t} 1(\Delta {\varvec{N}}^d(s) \in S_{A} ). \end{aligned}$$
(26)

Note that \(\tilde{N}^{d}_{A}\) counts instants when departures occur simultaneously from queues \(i \in A\), but there is no departure from queue \(j \in J {\setminus } A\), while \(\Delta \tilde{N}^{d}_{A}(t) \Delta \tilde{N}^{d}_{B}(t) = 0\) if \(A \ne B\). Thus, the setting (i)–(v) still allow batch arrivals and batch departures and simultaneous transfer of customers in a departing batch.

We will use the following notation. For each \(A \in 2^{J} {\setminus } \{\emptyset \}\), let, for \({\varvec{x}}, {\varvec{y}}, {\varvec{z}} \in \mathbb {Z}_{+}^{m}\),

$$\begin{aligned} \pi ^{d}_{A}({\varvec{x}},{\varvec{y}},{\varvec{z}}) = \left\{ \begin{array}{l@{\quad }l} \frac{\lambda ^{d}}{\lambda ^{d}_{A}} \pi ^{d}({\varvec{x}}, {\varvec{y}},{\varvec{z}}), \quad &{} \lambda _{A}^d > 0, \\ 0, \quad &{} \lambda _{A}^d = 0. \end{array} \right. \end{aligned}$$

Since \(\tilde{N}^{d}_{A}\) exclusively counts the increasing epochs of \(|\tilde{{\varvec{N}}}^{d}|\) for different As, we have

$$\begin{aligned} |\tilde{{\varvec{N}}}^{d}|(t) = \sum _{A \in 2^{J} {\setminus } \{\emptyset \}} \tilde{N}^{d}_{A}(t), \end{aligned}$$
(27)

which implies that \(\lambda ^d = \sum _{A \in 2^J {\setminus } \{\emptyset \}} \lambda ^d_{A}\), and for \(A \in \{B \in 2^{J}| \lambda ^d_{B} > 0\}\), \(\pi ^{d}_{A}\) is a probability distribution on \(\mathbb {Z}_{+}^{3m}\), which can be restricted to \(\mathbb {Z}_{+}^{m} \times S_{A} \times \mathbb {Z}_{+}^{m}\).

Let \(t^{d}_{A,n}\) be the \(n^{\text {th}}\) jump epoch of \(\tilde{N}^{d}_{A}\). Just as Lemma 1 does, the following lemma plays a key role; it is proved in the appendix.

Lemma 2

In the setting (i)–(v) there exist probability distributions \(\pi ^{d}_{A}\) such that, for any bounded function \(h:\mathbb {Z}_+^{3m}\rightarrow \mathbb {R}\), with \(A \in 2^J {\setminus } \{\emptyset \}\),

$$\begin{aligned}&\lim _{n \rightarrow \infty } \frac{1}{n} \sum _{\ell =1}^{n} h({\varvec{X}}^{d}(t^{d}_{A,\ell }), \Delta {\varvec{N}}^{d}(t^{d}_{A,\ell }), \Delta {\varvec{N}}^{r}(t^{d}_{A,\ell })) \nonumber \\&\quad = \sum _{{\varvec{x}},{\varvec{y}},{\varvec{z}} \in \mathbb {Z}_{+}^{m}} h({\varvec{x}},{\varvec{y}},{\varvec{z}}) \pi ^{d}_{A}({\varvec{x}},{\varvec{y}},{\varvec{z}}), ~ \mathrm{a.s.} \end{aligned}$$
(28)

By (27), Theorem 1 and Lemma 2 yield the following corollary. As with \(\mathbb {E}^{e}\) and \(\mathbb {E}^{d}\), \(\mathbb {E}^d_{A}\) stands for the expectation under \(\pi ^{d}_{A}\).

Corollary 1

In the setting (i)–(v), for any bounded function \(f:\mathbb {Z}_+^m\rightarrow \mathbb {R}\),

$$\begin{aligned}&\lambda ^{e} \mathbb {E}^{e}\left[ f({\varvec{X}} + {\varvec{Y}}) - f({\varvec{X}})\right] + \sum _{A \in 2^{J}{\setminus } \{\emptyset \}} \lambda ^{d}_{A} \mathbb {E}^d_{A}\left[ f({\varvec{X}} + {\varvec{Z}}) - f({\varvec{X}})\right] \nonumber \\&\quad = \sum _{A \in 2^{J} {\setminus } \{\emptyset \}} \lambda ^{d}_{A} \mathbb {E}^d_{A} \left[ f({\varvec{X}} + {\varvec{Y}}) - f({\varvec{X}}) \right] . \end{aligned}$$
(29)

Remark 5

If \(\Delta \tilde{N}^{d}_{i}(t^{d}_{j,n}) = 0\) for all \(i \ne j\), then \(\lambda ^{d}_{A} > 0\) only if A is a singleton. In this case the summations over A in (29) can be reduced to those over \(i \in J\), replacing A by i.

Until now our distributional relationship may still be too general because no assumption is made on how the counting processes are generated from \({\varvec{X}}(t)\) and other information. To describe this a filtration is convenient. Let \(\mathcal{F}_{t}\) be the \(\sigma \)-field generated by all events up to time t, and let \(\mathcal{F}_{t-} = \sigma (\cup _{u < t} \mathcal{F}_{u})\), that is, \(\mathcal{F}_{t-}\) is a \(\sigma \)-field generated by all events before time t. For a stopping time \(\tau \), let \(\mathcal{F}_{\tau -} = \sigma (\mathcal{F}_{0}, \{A \cap \{t < \tau \} \in \mathcal{F}_{t}\})\), where \(\sigma (\mathcal{A})\) is the \(\sigma \)-field generated by a family of events \(\mathcal{A}\). Using the filtration the following assumptions are typically used in the setting (i)–(v):

  1. (a1)

    \(t^{e}_{n}, t^{d}_{i,n}\) are stopping times with respect to \(\{\mathcal{F}_{t}; t \ge 0\}\). This can always be realized by choosing a sufficiently large \(\mathcal{F}_{t}\).

  2. (a2)

    \(\Delta {\varvec{N}}^{e}(t^{e}_{n})\) is independent of \(\mathcal{F}_{t^{e}_{n}-}\). That is, the sizes of batch arrivals are independent of the state of the system just before their arrival epochs.

  3. (a3)

    \(\Delta |{\varvec{N}}^{d}|(t^{d}_{n}) = 1\). That is, departures singly occur from one queue at a time.

  4. (a4)

    \(\Delta N^{r}_{j}(t^{d}_{i,n}) \le 1\) for \(j \in J\), and \(\Delta {\varvec{N}}^{r}(t^{d}_{i,n})\) is in the \(\sigma \)-field generated by \(\mathcal{F}_{t^{d}_{i,n}-}\) and \(\Delta {\varvec{N}}^{d}(t^{d}_{i,n})\).

By (a3), \(\tilde{N}^{d}_{A}(t) \equiv 0\) if A is not a singleton. Thus, we write \(\tilde{N}^{d}_{A}(t)\) as \(\tilde{N}^{d}_{i}(t)\) for \(A = \{i\}\). Similarly \(\pi ^{d}_{A}\) is written as \(\pi ^{d}_{i}\) for \(A = \{i\}\). In the setting (i)–(v) and under the assumptions (a1)–(a4), \(\Delta N^{r}_{j}(t^{d}_{i,\ell }) \le 1\), and therefore Lemma 2 yields

$$\begin{aligned} \lim _{n \rightarrow \infty } \frac{1}{n} \sum _{\ell =1}^{n} 1\left( {\varvec{X}}^{d}(t^{d}_{i,\ell }) = {\varvec{x}}, \Delta N^{d}_{i}(t^{d}_{i,\ell }) = 1, \Delta N^{r}_{j}(t^{d}_{i,\ell }) = 1\right) = \pi ^{d}_{i}({\varvec{x}},{\varvec{e}}_{i}, {\varvec{e}}_{j}), \end{aligned}$$

which is denoted by \(\pi ^{d}_{ij}({\varvec{x}})\). We here recall that \({\varvec{e}}_{i} \in \mathbb {Z}_{+}^{m}\) is the unit vector whose i-th entry is one and the other entries are zero. Thus, applying Corollary 1 for \(f({\varvec{x}}) = {\varvec{z}}^{{\varvec{x}}}\), where we recall that \({\varvec{z}}^{{\varvec{x}}} = \prod _{i \in J} z_{i}^{x_{i}}\), we have the following relationship.

Corollary 2

In the setting (i)–(v) and under assumptions (a1)–(a4), for \({\varvec{z}} = (z_{1}, \ldots , z_{m})\) satisfying \(|z_{i}| \le 1\) for \(i \in J\),

$$\begin{aligned} \lambda ^{e}&\big (1 - \mathbb {E}^e[{\varvec{z}}^{{\varvec{Y}}}] \big )\varphi ^{e}({\varvec{z}}) + \sum _{j \in J} (1-z_{j}) \sum _{i \in J} \lambda ^{d}_{i} \varphi ^{d}_{ij}({\varvec{z}}) = \sum _{i \in J} \lambda ^{d}_{i} (1 - z_{i}) \varphi ^{d}_{i}({\varvec{z}}), \end{aligned}$$
(30)

where

$$\begin{aligned} \varphi ^{e}({\varvec{z}}) = \mathbb {E}^{e}[{\varvec{z}}^{{\varvec{X}}}],\qquad \varphi ^{d}_{i}({\varvec{z}}) = \mathbb {E}^d_i[{\varvec{z}}^{{\varvec{X}}}], \qquad \varphi ^{d}_{i,j}({\varvec{z}}) = \sum _{{\varvec{x}} \in \mathbb {Z}_+^m} {\varvec{z}}^{{\varvec{x}}} \pi ^{d}_{ij}({\varvec{x}}), \qquad i,j \in J. \end{aligned}$$

Remark 6

Under the assumptions of this corollary the routing of departing customers may depend on all queue lengths in the network.

Corollary 2 is specialized to Corollary 3 if external arrivals to queues occur one at a time. Namely,

  1. (vi)

    No simultaneous arrivals occur, and there exist finite numbers (some, but not all, possibly zero) \(\lambda ^{e}_{k}\) for \(k \in J\) such that

    $$\begin{aligned} \lambda ^{e}_{k} = \lim _{t \rightarrow \infty } \frac{1}{t} \tilde{N}^{e}_{k}(t), \quad \mathrm{a.s.,} \qquad k \in J. \end{aligned}$$
    (31)

Corollary 3

Under the assumptions of Corollary 2, assume that (vi) also holds. Define \(\pi ^{e}_{k}\) as

$$\begin{aligned} \pi ^{e}_{k}({\varvec{x}},y_{k}) = \left\{ \begin{array}{l@{\quad }l} \frac{\lambda ^{e}}{\lambda ^{e}_{k}} \pi ^{e}({\varvec{x}},y_{k}), \quad &{} \lambda _{k}^{e} > 0,\\ 0, \quad &{} \lambda _{k}^{e} = 0; \end{array} \right. \end{aligned}$$

then, for \(k \in J_e \equiv \{i \in J| \lambda _{i}^{e} > 0\}\), \(\pi ^{e}_{k}\) is a probability distribution on \(\mathbb {Z}_+^{m+1}\), and (30) becomes

$$\begin{aligned} \sum _{k \in J} \lambda ^{e}_{k} \big (1 - \mathbb {E}^e\big [z_{k}^{Y_{k}}\big ] \big ) \varphi ^{e}_{k}({\varvec{z}}) + \sum _{j \in J} (1-z_{j}) \sum _{i \in J} \lambda ^{d}_{i} \varphi ^{d}_{ij}({\varvec{z}}) = \sum _{i \in J} \lambda ^{d}_{i} (1 - z_{i}) \varphi ^{d}_{i}({\varvec{z}}), \end{aligned}$$
(32)

where \(\varphi ^{e}_{k}\) is the generating function of \({\varvec{X}}\) under the conditional distribution \(\pi ^{e}_{k}\).

Corollary 3 immediately implies the following corollary.

Corollary 4

Under the assumptions of Corollary 3, if the event \(\{\Delta N^{r}_{j}(t^{d}_{i,\ell }) = 1\}\) is independent of \(\mathcal{F}_{t^{d}_{i,\ell }-}\), then there exist \(p_{ij} \ge 0\) such that \(\pi ^{d}_{i}({\varvec{x}},1, {\varvec{e}}_{j}) = \pi ^{d}_{i}({\varvec{x}},1) p_{ij}\), and (32) becomes

$$\begin{aligned} \sum _{k \in J_{e}} \lambda ^{e}_{k} \big (1 - \mathbb {E}^e\big [z_{k}^{Y_{k}}\big ] \big )\varphi ^{e}_{k}({\varvec{z}}) + \sum _{i \in J} \lambda ^{d}_{i} \varphi ^{d}_{i}({\varvec{z}}) \sum _{j \in J} p_{ij} (1-z_{j}) = \sum _{i \in J} \lambda ^{d}_{i} (1 - z_{i}) \varphi ^{d}_{i}({\varvec{z}}). \end{aligned}$$
(33)

Remark 7

In Sect. 5 we shall present several applications of the above theorem and corollaries. In particular the polling result (8) of Sect. 2 is there shown to be a special case of Corollary 1.

Notice that the setup of this section includes the finite buffer case. This is done by having no arrivals to a queue during times in which it is saturated. This type of dependence is allowed by our setup. Some results for the single server queue with finite capacity are contained in [12].

4 Distributional relationship up to a given time

The purpose of this section is to derive a nonstationary version of Theorem 1, a distributional relationship up to a given time. We adopt the setting (i)–(iv) of Sect. 3 and consider the process \({\varvec{Z}}(t)\) introduced in the beginning of that section. We first define the expected relative frequencies for bounded test functions gh from \(\mathbb {Z}_+^{2m}, \mathbb {Z}_+^{3m}\) to \(\mathbb {R}\) up to time t as

$$\begin{aligned}&R^{e}_{t}g = \frac{1}{|\tilde{{\varvec{N}}}^{e}|(t)} \sum _{n=1}^{|\tilde{{\varvec{N}}}^{e}|(t)} g({\varvec{X}}(t^{e}_{n}-),\Delta {\varvec{N}}^{e}(t^{e}_{n})) 1(|\tilde{{\varvec{N}}}^{e}|(t)> 0),\\&R^{d}_{t} h = \frac{1}{|\tilde{{\varvec{N}}}^{d}|(t)} \sum _{n=1}^{|\tilde{{\varvec{N}}}^{e}|(t)} h({\varvec{X}}^{d}(t^{d}_{n}),\Delta {\varvec{N}}^{d}(t^{d}_{n}),\Delta {\varvec{N}}^{r}(t^{d}_{n})) 1(|\tilde{{\varvec{N}}}^{d}|(t) > 0). \end{aligned}$$

For each bounded function \(f:\mathbb {Z}_+^{m}\rightarrow \mathbb {R}\) we define the following test functions:

$$\begin{aligned}&g^{e}({\varvec{x}},{\varvec{y}}) = f({\varvec{x}}), \qquad g^{e}_+({\varvec{x}}, {\varvec{y}}) = f({\varvec{x}} + {\varvec{y}}),\\&h^{d}({\varvec{x}},{\varvec{y}},{\varvec{z}}) = f({\varvec{x}}), \qquad h^{d}_-({\varvec{x}},{\varvec{y}},{\varvec{z}}) = f({\varvec{x}} + {\varvec{y}}), \qquad h^{d}_{+}({\varvec{x}},{\varvec{y}},{\varvec{z}}) = f({\varvec{x}} + {\varvec{z}}). \end{aligned}$$

Let

$$\begin{aligned} \lambda ^{e}(t) = \frac{1}{t} |\tilde{{\varvec{N}}}^{e}|(t), \qquad \lambda ^{d}(t) = \frac{1}{t} |\tilde{{\varvec{N}}}^{d}|(t). \end{aligned}$$

Then (24) yields the following lemma.

Lemma 3

In the setting (i)–(iv), for any bounded function \(f:\mathbb {Z}_+^{m}\rightarrow \mathbb {R}\), we have, for any \(t > 0\),

$$\begin{aligned}&\lambda ^{e}(t) \big (R^{e}_{t} g^{e}_+ - R^{e}_{t} g^{e}\big ) + \lambda ^{d}(t) \big (R^{d}_{t} h^{d}_+ - R^{d}_{t} h^d\big )\nonumber \\&\quad - \lambda ^{d}(t) \big (R^{d}_{t} h^{d}_- - R^{d}_{t} h^{d}\big ) = \frac{1}{t} \big (f({\varvec{X}}(t)) - f({\varvec{X}}(0))\big ). \end{aligned}$$
(34)

We may interpret Lemma 3 as a transient version of Theorem 1. It is notable that (34) holds without any stability condition, and its right-hand side vanishes as \(t \rightarrow \infty \) at most in linear order of \(t^{-1}\) because f is bounded. If there exists a unique probability measure such that \(({\varvec{X}}(t), \Delta {\varvec{N}}^{e}(t), \Delta {\varvec{N}}^{d}(t), \Delta {\varvec{N}}^{r}(t))\) is stationary, then \(R^{e}_{t} g, R^{d}_{t}h\) converge to the corresponding expectations under the Palm distributions involving \(|\tilde{{\varvec{N}}}^{e}|, |\tilde{{\varvec{N}}}^{d}|\), respectively. Thus, we have

$$\begin{aligned}&\lim _{t \rightarrow \infty } R^{e}_{t} g^{e} = \mathbb {E}^{e}f({\varvec{X}}), \qquad \lim _{t \rightarrow \infty } R^{e}_{t} g^{e}_+ = \mathbb {E}^{e}f({\varvec{X}} + {\varvec{Y}}),\\&\lim _{t \rightarrow \infty } R^{d}_{t} h^{d}({\varvec{x}}) = \mathbb {E}^{d}f({\varvec{X}}), \qquad \lim _{t \rightarrow \infty } R^{d}_{t} h^{d}_- = \mathbb {E}^{e}f({\varvec{X}} + {\varvec{Y}}),\\&\lim _{t \rightarrow \infty } R^{d}_{t} h^{d}_+ = \mathbb {E}^{d}f({\varvec{X}} + {\varvec{Z}}), \end{aligned}$$

and we recover (21) from (34). Corollary 1, (30) and (32) are similarly obtained. We omit the routine details.

5 Some special cases and applications

In this section we consider several applications of the theorem and corollaries of Sect. 3. We first note that, if nonzero \(N^{e}_{k}\) for \(k \in J\) are independent compound Poisson processes, then by PASTA the embedded stationary distributions \(\pi ^{e}\) and \(\pi ^{e}_{k}\) are identical with the time stationary distributions.

Case 1: An m-class queue with batch arrivals

We consider an m-class single-node service facility, with \(m\ge 1\). We allow multiple servers. Customers arrive according to a Poisson process, possibly in batches. Customers of class i require service at the service facility according to service time distribution \(B_i(\cdot )\), \(i \in J\). These distributions are assumed to be continuous, but not otherwise specified. No customers are lost; there is an infinite waiting room. After completion of their service customers immediately leave. We assume that the steady-state joint queue-length distribution (numbers of customers of all classes in the system) exists. Its PGF is denoted by \(L(\varvec{z})\). We also again (as in Sect. 2) denote the PGF of the steady-state joint queue-length distributions immediately after departure epochs of a class i customer by \(S^c_i(\varvec{z})\), \(i \in J\). We do not specify according to which service discipline the customers are served; polling with FCFS within each class is just one of many options.

Theorem 2

Consider the above-described m-class single-node service facility. Assume that customers arrive according to a batch Poisson process with rate \(\lambda \) and that customers are served individually, in some nonspecified order. Let an arbitrary batch arrival have size \(\varvec{G}= (G_1,\ldots ,G_m)\) with PGF \(\mathbb {E}[\varvec{z}^{\varvec{G}}] = \mathbb {E}[z_1^{G_1} \ldots z_m^{G_m}]\). Then the following relation holds between the PGF \(L(\varvec{z})\) and the PGFs \(S^c_i(\varvec{z})\), \(i \in J\):

$$\begin{aligned} (1 - \mathbb {E}[\varvec{z}^{\varvec{G}}]) L(\varvec{z}) = \sum _{i=1}^m (1-z_i) \mathbb {E}G_i S^c_i(\varvec{z}). \end{aligned}$$
(35)

Proof

After using PASTA, Theorem 2 is a special case of (30) of Corollary 2 in which there is no routing. \(\square \)

Remark 8

Special cases of the above theorem are obtained by assuming that batches always contain only customers of one type. For the special case that batches have just one customer of class i with probability \(\frac{\lambda _i}{\lambda }\), \(i \in J\), (35) reduces to (8) that was obtained for the polling system that provided the initial motivation for the present study (but (8) obviously holds for a much more general class of service disciplines).

Case 2: Generalization of Theorem 2 to the case of batch services

The following theorem generalizes the main result in [11], but is a special case of Theorem 2 of [19] which allows a more general arrival process (but in that theorem batch service is not considered).

Theorem 3

Consider the m-class single-node service facility of Theorem 2, with the additional assumption that customers of class i are always served in batches of fixed size \(K_i\), \(i \in J\); the start of a service of class i customers is delayed until \(K_i\) customers are present. Then the following relation holds between the PGF \(L(\varvec{z})\) and the PGFs \(S^c_i(\varvec{z})\), \(i \in J\):

$$\begin{aligned} (1 - \mathbb {E}[\varvec{z}^{\varvec{G}}]) L(\varvec{z}) = \sum _{i=1}^m \frac{1-z_i^{K_i}}{K_i} \mathbb {E}G_i S^c_i(\varvec{z}). \end{aligned}$$
(36)

Proof

In view of Remark 5, and after using PASTA, Theorem 3 is a special case of (29) of Corollary 1 in which there is no routing, the external arrival batch \({\varvec{Y}}(t^{e}_{n})\) is independent of \(\mathcal{F}_{t^{e}_{n}-}\) and the departing batch size \(Y_{i}\) from queue i is some constant \(K_{i}\). In this case it is easy to see that \(\lambda ^{d}_{i} \mathbb {E}[Y_{i}] = \lambda ^{e}/K_{i}\), and we obtain (36) from (29). \(\square \)

Case 3: Nonpreemptive priority queues

In this example we consider a nonpreemptive priority queue with P customer classes. We first verify the equality between the PGFs as given by Theorem 2 for \(P=2\) and subsequently point out how one may use the theorem to obtain the steady-state joint queue-length distribution in that example for a P-class queue.

Consider the M / G / 1 queue with P classes of customers, with nonpreemptive priority in descending order \(1,2,\ldots ,P\) (so class 1 has the highest priority). Let \(\lambda _i\) denote the arrival rate of customers of class i, \(i=1,2\). Takagi ([18], Formula (2.87) on p. 311) presents the PGF \(\Pi (z_1,z_2,\ldots ,z_P)\) of the steady-state joint queue-length distribution immediately after an arbitrary customer departure epoch. For \(P=2\) he also obtains the PGF \(P(z_1,z_2,\ldots ,z_P)\) of the steady-state joint queue-length distribution at an arbitrary epoch ([18], Formula (5.82b) on p. 397). We have verified that, indeed, for \(P=2\) classes one has (cf. Theorem 2 with single arrivals),

$$\begin{aligned} (\lambda _1(1-z_1) + \lambda _2(1-z_2)) P(z_1,z_2) = \lambda _1(1-z_1) S^c_1(z_1,z_2) + \lambda _2(1-z_2) S^c_2(z_1,z_2) . \end{aligned}$$

The starting point for this verification was the following obvious set of relations, with \(\beta _i(z_1,z_2)\) the PGF of the numbers of arrivals at both queues during one service of a class i customer, \(i=1,2\):

$$\begin{aligned} \Pi _1(z_1,z_2)&:= \frac{\lambda _1}{\lambda } S^c_1(z_1,z_2) = \frac{\Pi (z_1,z_2)-\Pi (0,z_2)}{z_1} \beta _1(z_1,z_2) \nonumber \\&\quad +\,\Pi (0,0) \frac{\lambda _1}{\lambda } \beta _1(z_1,z_2), \end{aligned}$$
(37)
$$\begin{aligned} \Pi _2(z_1,z_2)&:= \frac{\lambda _2}{\lambda } S^c_2(z_1,z_2) = \frac{\Pi (0,z_2)-\Pi (0,0)}{z_2} \beta _2(z_1,z_2) \nonumber \\&\quad +\, \Pi (0,0) \frac{\lambda _2}{\lambda } \beta _2(z_1,z_2) . \end{aligned}$$
(38)

Here \(\Pi _i(z_1,z_2)\) is the PGF of the steady-state joint queue-length distribution immediately after the departure of a class i customer, with the indicator function \(1(\mathrm{departing ~ customer ~ is ~ of ~ class} ~ i)\), \(i=1,2\), and \(\Pi (z_1,z_2)\) is as defined above. The factors \(\frac{\lambda _i}{\lambda }\) on the left-hand side of (37) and (38) are needed because the \(S^c_i(z_1,z_2)\) are conditional PGFs, the condition being that the departing customer is of class i.

This example clearly demonstrates the value of our general balance equations. Besides providing a much shorter proof for Takagi’s Formula (5.82b) they also allow us to extend his result to the case of \(P (> 2)\) customer classes, by using the expressions for \(\frac{\lambda _i}{\lambda } S^c_i(z_1,z_2,\ldots ,z_P)\) that follow from Takagi’s Formula (2.87) for \(\Pi (z_1,z_2,\ldots ,z_P)\).

Case 4: Priority for the longer queue

Consider a model of one server and two queues. Each queue has its own Poisson arrival process and service time distribution. After a service completion the server proceeds with a customer from the longest queue, if the queue lengths are unequal; if the queue lengths are equal, the server chooses a customer from queue \(Q_i\) with probability \(\alpha _i\), \(i=1,2\). Cohen [6] has derived the PGF \(\Pi (z_1,z_2) = \mathbb {E}[z_1^{X_1}z_2^{X_2}]\) of the steady-state joint queue-length distribution immediately after an arbitrary customer departure epoch, by solving a Riemann-type boundary value problem. In the process he also obtained the following PGFs that naturally arise in this Priority for the longer queue model: \(\mathbb {E}[z_1^{X_1}z_2^{X_2} 1_{\{X_1>X_2\}}]\), \(\mathbb {E}[z_1^{X_1}z_2^{X_2} 1_{\{X_1<X_2\}}]\) and \(\mathbb {E}[z_1^{X_1}z_2^{X_2} 1_{\{X_1=X_2 >0\}}]\). Below we first show how one can obtain the PGFs \(\Pi _i(z_1,z_2)\) of the steady-state joint queue-length distribution immediately after the departure of a customer from \(Q_i\), \(i=1,2\) (we stick as much as possible to the notation of Case 3). By considering the joint queue-length distribution at two consecutive departure epochs, and with \(\beta _i(z_1,z_2)\) denoting the PGF of the numbers of arrivals at both queues during one service of a customer from \(Q_i\), we can write

$$\begin{aligned} \Pi _1(z_1,z_2)&= \mathbb {E}\left[ z_1^{X_1} z_2^{X_2} 1_{\{X_1>X_2\}}\right] \frac{\beta _1(z_1,z_2)}{z_1} \nonumber \\&\quad +\,\alpha _1 \mathbb {E}\left[ z_1^{X_1} z_2^{X_2} 1_{\{X_1=X_2 >0\}}\right] \frac{\beta _1(z_1,z_2)}{z_1} \nonumber \\&\quad +\, \mathbb {P}(X_1=X_2=0) \frac{\lambda _1}{\lambda _1+\lambda _2} \beta _1(z_1,z_2), \end{aligned}$$
(39)
$$\begin{aligned} \Pi _2(z_1,z_2)&= \mathbb {E}\left[ z_1^{X_1} z_2^{X_2} 1_{\{X_1<X_2\}}\right] \frac{\beta _2(z_1,z_2)}{z_2} \nonumber \\&\quad +\, \alpha _2 \mathbb {E}\left[ z_1^{X_1} z_2^{X_2} 1_{\{X_1=X_2 >0\}}\right] \frac{\beta _2(z_1,z_2)}{z_2} \nonumber \\&\quad +\, \mathbb {P}(X_1=X_2=0) \frac{\lambda _2}{\lambda _1+\lambda _2} \beta _2(z_1,z_2). \end{aligned}$$
(40)

The queue-length PGFs on the two right-hand sides are derived by Cohen [6], and thus we obtain \(\Pi _i(z_1,z_2)\), \(i=1,2\). This immediately leads to \(S^c_i(z_1,z_2)\), \(i=1,2\), as in Case 3. Subsequently Theorem 2 gives the PGF of the steady-state joint queue-length distribution at an arbitrary epoch. It should be noticed that it is not at all easy to obtain this PGF in another way, for this non-Markovian model; the priority for the longer queue model is a difficult queueing model. In the case of exponential service time distributions, with equal arrival and service rates at the two queues and \(\alpha _1=\alpha _2\), Zheng and Zipkin [20] present a recursive method to obtain this PGF, while Flatto [10] for this case (but allowing preemption) obtains the queue-length PGF by solving a boundary value problem.

Case 5: A simple network

Consider a network of m service facilities, with independent external Poisson arrival processes, and with continuous service time distributions. We have Markovian routing, a customer moving from \(Q_i\) to \(Q_k\) with probability \(p_{ik}\) and leaving the system after its service completion in \(Q_i\) with probability \(p_{i0}\), \(i,k \in J\). Define \(\Lambda _i\) as the total flow through \(Q_i\) per time unit, \(i \in J\); these \(\Lambda _i\) are the unique solution of the set of equations

$$\begin{aligned} \Lambda _i = \lambda _i + \sum _{k=1}^m \Lambda _k p_{ki} , ~~~ i \in J. \end{aligned}$$
(41)

Let \(A_i\) indicate that the system is viewed just before an arrival at \(Q_i\), \(D_i\) that the system is viewed just after a departure from \(Q_i\) and \(I_{ik}\) that the system is viewed just after a departure from \(Q_i\) and just before the arrival of the departing customer at \(Q_k\). Letting \({\varvec{j}} = (j_{1}, j_{2}, \ldots , j_{m})\), one can write down the following balance equations for the queue length vector \({\varvec{X}} = (X_{1}, X_{2}, \ldots , X_{m})\):

$$\begin{aligned}&\sum _{i=1}^m \lambda _i \mathbb {P}({\varvec{X}} = {\varvec{j}}|A_i) + \sum _{i=1}^m \Lambda _i p_{i0} \mathbb {P}({\varvec{X}} = {\varvec{j}} - {\varvec{e}}_{i}|D_i) \nonumber \\&\qquad + \sum _{i=1}^m \sum _{k=1}^m \Lambda _i p_{ik} \mathbb {P}({\varvec{X}} = {\varvec{j}} - {\varvec{e}}_{i}|I_{ik}) \nonumber \\&\quad = \sum _{i=1}^m \Lambda _i p_{i0} \mathbb {P}({\varvec{X}} = {\varvec{j}}|D_i) +\sum _{i=1}^m \lambda _i \mathbb {P}({\varvec{X}} = {\varvec{j}} - {\varvec{e}}_{i} |A_i) \nonumber \\&\qquad + \sum _{i=1}^m \sum _{k=1}^m \Lambda _i p_{ik} \mathbb {P}({\varvec{X}} = {\varvec{j}} - {\varvec{e}}_{k}|I_{ik}). \end{aligned}$$
(42)

The (PGF of the) probabilities, given that we observe just after a real departure from \(Q_i\) or that we observe just after a departure from \(Q_i\) that will in an instant result in an arrival at \(Q_k\), are obviously the same. If one takes PGFs, one quickly sees that a special case of (33) is obtained.

We now use (42) to provide an alternative proof for the joint queue-length distribution in a queueing network with a single roving server as studied in [2, 17]. Again consider a network of m queues with Markovian customer routing, as described above. In this particular example we assume that a single server visits the queues in a fixed, cyclic order, requiring a switchover time \(S_i\) to move from \(Q_i\) to \(Q_{i+1}\). We do not make any assumptions regarding the service disciplines at each queue. This model, which can be regarded as a polling model with customer routing, has been studied by Sidi, Levy and Fuhrmann [17], who refer to this model as a queueing network with a roving server. Sidi et al. obtain the joint queue-length distribution at arbitrary moments, as well as the joint queue-length distribution at departure epochs. The waiting-time distributions are obtained in a different paper [2]. For us it is slightly more convenient to refer to this latter paper in the analysis as described, because the authors in [2] use the same definition of \(V^c_i(\varvec{z})\), the PGF of the joint queue-length at departure epochs, just after a departure from \(Q_i\) and just before the arrival of the departing customer at the next queue.

Take the formulas (3.2)–(3.6) of [2]. From (3.2), which is the counterpart of our (2), one can express (in the notation of the present paper) the differences of PGFs at visit beginning and visit completion epochs into those at service beginning and service completion epochs:

$$\begin{aligned} \frac{ V^b_i(\varvec{z}) - V^c_i(\varvec{z})}{\Lambda _i\mathbb {E}C} = S^b_i(\varvec{z}) - S^c_i(\varvec{z}) P_i(\varvec{z}), \quad i=1,2,\ldots ,m. \end{aligned}$$
(43)

Here \(P_i(\varvec{z}) := p_{i0} + \sum _{k=1}^m p_{ik} z_k\), and \(\mathbb {E}C=s/(1-\rho )\) with \(\rho :=\sum _{i=1}^m\Lambda _i b_i\). Next, use our relation (3) to express \(S^b_i(\varvec{z})\) in terms of \(S^c_i(\varvec{z})\). Subsequently express \(L(\varvec{z})\), in (3.4) of [2], which is the counterpart of (1) above, in terms of differences \(V^b_i(\varvec{z}) - V^c_i(\varvec{z})\), as was also done in [4]. This gives

$$\begin{aligned} \sum _{i=1}^m \lambda _i(1-z_i) L(\varvec{z}) = \sum _{i=1}^m \Lambda _i (P_i(\varvec{z}) - z_i) S^c_i(\varvec{z}). \end{aligned}$$
(44)

This is indeed in agreement with (42): The left-hand side of (44) gives the first and the fifth term on (42). The last term on the right-hand side gives the second plus the third term in (42), once we realize that \(p_{i0}+\sum _{k=1}^m p_{ik} = 1\), and that the conditional probabilities both refer to a service completion in \(Q_i\), no matter whether the condition is \(D_i\) or \(I_{ik}\). The first term on the right-hand side gives the fourth plus fifth term in (42). One could argue that some results in [2] and [17] could have been derived faster by starting from (44).

6 Concluding remarks

This paper derives a distributional relationship, at different embedded epochs, for analyzing queues and their networks. As shown in Sect. 3, it has different forms according to the abstraction level of the model. This may both lead to new results and easier derivations of some known results. In Sect. 5 this is demonstrated for a few examples.

The relationship in Sect. 4 has a different nature than the rest of this paper because it does not require any stationarity of the processes of interest. Namely, it suggests that such an asymptotic relationship may enable us to obtain queueing characteristics with some error bounds, not assuming any stationarity condition. This is completely different from the standard analysis in queueing theory. Thus, it would be interesting to see whether it can yield useful results for the performance evaluation of queueing models. We leave this for future studies.