Theoretical and Practical Notes on Vending Strategies

The paper deals with an application of theory of mass servicing on some cases in vending strategies. The aim of the paper is to show how the theory which is apparently applicable for scientific problems can also be utilised in practical use. First, the necessary theoretical background will have been done and then some examples applied on vending practises will be given.


Introduction
The theory of mass servicing is based on Markov's random processes.It can be applied in many scientific areas and technical and economical branches.Formulae of this theory derived for stable state are well known.They are used for calculation of service channels which can be cash desks in department stores, seats in canteens, work places in call centres or help desks, etc.The results of the theory in stable state are widely used in telecommunication praxis at dimensioning of communication channels and switching nodes and also in theory of reliability.But less known are the results of this theory in transition (non stable) state.Some examples can be taken from nuclear physic, biology and radio communication.The theory in transition state can also be applied on some economical processes and especially on vending practises as well.

Theoratical Backgrond
Formula for the full probability is fundamental for our further consideration: Here { } P A is the probability of an appearance A that can only occur together with appearances j A , which create the full set of mutually excluding appearances and therefore the sum of their probabilities { } j P A for all 1 2 j , , ,n =  must be equal 1. { } j P A A is the condi- tional probability with which the appearance A occurs together with one of the appearances j A .Let's consider a system containing elements that gradually and randomly leave the system until it gets empty.

Let denote:
n -initial number of elements in the system, τ -average time an element stays in the system, µ -number of elements having left the system during a time unit, t -time, ( ) k p t t + ∆ -probability the system will contain k elements in a future time t t + ∆ , ( ) j p t -probability the system contains j elements in a time t, ( ) j ,k p t ∆ -conditional probability the system transits from j elements to k elements within an arbitrary short time interval 0 t ∆ → .There are only 2 possibilities how the system can get into the state with k elements in a future time t + ∆t: either no element leaves the system containing k elements during ∆t the probability of which is ( ) k ,k p t ∆ or just 1 element leaves the system containing k + 1 elements during ∆t the probability of which is ( ) That means no more than 1 change is allowed during 0 t ∆ → .Issuing from the formula for the full probability (1), we can write for the considered system: ( ) ( ) When the system contains k elements in a time t and it shall stay in the same state in time t t ∆ + , no element must leave the system during time interval ∆t, the probability of which is: where ∆ as only 1 element may leave the system during 0 t ∆ → .Now we can return to Equation ( 2) having put Equations ( 3) and ( 4) into it: We obtained the system of n + 1 differential equations.To solve this system, the next operations will be applied on it: The term ( ) ( ) is called the generation function.Applying it on Equation (7) we obtain the next partial differential equation: And finally: It is the linear homogenous partial differential equation of type: which can be transferred to solution of the common differential Equation (1): ( ) ( ) ( ) ( ) ( ) ( ) Here * c , c are arbitrary integration constants.Then any function made from Equation ( 18) is solution of Equation (10), too: ( ) ( ) and also from (8): as on the beginning when t = 0, the system contained all n elements the probability of which is 1.
Replacing constant c in (18) by ( 20) we obtain an arbitrary function made from (18): And then: Comparing the result from Equation (23) with generation Function (8) we obtain: (24) Equation ( 24) is the Bernoulli distribution and represents the probability that the system contains k elements in a time t when there were n elements in the system in the time t = 0.
The relation between µ and τ is: and so Equation ( 24) can also be written as: ( ) The system will contain all elements with probability: The system will contain no element with probability: ( ) And there will be at least 1 element in the system with probability: ( ) ( ) When the assumption under which Equations ( 3) and (4) were set are kept, the exponential law is valid for the probability which an element stays in the system with.
The time t = T until the system gets empty with the probability p 0 (T) = P 0 can be expressed from Equation (28): The initial number of elements that can be in the system in order that the system shall get empty with a probability P 0 within a time T can be calculated from Equation (28), too: The probability p(t) in (30) can be understood as the ratio of the number of elements, k staying in the system in a time t to the number of all elements, n, theoretically on condition if the number of all elements, n is infinite: As this number can never be infinite, a relative number of elements staying in the system [the statistical value of probability p(t)] must be considered:

Ordering of Goods
The task is to find out how often (in which time periods, T) goods shall be ordered or shelves completed with goods.The answer gives Equation (31) where τ is the average time goods stays on stock or in shelves and P 0 is the supposed probability that stock or shelves get empty.An example: when the initial number of goods on stock or in a shelf is 30, then it will do with the probability 0.99 when goods are ordered or added in the shelf in time intervals 8-times longer than the average time goods stay on stock or in shelves is (see Figure 1).

After Closing Time
Formula (31) and Figure 1 can also be applied on the case when there are still clients in a shop in time of the close hour.The cash desk(s) must be open a certain time, T after the closing hour.Again an example: when there are still 30 clients waiting at the cash desk in the shop after the closing hour, the cash desk will have to be opened with the probability P 0 = 0.99 8-times longer than the average service at the cash desk lasts.If this average service time lasts for example 1 minute, the cash desk will still have to be opened 8 minutes more in order to serve all waiting clients.When there are c cash desks, the service will be c-times shorter.

Number of Goods on Stock
The task is to determine how many goods, n may be on stock in order that all goods could be sold out within a given time, T with the supposed probability P 0 .Formula (32) which is the inverse one to Formula (31) and again Figure 1 can be used for this purpose.An example: when goods shall be sold out with the probability P 0 = 0.99 during a guarantee time, T which is 8-times longer than the average time goods stays in shelves, then maximum 30 peaces of goods may stay in shelves.

Vending Losses
When t = T is the guarantee time, Formula (34) can be considered for vending losses.For instance, when the guarantee time is 7-times longer than the average time goods stay on stock, average vending losses will be 0.09% as indicates Figure 2.

Discussion
It is important to realize that the probability measure  (transition probability) of the decrease of the number of elements in the system is proportional to the number of elements still being in the system.This fact implies to the time function governed by the exponential law.Should this fundamental presumption not be fulfilled, the derived equations could not be used.But this could only happen in exeptional situations, e.g. when a department store would experience a run by many people.