# Queuing Theory Is The Mathematical Study Commerce Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Queuing theory is the mathematical study of waiting lines, or queues. In queueing theory a model is constructed so that queue lengths and waiting times can be predicted.[1]

Queuing theory started with research by Anger Krarup Erlang when he created models to describe the Copenhagen telephone exchange. The ideas have since seen applications including telecommunications, traffic engineering, computing and the design of factories, shops, offices and hospitals.

http://jamia.bmj.com/content/16/4/516/F2.large.jpg

In the problem of queuing theory, there are several related processes, arriving at the back of the queue, waiting in the queue, and being served by the server. Some examples of such problems are:

• People choosing a line at a store.

• Packets arriving to a router/switch.

• Calls to a customer service center.

• People booking flights.

1 Some Definitions

• Service Mechanism: How customers get served.

• Service Discipline: Who gets served. eg.

FIFO - first in first out

LIFO - last in first out

Random

Prioritized

• Service Time: Time to complete 1 job in queue.

• Inter-arrival time: time between 2 arrivals.

• Queueing System Notation

We usually use the following notation, introduced by David G. Kendall.

a/b/c

a: Distribution of inter-arrival times.

b: Distribution of service times.

c: # of servers.

eg. M/M/1

M - Markovian/Exponential/Memoryless.

D - Deterministic/Degenerate/Constant

Ea - Erlang distance with parameter k.

G - general

Note that the Markovian implies an exponential , i.e.,

αe−αt t ≥ 0

fT (t) = 0 t ≤ 0

On the other hand, the Erlang distribution has two parameters k, and α. It follows,

fT (t) =

λk tk−1 e−αt

(k − 1)!

The Erlang distribution simplifies to an exponential distribution when the shape parameter k equals 1. The Erlang distribution is a special case of the Gamma distribution where the shape parameter k is an integer.

## • Queue length can be finite or infinite. Analysis is easier for the infinite case.

## • State - num. customers in system.

## • Buffer Length - num, customers waiting = state - (num. being served)

## • N(t) - num. customers at time t

## • Pn (t) - Probability that there are n customers at time t (given information about the time.

## • S = num. paralell servers

## • λn - mean arrival time when there are n in system.

## • µn - mean service rate when there are n in system

## • C - combined rate of completion.

## • If λn is constant it is called just λ when the service rate is constant per server.

## • Load/Utilization ρ = λ/µ:. Generally, if ρ < 1, then we can get stability in the system.

n=0• L - expected num. in system. L is equal to P∞

## nPn

## where Pn - the probability that n are in the system.

n=0• Lq - expected num. in queue P∞

## (n − s)Pn

## • W - expected waiting time

## • Wq - expected time in queue

## 2 Little's Law

Little's Law states that the average number of customers over some time interval is equal to their average arrival rate, multiplied by their average time in a stable system. Thus, the average number of customers is independent of the probability distributions requires no assumptions about the schedule according to which customers arrive or are serviced, or even whether they are served in the order in which they arrive. We have,

## L = λW

## Lq = λWq

If mean service is constant 1/µ for a ≥ 1 then W = Wq + 1/µ.

This means that if we have one of L,W ,Lq ,Wq we can calculate them all!!!

3 Common Assumptions

Arrivals follow an exponential distribution:

αe−αt t ≥ 0

fT (t)=

• Service Time: Time to complete 1 job in queue.

• Inter-arrival time: time between 2 arrivals.

• Queueing System Notation

We usually use the following notation, introduced by David G. Kendall.

a/b/c

a: Distribution of inter-arrival times.

b: Distribution of service times.

c: # of servers.

eg. M/M/1

M - Markovian/Exponential/Memoryless.

D - Deterministic/Degenerate/Constant

Ea - Erlang distance with parameter k.

G - general

Note that the Markovian implies an exponential , i.e.,

αe−αt t ≥ 0

fT (t) = 0 t ≤ 0

On the other hand, the Erlang distribution has two parameters k, and α. It follows,

fT (t) =

λk tk−1 e−αt

(k − 1)!

The Erlang distribution simplifies to an exponential distribution when the shape parameter k equals 1. The Erlang distribution is a special case of the Gamma distribution where the shape parameter k is an integer.

## • Queue length can be finite or infinite. Analysis is easier for the infinite case.

## • State - num. customers in system.

## • Buffer Length - num, customers waiting = state - (num. being served)

## • N(t) - num. customers at time t

## • Pn (t) - Probability that there are n customers at time t (given information about the time.

## • S = num. paralell servers

## • λn - mean arrival time when there are n in system.

## • µn - mean service rate when there are n in system

## • C - combined rate of completion.

## • If λn is constant it is called just λ when the service rate is constant per server.

## • Load/Utilization ρ = λ/µ:. Generally, if ρ < 1, then we can get stability in the system.

n=0• L - expected num. in system. L is equal to P∞

## nPn

## where Pn - the probability that n are in the system.

n=0• Lq - expected num. in queue P∞

## (n − s)Pn

## • W - expected waiting time

## • Wq - expected time in queue

## 2 Little's Law

Little's Law states that the average number of customers over some time interval is equal to their average arrival rate, multiplied by their average time in a stable system. Thus, the average number of customers is independent of the probability distributions requires no assumptions about the schedule according to which customers arrive or are serviced, or even whether they are served in the order in which they arrive. We have,

## L = λW

## Lq = λWq

If mean service is constant 1/µ for a ≥ 1 then W = Wq + 1/µ.

This means that if we have one of L,W ,Lq ,Wq we can calculate them all!!!

3 Common Assumptions

Arrivals follow an exponential distribution:

αe−αt t ≥ 0

fT (t)=

0 t ≤ 0

P (T ≤ t) = 1 − e−αt

P (T ≥ t) = e−αt

Z ∞

E(T ) =

tfT (t)dt = 1/α

0

var(t) = ET 2 − (ET )2 = 1/α2

Is this a reasonable model? Yes, for many systems such as phone calls and large shops. But not always.

4. Properties of exponential

P (T > t + 4t|T > t) =

## =

## =

## =

This implies that it does not matter how

long we have been waiting, hence state

information is very simple. We only need

to keep track of num. in the system.

P (T > 4t, T > t + 4t)

P (T > t)

P (T > t + 4t, T > t)

P (T > t)

P (T > t + 4t)

P (T > t)

e−α(t+4t)

e−αt

= e−α4t

= P (T > 4t)

Assumptions

• Independent Arrivals

• Exponential distribution

• Customers do not leave or change queues.

• Large queues do not discourage Customers.

Many assumptions are not; always true, but queuing theory gives good result anyway.

## Queuing Models

## Queuing systems are usually described by three values separated by slashes Arrival distribution / service distribution / # of servers

## Where:

## • M = Markova or exponentially distributed

## • D = Deterministic or constant.

## • G = General or binomial distribution

## a) What is the probability that customer X will complete service before customer Y?

By Property 2 of exponential distribution ( the lack-of-memory property) given in Sec. 17.4, when customer Y arrives, the remaining time until customer X completes , service has the same distribution as the service time for customer Y, so they are equally likely to finish first. Thus, the probability that customer X will complete service before customer Y is 0.5 .

## (b) What is the probability that customer Z will complete service before customer X?

Customer Z cannot begin service until either customer X or customers y compltes service. Given that customer Y completes service first ( which has probability 0.5 from part (a), then the reasoning to part (2) implies that the probability that a customer Z completes service before customer X is 0.5. Therefore, the unconditional probability that customer Z will complete before customer X is 0.5(0.5) = 0.25

## (c) What is the probability that customer Z will complete service before customer Y?

By the same reasoning as in part (b), the probability that customer Z will complete

Service before customer Y is 0.5(0.5) = 0.25.

## (d) Determine the cumulative distribution function of the waiting time in the system for customer X. Also determine the mean and standard deviation.

We are given that customer X has not completed service after 15 minutes. By Property

2, the remaining time until service is completed still has an exponential distribution

with a mean 9and standard deviation) of 15 minutes. Therefore, in units of minutes , CDF of the waiting time in the system for customer X is

P{T ≤ t} = .

Since the remaining time after 15 minutes has a mean and standard deviation of 15

Minutes, the mean of the total time is 15 + 15 = 30 minutes. The first 15 minutes are a

Fixed constant, so the standard deviation of the total time continues to be the standard

Deviation of the remaining time, namely, 15 minutes.

## (e) Repeat part (d) for customer Y.

The reasoning is the same as for part (d), except now the given time without completing

service is 10 minutes instead of 15 minutes.

P{T ≤ t} = .

The mean is 10 + 15 = 25 minutes and the standard deviation is 15 minutes.

## (f) Determine the expected value and standard deviation of the waiting time in the system for customer Z.

The waiting time in the system for customer Z is

W = W q

+ T,

where Wq

is the waiting time in the queue and T is the service time. The waiting time in

the queue is the time until either customer X or customer Y completes service after

customer Z arrives. By Properties 2 and 3 in Sec. 17.4, this time until either customer X

or customer Y completes service after customer Z arrives has an exponential

distribution with a mean (and standard deviation) of

Consequently, since E (T) = 15 minutes and Var (T) = (15)

E = = 7.5 minutes.

Consequently, since E (T) = 15 minutes and Var (T) = (15)2,

E() = E + E(T) = 7.5 + 15 = 22.5 minutes,

Var () = Var ( + T) = (7.5)2 + (15)2 = 281.25,

so the standard deviation of W is 281.25 = 16.77 minutes.

## (g) Determine the probability of exactly 2 more customers arriving during the next

15-minute interval.By Property 4 in Sec. 17.4, we can simply use the Poisson distribution with a mean of

By Property 4 in Sec. 17.4, we can simply use the Poisson distribution with a mean of

E{X(t)} = ï¡t = (15) = 1

to find the probability of 2 arrivals,

P{X(t) = 2} = = = 0.1839.

THANK YOU