performance evaluation of network systems · 2008. 8. 19. · contents 3 3.8 interearrival time . ....

86
Performance Evaluation of Network Systems Hiroshi Toyoizumi 1 August 19, 2008 1 This handout is available at http://www.f.waseda.jp/toyoizumi.

Upload: others

Post on 13-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Performance Evaluation of Network Systems

Hiroshi Toyoizumi 1

August 19, 2008

1This handout is available at http://www.f.waseda.jp/toyoizumi.

Page 2: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Contents

1 Basics in Probability Theory 31.1 Why Probability? . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Probability Space . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Conditional Probability and Independence . . . . . . . . . . . . . 51.4 Random Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 71.5 Expectation, Variance and Standard Deviation . . . . . . . . . . . 91.6 How to Make a Random Variable . . . . . . . . . . . . . . . . . . 111.7 News-vendor Problem, “How many should you buy?” . . . . . . . 121.8 Covariance and Correlation . . . . . . . . . . . . . . . . . . . . . 131.9 Value at Risk . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.10 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2 Markov chain 192.1 Discrete-time Markov chain . . . . . . . . . . . . . . . . . . . . 192.2 Stationary State . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.3 Matrix Representation . . . . . . . . . . . . . . . . . . . . . . . 212.4 Stock Price Dynamics Evaluation Based on Markov Chain . . . . 212.5 Google’s PageRank and Markov Chain . . . . . . . . . . . . . . . 22

3 Birth and Death process and Poisson Process 263.1 Definition of Birth and Death Process . . . . . . . . . . . . . . . 263.2 Infinitesimal Generator . . . . . . . . . . . . . . . . . . . . . . . 273.3 System Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . 273.4 Poisson Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.5 Why we use Poisson process? . . . . . . . . . . . . . . . . . . . 283.6 Z-trnasform of Poisson process . . . . . . . . . . . . . . . . . . . 293.7 Independent Increment . . . . . . . . . . . . . . . . . . . . . . . 29

2

Page 3: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

CONTENTS 3

3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 303.9 Memory-less property of Poisson process . . . . . . . . . . . . . 303.10 PASTA: Poisson Arrival See Time Average . . . . . . . . . . . . 303.11 Excercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4 Introduction of Queueing Systems 324.1 Foundation of Performance Evaluation . . . . . . . . . . . . . . . 324.2 Starbucks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.3 Specification of queueing systems . . . . . . . . . . . . . . . . . 334.4 Little’s formula . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.5 Lindley equation and Loynes variable . . . . . . . . . . . . . . . 364.6 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5 M/M/1 queue 395.1 M/M/1 queue as a birth and death process . . . . . . . . . . . . . 395.2 Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.3 Waiting Time Estimation . . . . . . . . . . . . . . . . . . . . . . 40

5.3.1 Waiting Time by Little‘s Formula . . . . . . . . . . . . . 415.3.2 Waiting Time Distribution of M/M/1 Queues . . . . . . . 41

5.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.5 Excercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

6 Reversibility 446.1 Output from Queue . . . . . . . . . . . . . . . . . . . . . . . . . 446.2 Reversibibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

6.2.1 Definition of Reversibility . . . . . . . . . . . . . . . . . 446.2.2 Local Balance for Markov Chain . . . . . . . . . . . . . . 44

6.3 Output from M/M/1 queue . . . . . . . . . . . . . . . . . . . . . 466.4 Excercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

7 Network of Queues 477.1 Open Network of queues . . . . . . . . . . . . . . . . . . . . . . 477.2 Global Balance of Network . . . . . . . . . . . . . . . . . . . . . 477.3 Traffic Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . 487.4 Product Form Solution . . . . . . . . . . . . . . . . . . . . . . . 487.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Page 4: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

4 CONTENTS

8 Examples of Queueing System Comparison 518.1 Single Server vs Tandem Servers . . . . . . . . . . . . . . . . . . 518.2 M/M/2 queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528.3 M/M/1 VS M/M/2 . . . . . . . . . . . . . . . . . . . . . . . . 538.4 Two M/M/1 VS One M/M/2 . . . . . . . . . . . . . . . . . . . 548.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

9 Classical Queueing Theory 569.1 Birth and Death process . . . . . . . . . . . . . . . . . . . . . . . 56

9.1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 569.1.2 Infinitesimal Generator . . . . . . . . . . . . . . . . . . . 569.1.3 System equation . . . . . . . . . . . . . . . . . . . . . . 57

9.2 Poisson Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 579.3 Features of Poisson Process . . . . . . . . . . . . . . . . . . . . . 58

9.3.1 Why we use Poisson process? . . . . . . . . . . . . . . . 589.3.2 Z-trnasform of Poisson process . . . . . . . . . . . . . . 599.3.3 Independent Increment . . . . . . . . . . . . . . . . . . . 599.3.4 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . 599.3.5 Memory-less property . . . . . . . . . . . . . . . . . . . 59

9.4 M/M/1 queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609.4.1 M/M/1 queue as a birth and death process . . . . . . . . 60

9.5 The Limit of the Traditional Queueing Theory . . . . . . . . . . . 619.6 Excercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

10 Basic of (σ ,ρ)-algebra 6310.1 Traffic Characterization . . . . . . . . . . . . . . . . . . . . . . . 6310.2 Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6310.3 Work Conserving Link . . . . . . . . . . . . . . . . . . . . . . . 6410.4 Excersize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

11 Performance Bound Using (σ ,ρ)-algebra 6611.1 Queue Length and Delay . . . . . . . . . . . . . . . . . . . . . . 6611.2 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6711.3 Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6911.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Page 5: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

CONTENTS 5

12 Example of (σ ,ρ)-algebra 7012.1 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7012.2 Example : Tandem Router . . . . . . . . . . . . . . . . . . . . . 7012.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

13 (min,+)-algebra 7313.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7313.2 Algebra of Functions . . . . . . . . . . . . . . . . . . . . . . . . 7413.3 Subadditive Constraint . . . . . . . . . . . . . . . . . . . . . . . 7513.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

14 Subadditive Closure and Traffic Regulation 7814.1 Algebra for Subadditive Closure . . . . . . . . . . . . . . . . . . 7814.2 Traffice Regulation . . . . . . . . . . . . . . . . . . . . . . . . . 7914.3 Maximal f -regulator . . . . . . . . . . . . . . . . . . . . . . . . 8014.4 Excercize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

15 Performanece Bounds using (min,+) algebra 8115.1 Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8115.2 Performance Bounds . . . . . . . . . . . . . . . . . . . . . . . . 8215.3 Excercize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

16 Bibliography 83

Page 6: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 1

Basics in Probability Theory

1.1 Why Probability?Example 1.1. Here’s examples where we use probability:

• Lottery.

• Weathers forecast.

• Gamble.

• Baseball,

• Life insurance.

• Finance.

Problem 1.1. Name a couple of other examples you could use probability theory.

Since our intuition sometimes leads us mistake in those random phenomena,we need to handle them using extreme care in rigorous mathematical framework,called probability theory. (See Exercise 1.1).

1.2 Probability SpaceBe patient to learn the basic terminology in probability theory. To determine theprobabilistic structure, we need a probability space, which is consisted by a sam-ple space, a probability measure and a family of (good) set of events.

6

Page 7: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.2. PROBABILITY SPACE 7

Definition 1.1 (Sample Space). The set of all events is called sample space, andwe write it as Ω. Each element ω ∈Ω is called an event.

Example 1.2 (Lottery). Here’s an example of Lottery.

• The sample space Ω is first prize, second prize,..., lose.

• An event ω can be first prize, second prize,..., lose, and so on.

Sometimes, it is easy to use sets of events in sample space Ω.

Example 1.3 (Sets in Lottery). The following is an example in Ω of Example 1.2.

W = win= first prize, second prize,..., sixth prize (1.1)L = lose (1.2)

Thus, we can say that “what is the probability of win?”, instead of saying“what is the probability that we have either first prize, second prize,..., or sixthprize?”.

Definition 1.1 (Probability measure). The probability of A, P(A), is defined foreach set of the sample space Ω, if the followings are satisfyed:

1. 0≤ P(A)≤ 1 for all A⊂Ω.

2. P(Ω) = 1.

3. For any sequence of mutually exclusive A1,A2...

P(∞⋃

i=1

Ai) =∞

∑i=1

P(Ai). (1.3)

In addition, P is said to be the probability measure on Ω. The third conditionguarantees the practical calculation on probability.

Mathematically, all function f which satisfies Definition 1.1 can regarded asprobability. In other words, we need to be careful to select which function issuitable for probability.

Page 8: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

8 CHAPTER 1. BASICS IN PROBABILITY THEORY

Example 1.4 (Probability Measures in Lottery). Suppose we have a lottery suchas 10 first prizes, 20 second prizes · · · 60 sixth prizes out of total 1000 tickets,then we have a probability measure P defined by

P(n) = P(win n-th prize) =n

100(1.4)

P(0) = P(lose) =79100

. (1.5)

It is easy to see that P satisfies Definition 1.1. According to the definition P, wecan calculate the probability on a set of events:

P(W ) = the probability of win= P(1)+P(2)+ · · ·+P(6)

=21100

.

Of course, you can cheat your customer by saying you have 100 first prizesinstead of 10 first prizes. Then your customer might have a different P satisfyingDefinition 1.1. Thus it is pretty important to select an appropriate probabilitymeasure. Selecting the probability measure is a bridge between physical worldand mathematical world. Don’t use wrong bridge!

Remark 1.1. There is a more rigorous way to define the probability measure. In-deed, Definition 1.1 is NOT mathematically satisfactory in some cases. If you arefamiliar with measure theory and advanced integral theory, you may proceed toread [?].

1.3 Conditional Probability and IndependenceNow we introduce one of the most uselful and probably most difficult concepts ofprobability theory.

Definition 1.2 (Conditional Probability). Define the probability of B given A by

P(B | A) =P(B & A)

P(A)=

P(B∩A)P(A)

. (1.6)

We can use the conditional probability to calculate complex probability. It isactually the only tool we can rely on. Be sure that the conditional probabilityP(B|A) is different with the regular probability P(B).

Page 9: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.3. CONDITIONAL PROBABILITY AND INDEPENDENCE 9

Example 1.5 (Lottery). Let W = win and F = first prize in Example 1.4.Then we have the conditional probability that

P(F |W ) = the probability of winning 1st prize given you win the lottery

=P(F ∩W )

P(W )=

P(F)P(W )

=10/1000

210/1000=

121

6= 101000

= P(F).

Remark 1.2. Sometimes, we may regard Definition 1.2 as a theorem and callBayse rule. But here we use this as a definition of conditional probability.

Problem 1.2 (False positives1). Answer the followings:

1. Suppose there are illegal acts in one in 10000 companies on the average.You as a accountant audit companies. The auditing contains some uncer-tainty. There is a 1% chance that a normal company is declared to havesome problem. Find the probability that the company declared to have aproblem is actually illegal.

2. Suppose you are tested by a disease that strikes 1/1000 population. Thistest has 5% false positives, that mean even if you are not affected by thisdisease, you have 5% chance to be diagnosed to be suffered by it. A medicaloperation will cure the disease, but of course there is a mis-operation. Giventhat your result is positive, what can you say about your situation?

Definition 1.3 (Independence). Two sets of events A and B are said to be indepen-dent if

P(A&B) = P(A∩B) = P(A)P(B) (1.7)

Theorem 1.1 (Conditional of Probability of Independent Events). Suppose A andB are independent, then the conditional probability of B given A is equal to theprobability of B.

1Modified from [?, p.207].

Page 10: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

10 CHAPTER 1. BASICS IN PROBABILITY THEORY

Proof. By Definition 1.2, we have

P(B | A) =P(B∩A)

P(A)=

P(B)P(A)P(A)

= P(B),

where we used A and B are independent.

Example 1.6 (Independent two dices). Of course two dices are independent. So

P(The number on the first dice is even while the one on the second is odd)= P(The number on the first dice is even)P(The number on the second dice is odd)

=12· 1

2.

Example 1.7 (More on two dice). Even though the two dices are independent,you can find dependent events. For example,

P(The first dice is bigger than second dice even while the one on the second is even) =?

How about the following?

P(The sum of two dice is even while the one on the second is odd ) =?.

See Exercise 1.4 for the detail.

1.4 Random VariablesThe name random variable has a strange and stochastic history2. Although itsfragile history, the invention of random variable certainly contribute a lot to theprobability theory.

Definition 1.4 (Random Variable). The random variable X = X(ω) is a real-valued function on Ω, whose value is assigned to each outcome of the experiment(event).

2J. Doob quoted in Statistical Science. (One of the great probabilists who established probabil-ity as a branch of mathematics.) While writing my book [Stochastic Processes] I had an argumentwith Feller. He asserted that everyone said “random variable” and I asserted that everyone said“chance variable.” We obviously had to use the same name in our books, so we decided the issueby a stochastic procedure. That is, we tossed for it and he won.

Page 11: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.4. RANDOM VARIABLES 11

Remark 1.3. Note that probability and random variables is NOT same! Randomvariables are function of events while the probability is a number. To avoid theconfusion, we usually use the capital letter to random variables.

Example 1.8 (Lottery). A random variable X can be designed to formulate a lot-tery.

• X = 1, when we get the first prize.

• X = 2, when we get the second prize.

Example 1.9 (Bernouilli random variable). Let X be a random variable with

X =

1 with probability p.0 with probability 1− p.

(1.8)

for some p ∈ [0,1]. The random variable X is said to be a Bernouilli randomvariable. Coin toss is a typical example of Bernouilli random variable with p =1/2.

Sometimes we use random variables to indicate the set of events. For example,instead of saying the set that we win first prize, we write as ω ∈Ω : X(ω) = 1,or simply X = 1.

Definition 1.5 (Probability distribution). The probability distribution function F(x)is defined by

F(x) = PX ≤ x. (1.9)

The probability distribution function fully-determines the probability structureof a random variable X . Sometimes, it is convenient to consider the probabilitydensity function instead of the probability distribution.

Definition 1.6 (probability density function). The probability density functionf (t) is defined by

f (x) =dF(x)

dx=

dPX ≤ xdx

. (1.10)

Sometimes we use dF(x) = dPX ≤ x= P(X ∈ (x,x+dx]) even when F(x)has no derivative.

Page 12: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

12 CHAPTER 1. BASICS IN PROBABILITY THEORY

Lemma 1.1. For a (good) set A,

PX ∈ A=∫

AdPX ≤ x=

∫A

f (x)dx. (1.11)

Problem 1.3. Let X be an uniformly-distributed random variable on [100,200].Then the distribution function is

F(x) = PX ≤ x=x−100

100, (1.12)

for x ∈ [100,200].

• Draw the graph of F(x).

• Find the probability function f (x).

1.5 Expectation, Variance and Standard DeviationLet X be a random variable. Then, we have some basic tools to evaluate randomvariable X . First we have the most important measure, the expectation or mean ofX .

Definition 1.7 (Expectation).

E[X ] =∫

−∞

xdPX ≤ x=∫

−∞

x f (x)dx. (1.13)

Remark 1.4. For a discrete random variable, we can rewrite (1.13) as

E[X ] = ∑n

xnP[X = xn]. (1.14)

Lemma 1.2. Let (Xn)n=1,...,N be the sequence of possibly correlated random vari-ables. Then we can change the order of summation and the expectation.

E[X1 + · · ·+XN ] = E[X1]+ · · ·+E[XN ] (1.15)

Proof. See Exercise 1.6.

E[X ] gives you the expected value of X , but X is fluctuated around E[X ]. Sowe need to measure the strength of this stochastic fluctuation. The natural choicemay be X −E[X ]. Unfortunately, the expectation of X −E[X ] is always equal tozero (why?). Thus, we need the variance of X , which is indeed the second momentaround E[X ].

Page 13: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.5. EXPECTATION, VARIANCE AND STANDARD DEVIATION 13

Definition 1.8 (Variance).

Var[X ] = E[(X −E[X ])2]. (1.16)

Lemma 1.3. We have an alternative to calculate Var[X ],

Var[X ] = E[X2]−E[X ]2. (1.17)

Proof. See Exercise 1.6.

Unfortunately, the variance Var[X ] has the dimension of X2. So, in some cases,it is inappropriate to use the variance. Thus, we need the standard deviation σ [X ]which has the order of X .

Definition 1.9 (Standard deviation).

σ [X ] = (Var[X ])1/2. (1.18)

Example 1.10 (Bernouilli random variable). Let X be a Bernouilli random vari-able with P[X = 1] = p and P[X = 0] = 1− p. Then we have

E[X ] = 1p+0(1− p) = p. (1.19)

Var[X ] = E[X2]−E[X ]2 = E[X ]−E[X ]2 = p(1− p), (1.20)

where we used the fact X2 = X for Bernouille random variables.

In many cases, we need to deal with two or more random variables. Whenthese random variables are independent, we are very lucky and we can get manyuseful result. Otherwise...

Definition 1.2. We say that two random variables X and Y are independent whenthe sets X ≤ x and Y ≤ y are independent for all x and y. In other words,when X and Y are independent,

P(X ≤ x,Y ≤ y) = P(X ≤ x)P(Y ≤ y) (1.21)

Lemma 1.4. For any pair of independent random variables X and Y , we have

• E[XY ] = E[X ]E[Y ].

• Var[X +Y ] = Var[X ]+Var[Y ].

Page 14: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

14 CHAPTER 1. BASICS IN PROBABILITY THEORY

Proof. Extending the definition of the expectation, we have a double integral,

E[XY ] =∫

xydP(X ≤ x,Y ≤ y).

Since X and Y are independent, we have P(X ≤ x,Y ≤ y) = P(X ≤ x)P(Y ≤ y).Thus,

E[XY ] =∫

xydP(X ≤ x)dP(Y ≤ y)

=∫

xdP(X ≤ x)∫

ydP(X ≤ y)

= E[X ]E[Y ].

Using the first part, it is easy to check the second part (see Exercise 1.9.)

Example 1.11 (Binomial random variable). Let X be a random variable with

X =n

∑i=1

Xi, (1.22)

where Xi are independent Bernouilli random variables with the mean p. The ran-dom variable X is said to be a Binomial random variable. The mean and varianceof X can be obtained easily by using Lemma 1.4 as

E[X ] = np, (1.23)Var[X ] = np(1− p). (1.24)

1.6 How to Make a Random VariableSuppose we would like to simulate a random variable X which has a distributionF(x). The following theorem will help us.

Theorem 1.2. Let U be a random variable which has a uniform distribution on[0,1], i.e

P[U ≤ u] = u. (1.25)

Then, the random variable X = F−1(U) has the distribution F(x).

Proof.

P[X ≤ x] = P[F−1(U)≤ x] = P[U ≤ F(x)] = F(x). (1.26)

Page 15: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.7. NEWS-VENDOR PROBLEM, “HOW MANY SHOULD YOU BUY?” 15

1.7 News-vendor Problem, “How many should youbuy?”

Suppose you are assigned to sell newspapers. Every morning you buy in x newspa-pers at the price a. You can sell the newspaper at the price a+b to your customers.You should decide the number x of newspapers to buy in. If the number of thosewho buy newspaper is less than x, you will be left with piles of unsold newspa-pers. When there are more buyers than x, you lost the opportunity of selling morenewspapers. Thus, there seems to be an optimal x to maximize your profit.

Let X be the demand of newspapers, which is not known when you buy innewspapers. Suppose you buy x newspapers and check if it is profitable whenyou buy the additional ∆x newspapers. If the demand X is larger than x +∆x, theadditional newspapers will pay off and you get b∆x, but if X is smaller than x+∆x,you will lose a∆x. Thus, the expected additional profit is

E[profit from additional ∆x newspapers]= b∆xPX ≥ x+∆x−a∆xPX ≤ x+∆x= b∆x− (a+b)∆xPX ≤ x+∆x.

Whenever this is positive, you should increase the stock, thus the optimum stockx should satisfy the equilibrium equation;

PX ≤ x+∆x=b

a+b, (1.27)

for all ∆x > 0. Letting ∆x→ 0, we have

PX ≤ x=b

a+b, (1.28)

Using the distribution function F(x) = PX ≤ x and its inverse F−1, we have

x = F−1(

ba+b

). (1.29)

Using this x, we can maximize the profit of news-vendors.

Problem 1.4. Suppose you are a newspaper vender. You buy a newspaper at theprice of 70 and sell it at 100. The demand X has the following uniform distribu-tion,

PX ≤ x=x−100

100, (1.30)

for x ∈ [100,200]. Find the optimal stock for you.

Page 16: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

16 CHAPTER 1. BASICS IN PROBABILITY THEORY

1.8 Covariance and CorrelationWhen we have two or more random variables, it is natural to consider the relationof these random variables. But how? The answer is the following:

Definition 1.10 (Covariance). Let X and Y be two (possibly not independent)random variables. Define the covariance of X and Y by

Cov[X ,Y ] = E[(X −E[X ])(Y −E[Y ])]. (1.31)

Thus, the covariance measures the multiplication of the fluctuations aroundtheir mean. If the fluctuations are tends to be the same direction, we have largercovariance.

Example 1.12 (The covariance of a pair of indepnedent random variables). LetX1 and X2 be the independent random variables. The covariance of X1 and X2 is

Cov[X1,X2] = E[X1X2]−E[X1]E[X2] = 0,

since X1 and X2 are independent. Thus, more generally, if the two random vari-ables are independent, their covariance is zero. (The converse is not always true.Give some example!)

Now, let Y = X1 +X2. How about the covariance of X1 and Y ?

Cov[X1,Y ] = E[X1Y ]−E[X1]E[Y ]= E[X1(X1 +X2)]−E[X1]E[X1 +X2]

= E[X21 ]−E[X1]2

= Var[X1] = np(1− p) > 0.

Thus, the covariance of X1 and Y is positive as can be expected.

It is easy to see that we have

Cov[X ,Y ] = E[XY ]−E[X ]E[Y ], (1.32)

which is sometimes useful for calculation. Unfortunately, the covariance has theorder of XY , which is not convenience to compare the strength among differentpair of random variables. Don’t worry, we have the correlation function, which isnormalized by standard deviations.

Page 17: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.9. VALUE AT RISK 17

Definition 1.11 (Correlation). Let X and Y be two (possibly not independent)random variables. Define the correlation of X and Y by

ρ[X ,Y ] =Cov[X ,Y ]σ [X ]σ [Y ]

. (1.33)

Lemma 1.5. For any pair of random variables, we have

−1≤ ρ[X ,Y ]≤ 1. (1.34)

Proof. See Exercise 1.11

1.9 Value at RiskSuppose we have one stock with its current value x0. The value of the stockfluctuates. Let X1 be the value of this stock tomorrow. The rate of return R can bedefined by

R =X1− x0

x0. (1.35)

The rate of return R can be positive or negative. We assume R is normally dis-tributed with its mean µ and σ .

Problem 1.5. Why did the rate of return R assume to be a normal random variable,instead of the stock price X1 itself.

We need to evaluate the uncertain risk of this future stock.

Definition 1.12 (Value at Risk). The future risk of a property can be evaluated byValue at Risk (VaR) zα , the decrease of the value of the property in the worst casewhich has the probability α , or

PX1− x0 ≥−zα= α, (1.36)

or

Pzα ≥ x0−X1= α. (1.37)

In short, our damage is limited to zα with the probability α .

Page 18: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

18 CHAPTER 1. BASICS IN PROBABILITY THEORY

Figure 1.1: VaR: adopted form http://www.nomura.co.jp/terms/english/v/var.html

By the definition of rate of return (1.35), we have

P

R≥−zα

x0

= α, (1.38)

or

P

R≤−zα

x0

= 1−α. (1.39)

Since R is assumed to be normal random variable, using the fact that

Z =R−µ

σ, (1.40)

is a standard normal random variable, where µ = E[R], and σ =√

Var[R], wehave

1−α = P

R≤−zα

x0

= P

Z ≤ −zα/x0−µ

σ

. (1.41)

Page 19: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.9. VALUE AT RISK 19

Since the distribution function of standard normal random variable is symmetric,we have

α = P

Z ≤ zα/x0 + µ

σ

(1.42)

Set xα as

α = PZ ≤ xα , (1.43)

or

xα = F−1 (α) , (1.44)

which can be found in any standard statistics text book. From (1.42) we have

zα/x0 + µ

σ= xα , (1.45)

or

zα = x0(F−1 (α)σ −µ). (1.46)

Now consider the case when we have n stocks on our portfolio. Each stockshave the rate of return at one day as,

(R1,R2, . . . ,Rn). (1.47)

Thus, the return rate of our portfolio R is estimated by,

R = c1R1 + c2R2 + · · ·+ cnRn, (1.48)

where ci is the number of stocks i in our portfolio.Let q0 be the value of the portfolio today, and Q1 be the one for tomorrow.

The value at risk (VaR) Zα of our portfolio is given by

PQ1−q0 ≥−zα= α. (1.49)

We need to evaluate E[R] and Var[R]. It is tempting to assume that R is anormal random variable with

µ = E[R] =n

∑i=1

E[Ri], (1.50)

σ2 = Var[R] =

n

∑i=1

Var[Ri]. (1.51)

Page 20: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

20 CHAPTER 1. BASICS IN PROBABILITY THEORY

This is true if R1, . . . ,Rn are independent. Generally, there may be some correla-tion among the stocks in portfolio. If we neglect it, it would cause underestimateof the risk.

We assume the vectore

(R1,R2, . . . ,Rn), (1.52)

is the multivariate normal random variable, and the estimated rate of return of ourportfolio R turns out to be a normal random variable again[?, p.7].

Problem 1.6. Estimate Var[R] when we have only two different stocks, i.e., R =R1 +R2, using ρ[R1,R2] defined in (1.33).

Using µ and σ of the overall rate of return R, we can evaluate the VaR Zα justlike (1.46).

1.10 ReferencesThere are many good books which useful to learn basic theory of probability. Thebook [?] is one of the most cost-effective book who wants to learn the basicapplied probability featuring Markov chains. It has a quite good style of writing.Those who want more rigorous mathematical frame work can select [?] for theirstarting point. If you want directly dive into the topic like stochatic integral, yourchoice is maybe [?].

1.11 ExercisesExercise 1.1. Find an example that our intuition leads to mistake in random phe-nomena.

Exercise 1.2. Define a probability space according to the following steps.

1. Take one random phenomena, and describe its sample space, events andprobability measure

2. Define a random variable of above phenomena

3. Derive the probability function and the probability density.

Page 21: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

1.11. EXERCISES 21

4. Give a couple of examples of set of events.

Exercise 1.3. Explain the meaning of (1.3) using Example 1.2

Exercise 1.4. Check P defined in Example 1.4 satisfies Definition 1.1.

Exercise 1.5. Calculate the both side of Example 1.7. Check that these events aredependent and explain why.

Exercise 1.6. Prove Lemma 1.2 and 1.3 using Definition 1.7.

Exercise 1.7. Prove Lemma 1.4.

Exercise 1.8. Let X be the Bernouilli random variable with its parameter p. Drawthe graph of E[X ], Var[X ], σ [X ] against p. How can you evaluate X?

Exercise 1.9. Prove Var[X +Y ] = Var[X ] +Var[Y ] for any pair of independentrandom variables X and Y .

Exercise 1.10 (Binomial random variable). Let X be a random variable with

X =n

∑i=1

Xi, (1.53)

where Xi are independent Bernouilli random variables with the mean p. The ran-dom variable X is said to be a Binomial random variable. Find the mean andvariance of X .

Exercise 1.11. Prove for any pair of random variables, we have

−1≤ ρ[X ,Y ]≤ 1. (1.54)

Page 22: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 2

Markov chain

Markov chain is one of the most basic tools to investigate dynamical features ofstochastic phenomena. Roughly speaking, Markov chain is used for any stochasticprocesses for first-order approximation.

Definition 2.1 (Rough definition of Markov Process). A stochastic process X(t)is said to be a Markov chain, when the future dynamics depends probabilisticallyonly on the current state (or position), not depend on the past trajectory.

Example 2.1. The followings are examples of Markov chains.

• Stock price

• Brownian motion

• Queue length at ATM

• Stock quantity in storage

• Genes in genome

• Population

• Traffic on the internet

2.1 Discrete-time Markov chainDefinition 2.1 (discrete-time Markov chain). (Xn) is said to be a discrete-timeMarkov chain if

22

Page 23: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

2.2. STATIONARY STATE 23

• state space is at most countable,

• state transition is only at discrete instance,

and the dynamics is probabilistically depend only on its current position, i.e.,

P[Xn+1 = xn+1|Xn = xn, ...,X1 = x1] = P[Xn+1 = xn+1|Xn = xn]. (2.1)

Definition 2.2 ((time-homogenous) 1-step transition probability).

pi j ≡ P[Xn+1 = j | Xn = i]. (2.2)

The probability that the next state is j, assuming the current state is in i.

Similarly, we can define the m-step transition probability:

pmi j ≡ P[Xn+m = j | Xn = i]. (2.3)

We can always calculate m-step transition probability by

pmi j = ∑

kpm−1

ik pk j. (2.4)

2.2 Stationary StateThe initial distribution: the probability distribution of the initial state. The initialstate can be decided on the consequence of tossing a dice...

Definition 2.3 (Stationary distribution). The probability distribution π j is said tobe a stationary distribution, when the future state probability distribution is alsoπ j if the initial distribution is π j.

PX0 = j= π j =⇒ PXn = j= π j (2.5)

In Markov chain analysis, to find the stationary distribution is quite important.If we find the stationary distribution, we almost finish the analysis.

Remark 2.1. Some Markov chain does not have the stationary distribution. In or-der to have the stationary distribution, we need Markov chains to be irreducible,positive recurrent. See [?, Chapter 4]. In case of finite state space, Markov chainhave the stationary distribution when all state can be visited with a positive prob-ability.

Page 24: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

24 CHAPTER 2. MARKOV CHAIN

2.3 Matrix RepresentationDefinition 2.4 (Transition (Probabitliy) Matrix).

P≡

p11 p12 . . . p1mp21 p22 . . . p2m...

... . . . ...pm1 pm2 . . . pmm

(2.6)

The matrix of the probability that a state i to another state j.

Definition 2.5 (State probability vector at time n).

π(n)≡ (π1(n),π2(n), ...) (2.7)

πi(n) = P[Xn = i] is the probability that the state is i at time n.

Theorem 2.1 (Time Evolution of Markov Chain).

π(n) = π(0)Pn (2.8)

Given the initial distribution, we can always find the probability distributionat any time in the future.

Theorem 2.2 (Stationary Distribution of Markov Chain). When a Markov chainhas the stationary distribution π , then

π = πP (2.9)

2.4 Stock Price Dynamics Evaluation Based on MarkovChain

Suppose the up and down of a stock price can be modeled by a Markov chain.There are three possibilities: (1) up, (2) down and (3) hold. The price fluctuationtomorrow depends on the todayfs movement. Assume the following transitionprobabilities:

P =

0 3/4 1/41/4 0 3/41/4 1/4 1/2

(2.10)

For example, if today’s movement is “up”, then the probability of “down” againtomorrow is 3/4.

Page 25: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

2.5. GOOGLE’S PAGERANK AND MARKOV CHAIN 25

Problem 2.1. 1. Find the steady state distribution.

2. Is it good idea to hold this stock in the long run?

Solutions:

1.

π = πP (2.11)

(π1,π2,π3) = (π1,π2,π3)

0 3/4 1/41/4 0 3/41/4 1/4 1/2

(2.12)

Using the nature of probability (π1 +π2 +π3 = 1), (2.12) can be solved and

(π1,π2,π3) = (1/5,7/25,13/25). (2.13)

2. Thus, you can avoid holding this stock in the long term.

2.5 Google’s PageRank and Markov ChainGoogle uses an innovative concept called PageRank1 to quantify the importanceof web pages. PageRank can be understood by Markov chain. Let us take a lookat a simple example based on [?, Chapter 4].

Suppose we have 6 web pages on the internet2. Each web page has some linksto other pages as shown in Figure 2.1. For example the web page indexed by 1refers 2 and 3, and is referred back by 3. Using these link information, Googledecide the importance of web pages. Here’s how.

Assume you are reading a web page 3. The web page contains 3 links toother web pages. You will jump to one of the other pages by pure chance. That

1PageRank is actually Page’s rank, not the rank of pages, as written inhttp://www.google.co.jp/intl/ja/press/funfacts.html. “The basis of Google’s search technol-ogy is called PageRank, and assigns an ”importance” value to each page on the web and gives ita rank to determine how useful it is. However, that’s not why it’s called PageRank. It’s actuallynamed after Google co-founder Larry Page.”

2Actually, the numbe of pages dealt by Google has reached 8.1 billion!

Page 26: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

26 CHAPTER 2. MARKOV CHAIN

Figure 2.1: Web pages and their links. Adopted from [?, p.32]

means your next page may be 2 with probability 1/3. You may hop the web pagesaccording to the above rule, or transition probability. Now your hop is governedby Markov chain, you can the state transition probability P as

P = (pi j) =

0 1/2 1/2 0 0 00 0 0 0 0 0

1/3 1/3 0 0 1/3 00 0 0 0 1/2 1/20 0 0 1/2 0 1/20 0 0 1 0 0

, (2.14)

where

pi j = PNext click is web page j|reading page i (2.15)

=

1

the number of links outgoing from the page i i has a link to j,

0 otherwise.(2.16)

Starting from web page 3, you hop around our web universe, and eventually youmay reach the steady state. The page rank of web page i is nothing but the steadystate probability that you are reading page i. The web page where you stay themost likely gets the highest PageRank.

Page 27: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

2.5. GOOGLE’S PAGERANK AND MARKOV CHAIN 27

Problem 2.2. Are there any flaws in this scheme? What will happen in the long-run?

When you happened to visit a web page with no outgoing link, you may jumpto a web page completely unrelated to the current web page. In this case, your nextpage is purely randomly decided. For example, the web page 2 has no outgoinglink. If you are in 2, then the next stop will be randomly selected.

Further, even though the current web page has some outgoing link, you may goto a web page completely unrelated. We should take into account such behavior.With probability 1/10, you will jump to a random page, regardless of the pagelink.

Thus the transition probability is modified, and when i has at least one outgo-ing link,

pi j =910

1the number of links outgoing from the page i

+110

16. (2.17)

On the other hand, when i has no outgoing link, we have

pi j =16. (2.18)

The new transition probability matrix P is

P =1

60

1 28 28 1 1 110 10 10 10 10 1019 19 1 1 19 11 1 1 1 28 281 1 1 28 1 281 1 1 55 1 1

. (2.19)

Problem 2.3. Answer the followings:

1. Verify (2.19).

2. Compute π(1) using

π(1) = π(0)P, (2.20)

given that initially you are in the web page 3.

Page 28: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

28 CHAPTER 2. MARKOV CHAIN

By Theorem 2.2, we can find the stationary probability π satisfying

π = πP. (2.21)

It turns out to be

π = (0.0372,0.0539,0.0415,0.375,0.205,0.286), (2.22)

As depicted in Figure 2.2, according to the stationary distribution, we can say thatweb page 4 has the best PageRank.

Figure 2.2: State Probability of Google’s Markov chain

Page 29: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 3

Birth and Death process and PoissonProcess

As we saw in Chapter 2, we can analyze complicated system using Markov chains.Essentially, Markov chains can be analyzed by solving a matrix equation. How-ever, instead of solving matrix equations, we may find a fruitful analytical result,by using a simple variant of Markov chains.

3.1 Definition of Birth and Death ProcessBirth and death process is a special continuous-time Markov chain. The very basicof the standard queueing theory. The process allows two kinds of state transitions:

• X(t) = j → j +1 :birth

• X(t) = j → j−1 :death

Moreover, the process allows no twin, no death at the same instance. Thus, forexample,

Pa birth and a death at t= 0. (3.1)

Definition 3.1 (Birth and Death process). Define X(t) be a Birth and Death pro-cess with its transition rate;

• P[X(t +∆t) = j +1|X(t) = j] = λk∆t +O(∆t)

• P[X(t +∆t) = j−1|X(t) = j] = µk∆t +O(∆t)

29

Page 30: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

30 CHAPTER 3. BIRTH AND DEATH PROCESS AND POISSON PROCESS

3.2 Infinitesimal GeneratorBirth and death process is described by its infinitesimal generator, Q.

Q =

−λ0 λ0µ1 −(λ1 + µ1) λ1

µ2 −(λ2 + µ2) λ2. . . . . . . .

(3.2)

Note that in addition to above we need to define the initail condition, in orderto know its probabilistic behaviour.

3.3 System DynamicsDefinition 3.2 (State probability). The state of the system at time t can be definedby the infinite-dimension vector:

P(t) = (P0(t),P1(t), · · ·), (3.3)

where Pk(t) = P[X(t) = k].

The dynamics of the state is described by the differential equation of matrix:

dP(t)dt

= P(t)Q. (3.4)

Formally, the differential equation can be solved by

P(t) = P(0)eQt , (3.5)

where eQt is matrix exponential defined by

eQt =∞

∑n=0

(Qt)n

n!. (3.6)

Remark 3.1. It is hard to solve the system equation, since it is indeed an infinite-dimension equation. (If you are brave to solve it, please let me know!)

Page 31: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

3.4. POISSON PROCESS 31

3.4 Poisson ProcessDefinition 3.3 (Poisson Process). Poisson process is a specail birth and deathprocess, which has the following parameters:

• µk = 0 : No death

• λk = λ : Constant birth rate

Then, the corresponding system equation is,

dPk(t)dt

=−λPk(t)+λPk−1(t) for k ≥ 1 : internal states (3.7)

dP0(t)dt

=−λP0(t) : boundary state (3.8)

Also, the initial condition,

Pk(0) =

1 k = 00 otherwise,

(3.9)

which means no population initially.Now we can solve the equation by iteration.

P0(t) = e−λ t (3.10)

P1(t) = λ te−λ t (3.11)· · ·

Pk(t) =(λ t)k

k!e−λ t , (3.12)

which is Poisson distribution!

Theorem 3.1. The popution at time t of a constant rate pure birth process hasPoisson distribution.

3.5 Why we use Poisson process?• IT is Poisson process!

Page 32: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

32 CHAPTER 3. BIRTH AND DEATH PROCESS AND POISSON PROCESS

• It is EASY to use Poisson process!

Theorem 3.2 (The law of Poisson small number). Poisson process ⇔ Countingprocess of the number of independent rare events.

If we have many users who use one common system but not so often, then theinput to the system can be Poisson process.

Let us summarize Poisson process as an input to the system:

1. A(t) is the number of arrival during [0, t).

2. The probability that the number of arrival in [0, t) is k is given by

P[A(t) = k] = Pk(t) =(λ t)k

k!e−λ t .

3. The mean number of arrival in [0, t) is given by

E[A(t)] = λ t, (3.13)

where λ is the arrival rate.

3.6 Z-trnasform of Poisson processZ-transform is a very useful tool to investigate stochastic processes. Here’s someexamples for Poisson process.

E[zA(t)] = e−λ t+λ tz (3.14)

E[A(t)] =ddz

E[zA(t)] |z=1= λ (3.15)

Var[A(t)] = Find it! (3.16)

3.7 Independent IncrementTheorem 3.3 (Independent Increment).

P[A(t) = k | A(s) = m] = Pk−m(t− s)

The arrivals after time s is independent of the past.

Page 33: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

3.8. INTEREARRIVAL TIME 33

3.8 Interearrival TimeLet T be the interarrival time of Poisson process, then

P[T ≤ t] = 1−P0(t) = 1− e−λ t : Exponential distribution. (3.17)

3.9 Memory-less property of Poisson processTheorem 3.4 (Memory-less property). T: exponential distribution

P[T ≤ t + s | T > t] = P[T ≤ s] (3.18)

Proof.

P[T ≤ t + s | T > t] =P[t < T ≤ t + s]

P[T > t]= 1− e−λ s (3.19)

3.10 PASTA: Poisson Arrival See Time AveragePoisson Arrival will see the time average of the system. This is quite importantfor performance evaluation.

3.11 Excercise1. Find an example of Markov chains which do not have the stationary distri-

bution.

2. In the setting of section 2.4, answer the followings:

(a) Prove (2.13)

(b) When you are sure that your friend was in Aizu-wakamatsu initiallyon Monday, where do you have to go on the following Wednesday, tojoin her? Describe why.

(c) When you do not know when and where she starts, which place do youhave to go to join her? Describe why.

Page 34: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

34 CHAPTER 3. BIRTH AND DEATH PROCESS AND POISSON PROCESS

3. Show E[A(t)] = λ t, when A(t) is Poisson process, i.e.,

P[A(t) = k] =(λ t)k

k!e−λ t

.

4. When A(t) is Poisson process, calculate Var[A(t)], using z-transform.

5. Make the graph of Poisson process and exponential distribution, using Math-ematica.

6. When T is exponential distribution, answer the folloing;

(a) What is the mean and variance of T ?

(b) What is the Laplace transform of T ? (E[e−sT ])

(c) Using the Laplace transform, verify your result of the mean and vari-ance.

Page 35: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 4

Introduction of Queueing Systems

4.1 Foundation of Performance Evaluation

Queueing system is the key mathematical concept for evaluation of systems. Thefeatures for the queueing systems:

1. Public: many customers share the system

2. Limitation of resources: There are not enough resources if all the customerstry to use them simultaneously.

3. Random: Uncertainty on the Customer’s behaviors

Many customers use the limited amount of resources at the same time withrandom environment. Thus, we need to estimate the performance to balance thequality of service and the resource.

Example 4.1. Here are some example of queueing systems.

• manufacturing system.

• Casher at a Starbucks coffee shop.

• Machines in Lab room.

• Internet.

35

Page 36: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

36 CHAPTER 4. INTRODUCTION OF QUEUEING SYSTEMS

4.2 StarbucksSuppose you are a manager of starbucks coffee shop. You need to estimate thecustomer satisfaction of your shop. How can you observe the customer satisfac-tion? How can you improve the performance effectively and efficiently?

Problem 4.1. By the way, most Starbucks coffee shops have a pick-up station aswell as casher. Can you give some comment about the performance of the system?

4.3 Specification of queueing systemsSystem description requirements of queueing systems:

• Arrival process(or input)

• Service time

• the number of server

• service order

Let Cn be the n-th customer to the system. Assume the customer Cn arrives tothe system at time Tn. Let Xn = Tn+1−Tn be the n-th interarrival time. Supposethe customer Cn requires to the amount of time Sn to finish its service. We call Snthe service time of Cn.

We assume that both Xn and Sn are random variable with distribution functionsPXn ≤ x and PSn ≤ x.

Definition 4.1. Let us define some terminologies:

• E[Xn] = 1λ

: the mean interarrival time.

• E[Sn] = 1µ

: the mean service time.

• ρ = λ

µ: the mean utilizations. The ratio of the input vs the service. We often

assume ρ < 1,

for the stability.

Let Wn be the waiting time of the n-th customer. Define the sojourn time Yn ofCn by

Yn = Wn +Sn. (4.1)

Problem 4.2. What is Wn and Yn in Starbucks coffee shop?

Page 37: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

4.4. LITTLE’S FORMULA 37

4.4 Little’s formulaOne of the ”must” for performance evaluation. No assumption is needed to provethis!

Definition 4.1. Here’s some more definitions:

• A(t) : the number of arrivals in [0, t).

• D(t) : the number of departures in [0, t).

• R(t) : the sum of the time spent by customer arrived before t.

• N(t): the number of customers in the system at time t.

The relation between the mean sojourn time and the mean queue length.

Theorem 4.1 (Little’s formula).

E[N(t)] = λE[Y ].

Proof. Seeing Figure 4.4, it is easy to find

A(t)

∑n=0

Yn =∫ t

0N(t)dt = R(t). (4.2)

Dividing both sides by A(t) and taking t → ∞, we have

E[Y (t)] = limt→∞

1A(t)

A(t)

∑n=0

Yn = limt→∞

tA(t)

1t

∫ t

0N(t)dt =

E[N(t)]λ

, (4.3)

since λ = limt→∞ A(t)/t.

Example 4.2 (Starbucks coffee shop). Estimate the sojourn time of customers, Y ,at the service counter.

We don’t have to have the stopwatch to measure the arrival time and the re-ceived time of each customer. In stead, we can just count the number of ordersnot served, and observe the number of customer waiting in front of casher.

Page 38: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

38 CHAPTER 4. INTRODUCTION OF QUEUEING SYSTEMS

t

A(t)D(t)

Figure 4.1: Little’s formula

Page 39: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

4.5. LINDLEY EQUATION AND LOYNES VARIABLE 39

Then, we may find the average number of customer in the system,

E[N(t)] = 3. (4.4)

Also, by the count of all order served, we can estimate the arrival rate ofcustomer, say

λ = 100. (4.5)

Thus, using Little’s formula, we have the mean sojourn time of customers in Star-bucks coffee shop,

E[Y ] =E[N]

λ= 0.03. (4.6)

Example 4.3 (Excersize room). Estimate the number of students in the room.

• E[Y ] = 1: the average time a student spent in the room (hour).

• λ = 10: the average rate of incoming students (students/hour).

• E[N(t)] = λE[Y ] = 10: the average number of students in the room.

Example 4.4 (Toll gate). Estimate the time to pass the gate.

• E[N(t)] = 100: the average number of cars waiting (cars).

• λ = 10: the average rate of incoming cars (students/hour).

• E[Y ] = E[N]λ

= 10: the average time to pass the gate.

4.5 Lindley equation and Loynes variableHere’s the ”Newton” equation for the queueing system.

Theorem 4.2 (Lindley Equation). For a one-server queue with First-in-first-outservice discipline, the waiting time of customer can be obtained by the followingiteration:

Wn+1 = max(Wn +Sn−Xn,0). (4.7)

Page 40: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

40 CHAPTER 4. INTRODUCTION OF QUEUEING SYSTEMS

The Lindley equation governs the dynamics of the queueing system. Althoughit is hard to believe, sometimes the following alternative is much easier to handlethe waiting time.

Theorem 4.3 (Loyne’s variable). Given that W1 = 0, the waiting time Wn can bealso expressed by

Wn = maxj=0,1,...,n−1

n−1

∑i= j

(Si−Xi),0. (4.8)

Proof. Use induction. It is clear that W1 = 0. Assume the theorem holds for n−1.Then, by the Lindley equation,

Wn+1 = max(Wn +Sn−Xn,0)

= max

(sup

j=1,...,n−1

n−1

∑i= j

(Si−Xi),0+Sn−Xn,0

)

= max

(sup

j=1,...,n−1

n

∑i= j

(Si−Xi),Sn−Xn,0

)

= maxj=0,1,...,n

n

∑i= j

(Si−Xi),0.

4.6 Exercise1. Restaurant Management

Your friend owns a restaurant. He wants to estimate how long each cus-tomer spent in his restaurant, and asking you to cooperate him. (Note thatthe average sojourn time is one of the most important index for operatingrestaurants.) Your friend said he knows:

• The average number of customers in his restaurant is 10,

• The average rate of incoming customers is 15 per hour.

How do you answer your friend?

Page 41: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

4.6. EXERCISE 41

2. Modelling PC

Consider how you can model PCs as queueing system for estimating its per-formance. Describe what is corresponding to the following terminologiesin queueing theory.

• customers

• arrival

• service

• the number of customers in the system

3. Web site administration

You are responsible to operate a big WWW site. A bender of PC-serverproposes you two plans , which has the same cost. Which plan do youchoose and describe the reason of your choice.

• Use 10 moderate-speed servers.

• Use monster machine which is 10 times faster than the moderate one.

Page 42: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 5

M/M/1 queue

The most important queueing process!

• Arrival: Poisson process

• Service: Exponetial distribution

• Server: One

• Waiting room (or buffer): Infinite

5.1 M/M/1 queue as a birth and death processLet N(t) be the number of customer in the system (including the one being served).N(t) is the birth and death process with,

• λk = λ

• µk = µ

P(Exactly one cusmter arrives in [t, t +∆t]) = λ∆t (5.1)P(Given at least one customer in the system,exactly one service completes in [t, t +∆t]) = µ∆t (5.2)

An M/M/1 queue is the birth and death process with costant birth rate (arrivalrate) and constant death rate (service rate).

42

Page 43: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

5.2. UTILIZATION 43

Theorem 5.1 (Steady state probability of M/M/1 queue). When ρ < 1,

pk = P[N(t) = k] = (1−ρ)ρk, (5.3)

where ρ = λ/µ .

Proof. The balance equation:

λ pk−1 = µ pk (5.4)

Solving this,

pk =λ

µpk−1 =

µ

)k

p0. (5.5)

Then, by the fact ∑ pk = 1, we have

pk = (1−ρ)ρk. (5.6)

It is easy to see,

E[N(t)] =ρ

(1−ρ). (5.7)

5.2 UtilizationThe quantity ρ is said to be a utilization of the system.

Since p0 is the probability of the system is empty,

ρ = 1− p0 (5.8)

is the probability that the em is under service.When ρ ≥ 1, the system is unstable. Indeed, the number of customers in the

system wil go to ∞.

5.3 Waiting Time EstimationFor the customer of the system the waiting time is more important than the numberof customers in the system. We have two different ways to obtain the imformationof waiting time.

Page 44: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

44 CHAPTER 5. M/M/1 QUEUE

5.3.1 Waiting Time by Little‘s FormulaLet Sn be the service time of n-th customer and Wn be his waiting time. Define thesojourn time Yn by

Yn = Wn +Sn. (5.9)

Theorem 5.2.

E[W ] =ρ/µ

1−ρ. (5.10)

Proof. By Little’s formula, we have

E[N] = λE[Y ]. (5.11)

Thus,

E[W ] = E[Y ]−E[S] =E[N]

λ− 1

µ

=ρ/µ

1−ρ.

5.3.2 Waiting Time Distribution of M/M/1 QueuesLittle‘s formula gives us the estimation of mean waiting time. But what is thedistribution?

Lemma 5.1 (Erlang distribution). Let Sii=1,...,m be a sequence of independentand identical random variables, which has the exponetial distribution with itsmean 1/µ . Let X = ∑

mi=1 Si, then we have

dPX ≤ tdt

=µ(µt)m−1

(m−1)!e−µt . (5.12)

Proof. Consider a Poisson process with the rate µ . Let A(t) be the number ofarrivals by time t. Since t < X ≤ t +h= A(t) = m−1,A(t +h) = m, we have

Pt < X ≤ t +h= PA(t) = m−1,A(t +h) = m= PA(t +h) = m | A(t) = m−1PA(t) = m−1

= (µh+o(h))(µt)m−1

(m−1)!e−µt .

Dividing both sides by h, and taking h→ 0, we have (5.12).

Page 45: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

5.4. EXAMPLE 45

Theorem 5.3. Let W be the waiting time of the M/M/1 queue. Then we have

P[W ≤ w] = 1−ρe−µ(1−ρ)w. (5.13)

Further, let V be the sojourn time (waiting time plus service time) of the M/M/1queue, then V is exponential random variable, i.e.,

P[V ≤ v] = 1− e−µ(1−ρ)v. (5.14)

Proof. By condition on the number of customers in the system N at the arrival,we have

P[W ≤ w] =∞

∑n=0

P[W ≤ w | N = n]P[N = n]

Let Si be the service time of each customer in the system at the arrival. By thelack of memory, the remaining service time of the customer in service is againexponentially distibuted. P[W ≤ w | N = n] = P[S1 + ... + Sn ≤ w] for n > 0.Using Lemma 5.1, we have

P[W ≤ w] =∞

∑n=1

∫ w

0

µ(µt)n−1

(n−1)!e−µtdtP[N = n]+P[N = 0]

=∫ w

0

∑n=1

µ(µt)n−1

(n−1)!e−µt(1−ρ)ρndt +1−ρ

= 1−ρe−µ(1−ρ)w. (5.15)

Problem 5.1. Prove (5.14).

5.4 ExampleConsider a WWW server. Users accses the server according to Poisson processwith its mean 10 access/sec. Each access is processed by the sever according tothe time, which has the exponential distribution with its mean 0.01 sec.

• λ = 10.

• 1/µ = 0.01.

Page 46: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

46 CHAPTER 5. M/M/1 QUEUE

• ρ = λ/µ = 10×0.01 = 0.1.

Thus the system has the utilizaion 0.1 and the number of customer waiting isdistributed as,

P[N(t) = n] = (1−ρ)ρn = 0.9×0.1n (5.16)

E[N(t)] =ρ

(1−ρ)= 1/9. (5.17)

5.5 Excercise1. For an M/M/1 queue,

(a) Calculate the mean and variance of N(t).

(b) Show the graph of E[N(t)] as a function of ρ . What can you say whenyou see the graph?

(c) Show the graph of P[W ≤ w] with different set of (λ ,µ). What canyou say when you see the graph?

2. In Example 5.4, consider the case when the access rate is 50/sec

(a) Calculate the mean waiting time.

(b) Draw the graph of the distribution of N(t).

(c) Draw the graph of the distribution of W .

(d) If you consider 10 seconds is the muximum time to wait for the WWWaccess, how much access can you accept?

3. Show the equation (5.15).

Page 47: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 6

Reversibility

6.1 Output from QueueWhat is output from a queue?

To consider a network of queues, this is very important question, since theoutput from a queue is indeed the input for the next queue.

6.2 ReversibibilityReversibility of stochastic process is useful to consider the output for the system.If the process is reversible, we may reverse the system to get the output.

6.2.1 Definition of ReversibilityDefinition 6.1. X(t) is said to be reversible when (X(t1),X(t2), ...,X(tm)) has thesame distribution as (X(τ− t1), ...,X(τ− tm)) for all τ and for all t1, ..., tm.

The reverse of the process is stochatically same as the original process.

6.2.2 Local Balance for Markov ChainTransition rate from i to j :

qi j = limτ→0

P[X(t + τ) = j | X(t) = i]τ

(i 6= j) (6.1)

qii = 0 (6.2)

47

Page 48: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

48 CHAPTER 6. REVERSIBILITY

We may have two balance equations for Markov chain.

1. Global balance equation:

∑j

piqi j = ∑j

p jq ji. (6.3)

2. Local balance equation:piqi j = p jq ji. (6.4)

Theorem 6.1 (Local Balance and Revesibility). A stationary Markov chain isreversible, if and only if there exists a sequence pi with

∑i

pi = 1 (6.5)

piqi j = p jq ji (6.6)

Proof. 1. Assume the process is reverisble, then we have

P[X(t) = i,X(t + τ) = j] = P[X(t) = j,X(t + τ) = i].

Using Bayse theorem and taking τ → 0, we have

piqi j = p jq ji.

2. Assume there exists pi satisfying (6.5) and (6.6). Since the process isMarkov, we have

P[X(u)≡ i for u ∈ [0, t),X(u)≡ j for u ∈ [t, t + s)] = pie−qitqi je−q js,

where qi = ∑ j qi j.

Using the local balance, we have

pie−qitqi je−q js = p je−qitq jie−q js.

Thus

P[X(u)≡ i for u ∈ [0, t),X(u)≡ j for u ∈ [t, t + s)]= P[X(u)≡ i for u ∈ [−t,0),X(u)≡ j for u ∈ [−t− s,−t)].

Page 49: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

6.3. OUTPUT FROM M/M/1 QUEUE 49

6.3 Output from M/M/1 queueTheorem 6.2 (Burke’s Theorem). If ρ = λ/µ < 1, the output from an equilibiumM/M/1 queue is a Poisson process.

Proof. Let N(t) be the number of the customers in the system at time t. The pointprocess of upward changes of N(t) corresponds to the arrival process of the queue,which is Poisson. Recall the transition rate of N(t) of the M/M/1 queue satisfies

λPn−1 = µPn, (6.7)

which is the local balance eqaution. Thus, by Theorem 6.1 N(t) is reversibleand N(−t) is stochastically identical to N(t). Thus the upward changes of N(t)and N(−t) are stochastically identical. In fact, the upward chang of N(−t) cor-responds to the departures of the M/M/1 queue. Thus, the departure process isPoisson.

6.4 Excercise1. If you reverse an M/M/1 queue, what is corresponding to the waiting time

of n-th customer in the original M/M/1? (You may make the additionalassumption regarding to the server, if necessary.)

2. Consider two queues, whose service time is exponetially distributed withtheir mean 1/µ . The input to one queue is Poisson process with rate λ , andits output is the input to other queue. What is the average total sojourn timeof two queues?

3. Can you say that M/M/2 is reversible? If so, explain why.

4. Can you say that M/M/m/m is reversible? If so, explain why. (You shouldclearly define the output from the system.)

Page 50: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 7

Network of Queues

7.1 Open Network of queuesWe will consider an open Markovian-type network of queues (Jackson network).

Specifications:

• M: the number of nodes (queues) in the network.

• Source and sink : One for entire network.

• i :index of node.

• ri j: routing probability from node i to j (Bernouilli trial).

• Open network : allow the arrival and departure from outside the network.

– ris: routing probability from node i to sink (leaving the network).

– rsi: probability of arrival to i from outside (arrival to the network).

• The arrival form the outside : Poisson process (λ )

• The service time of the each node: exponential (µ)

7.2 Global Balance of Network• (N∪0)M :State space (M-dimensional).

• n = (n1, ...,nM): the vector of the number customers in each node.

50

Page 51: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

7.3. TRAFFIC EQUATION 51

• 1i = (0, ...,0,i1,0, ...,0)

• p(n): the probability of the number customers in the network is n.

The global balance equation of Network:

Theorem 7.1 (Global Balance Equation of Jackson Network). In the steady stateof a Jackson network, we have

[λ +M

∑i=1

µi]p(n) =M

∑i=1

λ rsi p(n−1i)+M

∑i=1

µiris p(n+1i)+M

∑i=1

M

∑j=1

µ jr ji p(n+1 j−1i).

(7.1)

Proof. The left-hand side correspond to leaving the state n with an arrival or de-parture. Each terms on the right correspond to entering the state n with an ar-rival, departure and routing. Thus, the both side should be balanced in the steadystate.

7.3 Traffic EquationLet Λi be the average output (throughput) of a queue i.

Theorem 7.2 (Traffic Equations).

Λi = λ rsi +M

∑j=1

r jiΛ j (7.2)

Proof. Consider the average input and output from a queue i. The output from ishould be equal to the internal and external input to i.

Remark 7.1. The average output (Λi) can be obtained by solving the system ofequations (7.2).

7.4 Product Form SolutionTheorem 7.3 (The steady state probabilities of Jackson network). The solution ofthe global balance equation (7.1):

Page 52: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

52 CHAPTER 7. NETWORK OF QUEUES

p(n) =M

∏i=1

pi(ni), (7.3)

andpi(ni) = (1−ρi)ρ

nii , (7.4)

where ρi = Λi/µi.

Proof. First we will show pi, which satisfy the ”local balance”-like equation

Λi p(n−1i) = µi p(n), (7.5)

also satisfyies (7.1). Rearranging (7.2), we have

λ rsi = Λi−M

∑j=1

r jiΛ j. (7.6)

Use this to eliminate λ rsi from (7.1), then we have

[λ +M

∑i=1

µi]p(n) =M

∑i=1

Λi p(n−1i)−M

∑i=1

M

∑j=1

r jiΛi p(n−1i)

+M

∑i=1

µiris p(n+1i)+M

∑i=1

M

∑j=1

µ jr ji p(n+1 j−1i).

Using (7.5), we have

λ =M

∑i=1

risΛi, (7.7)

which is true because the net flow into the network is equal to the net flow outof the network. Thus, a solution satisfying the local balance equation will beautomatically the solution of the global balance equation. By solving the localbalance equation, we have

p(n) =Λi

µip(n−1i)

= (Λi/µi)ni p(n1, ...,0, ...,nM).

Page 53: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

7.5. EXERCISES 53

Using this argument for different i, we have

p(n) =M

∏i=1

(Λi/µi)ni p(0).

Taking summation over n and find p(0) to be the product of

pi(0) = 1− Λi

µi. (7.8)

Remark 7.2. The steady state probability of Jackson network is the product of thesteady state probability of M/M/1 queues.

7.5 Exercises1. Consider two queues in the network.

• λ : external arrival rate, µi: the service rate of the node i.

• rs1 = 1, rs2 = 0

• r11 = 0, r12 = 1, r1s = 0

• r21 = 3/8, r22 = 2/8, r2s = 3/8

(a) Estimate the throughputs Λi for each queue.

(b) Estimate the steady state probability of the network.

(c) Draw the 3-D graph of the steady state probability for λ = 1 and µ1 = 3and µ2 = 4.

(d) Estimate the mean sojourn time of the network of (1c) by using Little’sLaw.

Page 54: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 8

Examples of Queueing SystemComparison

Problem 8.1. Which is better,

1. one fast server or two moderate servers?

2. tandem servers or parallel servers?

3. independent servers or joint servers?

4. Starbucks or Doutor Coffee?

8.1 Single Server vs Tandem Servers

Example 8.1 (Starbucks vs Doutor Coffee). Suppose we have a stream of cus-tomer arrival as Poisson process with the rate λ to a coffee shop.

At Doutor Coffee, they take ordering, payment and coffee serving at the sametime. Assume it will take an exponentially-distributed service time with its mean1/µ . On the other hand, Starbucks coffee separate the ordering and coffee service.Assume both will take independent exponentially-distributed service times withits mean 1/2µ . Thus, the mean overall service time in both coffee shop is sameand equal to 1/µ .

Problem 8.2. Which coffee shop is better?

54

Page 55: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

8.2. M/M/2 QUEUE 55

At Doutor Coffee, we have only one M/M/1 queue, and as we saw in Chapter5 the expected number of customer in line including the one serving is obtainedby

E[NDoutor] =ρ

1−ρ, (8.1)

where ρ = λ/µ as usual. At Starbucks, we have two queues N1 at the orderingarea, and N2 at the serving area. This can be modeled by a tandem queue. ByTheorem 6.2, we know that the output of M/M/1 queue ordering area is againPoisson process with the rate λ . Thus, the second queue at the serving area isagain modeled by M/M/1 queue. Since the service rate of both queue is 2µ , wehave the expected number of customers at Starbucks as

E[NStarbucks] = E[N1]+E[N2]

=λ/2µ

1−λ/2µ+

λ/2µ

1−λ/2µ

=2ρ

2−ρ. (8.2)

Consequently,

E[NDoutor] =ρ

1−ρ>

2−ρ= E[NStarbucks], (8.3)

and by Little’s formula, the expected sojourn time is obtained by

E[YDoutor] > E[YStarbucks]. (8.4)

Problem 8.3. Give an intuitive reason of this consequence.

8.2 M/M/2 queueSpecifications:

• Arrival: Poisson process

• Service: Exponential distribution

• Server: Two

Page 56: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

56 CHAPTER 8. EXAMPLES OF QUEUEING SYSTEM COMPARISON

• Waiting room (or buffer): Infinite

Birth and death coefficients:

λk = λ (8.5)

µk =

µ k = 12µ k ≥ 2

(8.6)

The balance equations for stationary state probability:

−λP0 + µP1 = 0 (8.7)−(λ + µ)P1 +λP0 +2µP2 = 0 (8.8)

−(λ +2µ)Pk +λPk−1 +2µPk+1 = 0 ( k ≥ 2), (8.9)

or

µP1 = λP0 (8.10)2µPk = λPk−1 (k ≥ 1). (8.11)

Solving the equations inductively:

pk = 2p0

)k

for k ≥ 1 (8.12)

Using Σpk = 1, we have

p0 =1− λ

1+ λ

(8.13)

The average number of customers in the system:

E[N(t)] =λ/µ

1− (λ/2µ)2 (8.14)

8.3 M/M/1 VS M/M/2

Consider two servers (A1,A2) and one server (B) which is two-times faster thanthe two servers. So the average power of M/M/2 (A1,A2) and M/M/1 (B) areequivalent.

Page 57: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

8.4. TWO M/M/1 VS ONE M/M/2 57

• λ :The mean arrival rate for both queues.

• 2/µ :The mean service time of the servers Ai.

• 1/µ :The mean service time of the servers B.

Set ρ = λ/µ .The mean queue lengths:

• E[NM/M/2] =2ρ

1−ρ2

• E[NM/M/1] =ρ

1−ρ

It is easy to see

E[NM/M/2] =2ρ

1−ρ2 >ρ

1−ρ= E[NM/M/1]. (8.15)

Thus, by using Little’s formula, the sojourn time of the system (delay) can beevaluated by:

E[YM/M/2] > E[YM/M/1]. (8.16)

Problem 8.4. Give an intuitive reason of this consequence.

8.4 Two M/M/1 VS One M/M/2

Consider two systems which have the same arrival rete:

1. Two independent M/M/1 queue.

2. One M/M/2 queue, i.e sharing two servers forming one queue.

Four servers have the same speed.

• λ :The mean arrival rate for both systems.

• 1/µ :The mean service time of the servers.

Set ρ = λ/(2µ).

E[NM/M/2] =ρ

1−ρ2/4<

ρ

1−ρ/2= E[NM/M/1]+E[NM/M/1]. (8.17)

Thus, by using Little’s formula, the sojourn time of the system (delay) can beevaluated by:

E[YM/M/2] < E[Y2(M/M/1)]. (8.18)

Page 58: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

58 CHAPTER 8. EXAMPLES OF QUEUEING SYSTEM COMPARISON

8.5 Exercises1. In the setting of Section 8.3:

(a) Draw the graph of the steady state probabilities of M/M/1 and M/M/2vs ρ .

(b) Draw the graph of the mean sojourn time of M/M/1 and M/M/2 vsρ .

(c) What can you say about when ρ → 1?

2. Web site administration (revisited) You are responsible to operate a bigWWW site. A bender of PC-server proposes you two plans , which hasthe same cost. Which plan do you choose and describe the reason of yourchoice.

• Use 2 moderate-speed servers.

• Use monster machine which is 2 times faster than the moderate one.

3. Web site administration (extended) You are responsible to operate a bigWWW site. Your are proposed two plans , which has the same cost. Whichplan do you choose and describe the reason of your choice.

• Use 2 moderate-speed servers and hook them to different ISPs.

• Use 2 moderate-speed servers and hook them to single ISP, using aload-balancer. (Assume the Load-balancer ideally distribute the loadto each server.)

Page 59: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 9

Classical Queueing Theory

9.1 Birth and Death process

9.1.1 DefinitionBirth and death process: a special continuous-time Markov chain. The very basicof the standard queueing theory.

• B = j → j +1 :birth

• D = j → j−1 :death

No twin, no death at the same instance.

Definition 9.1 (Birth and Death process). X(t) is a Birth and Death process:

• P[B ∈ (t, t +∆t)] = λk∆t +O(∆t)

• P[D ∈ (t, t +∆t)] = µk∆t +O(∆t)

9.1.2 Infinitesimal GeneratorBirth and death process is described by its infinitesimal generator, Q.

Q =

−λ0 λ0µ1 (λ1 + µ1) λ1

µ2 (λ2 + µ2) λ2. . . . . . .

(9.1)

59

Page 60: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

60 CHAPTER 9. CLASSICAL QUEUEING THEORY

Note that in addition to above we need to define the initail condition, in orderto know its probabilistic behaviour.

9.1.3 System equationState probability:

Pk(t) = P[X(t) = k]

.System equation:

dP(t)dt

= P(t)Q

.It is hard to solve the system equation, since it is indeed an infinite-dimension

equation. (If you are brave to solve it, please let me know!)

9.2 Poisson ProcessDefinition 9.2 (Poisson Process). Poisson process is a specail birth and deathprocess, which has the following parameters:

• µk = 0 : No death

• λk = λ : Constant birth rate

Then, the corresponding system equation is,

dPk(t)dt

=−λPk(t)+λPk−1(t) for k ≥ 1 : internal states (9.2)

dP0(t)dt

=−λP0(t) : boundary state (9.3)

Also, the initial condition,

Pk(0) =

1 k = 00 otherwise,

(9.4)

which means no population initially.Now we can solve the equation by iteration.

Page 61: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

9.3. FEATURES OF POISSON PROCESS 61

P0(t) = e−λ t (9.5)

P1(t) = λe−λ t (9.6)· · ·

Pk(t) =(λ t)k

k!e−λ t , (9.7)

which is Poisson distribution!

Theorem 9.1. The popution at time t of a constant rate pure birth process hasPoisson distribution.

9.3 Features of Poisson Process

9.3.1 Why we use Poisson process?

• IT is Poisson process!

• It is EASY to use Poisson process!

Theorem 9.2 (The law of Poisson small number). Poisson process ⇔ Countingprocess of the number of independent rare events.

If we have many users who use one common system but not so often, then theinput to the system can be Poisson process.

Poisson process as an input to the system:

A(t) : the number of arrival during [0,t) (9.8)

P[A(t) = k] = Pk(t) =(λ t)k

k!e−λ t :the probability that the number of arrival in [0, t) is k

(9.9)

E[A(t)] = λ t :the mean number of arrival in [0, t) (9.10)λ :the arrival rate. (9.11)

Page 62: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

62 CHAPTER 9. CLASSICAL QUEUEING THEORY

9.3.2 Z-trnasform of Poisson process

E[zA(t)] = e−λ t+λ tz (9.12)

E[A(t)] =ddz

E[zA(t)] |z=1= λ (9.13)

Var[A(t)] = Find it! (9.14)

9.3.3 Independent Increment

Theorem 9.3 (Independent Increment).

P[A(t) = k | A(s) = m] = Pk−m(t− s)

The arrivals after time s is independent of the past.

9.3.4 Interearrival Time

Let T be the interarrival time of Poisson process, then

P[T ≤ t] = 1−P0(t) = 1− e−λ t : Exponential distribution. (9.15)

9.3.5 Memory-less property

Theorem 9.4 (Memory-less property). T: exponential distribution

P[T ≤ t + s | T > t] = P[T ≤ s] (9.16)

@

Proof.

P[T ≤ t + s | T > t] =P[t < T ≤ t + s]

P[T > t]= 1− e−λ s (9.17)

Page 63: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

9.4. M/M/1 QUEUE 63

9.4 M/M/1 queueThe most important queueing process!

• Arrival: Poisson process

• Service: Exponetial distribution

• Server: One

• Waiting room (or buffer): Infinite

9.4.1 M/M/1 queue as a birth and death processLet N(t) be the number of customer in the system (including the one being served).N(t) is the birth and death process with,

• λk = λ

• µk = µ

An M/M/1 queue is the birth and death process with costant birth rate (arrivalrate) and constant death rate (service rate).

Theorem 9.5 (Steady state probability). When ρ < 1,

pk = P[N(t) = k] = ρ(1−ρ)k, (9.18)

where ρ = λ/µ .

Proof. The balance equation:

λ pk−1 = µ pk (9.19)

Solving this,

pk =λ

µpk−1 =

µ

)k

p0. (9.20)

Then, by the fact ∑ pk = 1, we have

pk = (1−ρ)ρk. (9.21)

Page 64: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

64 CHAPTER 9. CLASSICAL QUEUEING THEORY

Figure 9.1: An example of packet arrival stream.

9.5 The Limit of the Traditional Queueing Theory

1. Network delay

2. Poisson Process?

3. Bound?

See figure 9.1. This illustrate the packet stream of a internet. We can see theperiodic structure of arrival pattern.

Page 65: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

9.6. EXCERCISE 65

9.6 Excercise1. Show E[A(t)] = λ t, when A(t) is Poisson process, i.e.,

P[A(t) = k] =(λ t)k

k!e−λ t

.

2. When A(t) is Poisson process, calculate Var[A(t)], using z-transform.

3. Make the graph of Poisson process and exponential distribution.

4. When T is exponential distribution, answer the folloing;

(a) What is the mean and variance of T ?

(b) What is the Laplace transform of T ? (E[e−sT ])

(c) Using the Laplace transform, verify your result of the mean and vari-ance.

5. Calculate the mean of N(t) for an M/M/1 queue.

6. Show the graph of the probabitliy distribution of N(t) of an M/M/1 queue.

Page 66: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 10

Basic of (σ ,ρ)-algebra

10.1 Traffic Characterization

We consider discrete time t = 0,1,2....A = A(t), t = 0,1,2... : the cummulative number of arrivals by time t.A(0) = 0

Definition 10.1 ((σ ,ρ)-upper constrained). A is said to be (σ ,ρ)-upper con-strained, if

A(t)−A(s)≤ ρ(t− s)+σ , (10.1)

for all 0≤ s≤ t.

Example 10.1 (Periodic arrival). If A is periodic, with its period p, A is (A(p),A(p)/p)-upper constrained.

Example 10.2 (Leaky bucket). If A is leaky bucket conforming traffic, with burstsize σ and sustainable rate ρ , then A is (σ ,ρ)-upper constrained.

Lemma 10.1. The output from a leaky bucket, with burst size σ and sustainablerate ρ , is (σ ,ρ)-upper constrained.

10.2 Multiplexing

A(t) = ∑Ni=1 Ai(t) :the input to a multiplexer.

66

Page 67: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

10.3. WORK CONSERVING LINK 67

Theorem 10.1 (Multiplexing). If Ai is (σi,ρi)-upper constrained, A(t)= ∑Ni=1 Ai(t)

is (σ ,ρ)-upper constrained, where

σ =N

∑i=1

σi(t) (10.2)

ρ =N

∑i=1

ρi(t). (10.3)

Example 10.3.A1 = 0,1,0,1, ....

A2 = 1,0,1,0, ....

A = A1 +A2 is (2,1)-upper constrained?

10.3 Work Conserving LinkWhen there are a backlogged packets in the buffer, a work conserving link withcapacity c emmits the c packets in the time slot.

Definition 10.2. • a(t) = A(t)−A(t−1): the arrivals at time t.

• q(t): the queue length at time t.

• B(t): the departures by time t.

Theorem 10.2 (Lindley equation).

q(t +1) = (q(t)+a(t +1)− c)+ (10.4)

Theorem 10.3 (Loynes representation). Given q(0) = 0, we have

q(t) = max0≤s≤t

[A(t)−A(s)− c(t− s)] (10.5)

B(t) = min0≤s≤t

[A(s)+ c(t− s)] (10.6)

Proof. 1. Use induction.

q(1) = (A(1)−A(0)− c)+

= max0≤s≤1

[A(1)−A(s)− c(1− s)].

Page 68: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

68 CHAPTER 10. BASIC OF (σ ,ρ)-ALGEBRA

Assume (10.5) is valid for some t.

q(t +1) = (q(t)+a(t +1)− c)+

= max[0, max0≤s≤t

[A(t +1)−A(s)− c(t +1− s)]

= max0≤s≤t+1

[A(t +1)−A(s)− c(t +1− s)]

2.

B(t) = q(0)+A(t)−q(t) = A(t)−q(t)= A(t)− max

0≤s≤t[A(t)−A(s)− c(t− s)]

= min0≤s≤t

[A(s)− c(t− s)].

10.4 Excersize1. A = (2,1,3,2,1,3,2,1,3, ....). What is σ and ρ?

2. A1 = (2,1,3,2,1,3,2,1,3, ....), A2 = (1,0,1,0, ....).

(a) What is What is σ and ρ for A = A1 +A2?

(b) Show q(t) if the input A is fed into a work-conserving link with capac-ity c = 3.

Page 69: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 11

Performance Bound Using(σ ,ρ)-algebra

Assume the link is work-conserving.

11.1 Queue Length and Delay• c : link capacity

• A: (σ ,ρ)-upper constrained input

• q = maxq(t) : maximum queue length

• d = maxd(t) : maximum delay

Theorem 11.1 (Queue Length). If ρ ≤ c, then

q≤ σ (11.1)

Proof. Use Theorem 10.3 to obtain

q(t) = max0≤s≤t

[A(t)−A(s)− c(t− s)]

≤ max0≤s≤t

[σ +ρ(t− s)− c(t− s)]

= σ +max0≤s≤t [(ρ− c)(t− s)]= σ .

69

Page 70: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

70 CHAPTER 11. PERFORMANCE BOUND USING (σ ,ρ)-ALGEBRA

Theorem 11.2 (Delay).

ρ < c =⇒ d ≤ d σ

c−ρe (11.2)

Proof. Estimate the busy period length and find the worst case sinario.

Example 11.1 (Finite queue length but infinite delay).

A(t) = ct +σ =⇒ q(t) = σ (11.3)

If the service order is LCFS, then some packets will have infinite delay...

Theorem 11.3 (FCFS Delay).

ρ ≤ c =⇒ d ≤ dσ

ce (11.4)

Proof. Since the queue length is bounded by σ , any packet has to be served atmost σ bits are served in FIFO link. Thus, the delay should be bounded by dσ/ce.

11.2 Output

• c : link capacity

• A: (σ ,ρ)-upper constrained input

• B: output from link

• q : maximum queue length

• d : maximum delay

If other work has to be served in the link, then we have the following twooutput burstiness Theorems:

Theorem 11.4 (Burst caused by delay). If the maximum delay is bounded by d,then the output B is (σ +ρd,ρ)-constained.

Page 71: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

11.2. OUTPUT 71

Proof. Since the delay is bounded by d,

B(t +d)≥ A(t).

Thus,

B(t)−B(s)≤ A(t)−A(s−d)≤ ρ(t− s+d)+σ

= ρ(t− s)+ρd +σ .

Theorem 11.5 (Burst caused by queue). If the maximum queue length is boundedby q, then B is (σ +q,ρ)-upper constrained

Proof.

B(t)−B(s)≤ A(t)−A(s)+q(t)−q(s)≤ A(t)−A(s)+q(s)= ρ(t− s)+σ +q.

If there is no work to be served, then the following holds.

Theorem 11.6 (Burst on the work-conserving link). If the link is work-conserving,then B is also (σ ,ρ)-upper constrained.

Proof. By (10.6),

B(s) = min0≤τ≤s

[A(τ)− c(s− τ)],

B(t) = min0≤τ≤t

[A(τ)− c(t− τ)].

Here we set τ∗ as the time when attains the minimum of the first equation. Thenwe have

B(s) = A(τ∗)− c(s− τ∗)].In addition, by choosing τ = t− s+ τ∗ in the second equation, we have

B(t)≤ A(t− s+ τ∗)− c(s− τ∗)].Thus, we have

B(t)−B(s)≤ A(t− s+ τ∗)−A(τ∗)≤ ρ(t− s)+σ .

Page 72: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

72 CHAPTER 11. PERFORMANCE BOUND USING (σ ,ρ)-ALGEBRA

11.3 RoutingA router can be select some part of the arriving packets to send them to the nexthop.

Definition 11.1 (Control of router). B(t)=P(A(t))

Theorem 11.7 (Routing). A: (σ ,ρ) and P: (δ ,γ),=⇒ B : (γσ +δ ,γρ)

11.4 Exercises1. When A is (3,1)-upper constrained, and the link capacity is 2, answer the

followings:

(a) What is the maximum delay and queue length if the link is work-conserving?

(b) When the link is not work-conserving, and the maximum delay is hap-pened to be 4, what is the output burstiness of the link?

2. Prove Theorem 11.7.

3. VoIP. H323 with G729 encoding has the following periodic stream packetsA.

20bytes(Voice)+40bytes(IP/UDP/RTP)/20msec

(a) Show that A is (σ ,ρ)-upper constrained and what is (σ ,ρ)?

(b) When the above VoIP is used on 56Kbps modem, calculate the max-imum queue length and the delay at the link by the using (σ ,ρ)-algebra. (You can assume one way of voice is active.)

(c) Calculate the burstiness at the other end of the link.

Page 73: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 12

Example of (σ ,ρ)-algebra

We will give some examples of (σ ,ρ)-algebra.

12.1 Procedure1. Aggregation.

Using Theorem 10.1, we have constraint input flow to the output link fromthe first router.

2. Delay estimation.

Using Theorem 11.3, the delay in the first router d can be obtained.

3. Output estimation.

Let B be the output of one of the flows from the link. Using Theorem 11.4,we have the output constraint for B, which will be the input for the next link.

12.2 Example : Tandem RouterConsider two FIFO routers in tandem. See figure 12.1. We have two flows sharinga same link. Suppose each input is (2,1)-upper constrained. We would like toestimate the delay bound and the output burstiness of the one of the flow.

The following is the procedure of estimation of Delay and Output constraint:

1. Aggregation.

73

Page 74: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

74 CHAPTER 12. EXAMPLE OF (σ ,ρ)-ALGEBRA

Router C=3(2+2,1+1)

Aggregation d=4/3

Delay bound

Output

(2+4/3,2)

Figure 12.1: An example of Tandem Routers.

Using Theorem 10.1, we have

A∼ (2+2,1+1) = (4,2) (12.1)

Thus, we have (4,2)-upper constraint input flow to the output link from thefirst router.

2. Delay estimation.

Using Theorem 11.3, the delay in the first router d can be obtained by

d ≤ σ

c=

43. (12.2)

3. Output estimation.

Let B be the output of one of the flows from the link. Using Theorem 11.4,we have

B∼ (2+43,1). (12.3)

Page 75: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

12.3. EXERCISES 75

12.3 Exercises1. If one of the flows is (4,1)-upper constrained in section 12.2, what will the

delay bound and the output be?

2. If the service discipline of the router is not FIFO, then what will the delaybound and the output be?

3. Consider the following network see figure 12.2. Assume we have 3 flows:flow 1, flow 2 and flow 3, where each flow is upper-constrained by (1,2),(2,1) and (3,2). Find the delay of overall network.

Router 4Router 2 Router 3Router 1C=4 C=4 C=4

Flow1

Flow 2

Flow3

Flow1~ (1,2)Flow2~(2,1)Flow3~(3,2)

Figure 12.2: Tandem Routers.

Page 76: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 13

(min,+)-algebra

A generalization of (σ ,ρ) algebra.

13.1 DefinitionReplacing usual algebra with the followings:

• ⊕ : min

• ⊗: +

Example 13.1.

3⊕5 = min(3,5) = 33⊗5 = 3+5 = 8

Theorem 13.1 (Algebra). For all a,b,c ∈ R∪∞,

1. Associative:

(a⊕b)⊕ c = a⊕ (b⊕ c) (13.1)(a⊗b)⊗ c = a⊗ (b⊗ c) (13.2)

2. Commutative:

a⊕b = b⊕a (13.3)a⊗b = b⊗a (13.4)

76

Page 77: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

13.2. ALGEBRA OF FUNCTIONS 77

3. Distributive:

(a⊕b)⊗ c = (a⊗ c)⊕ (b⊗ c) (13.5)

Proof. For example, we will show (13.1).

(a⊕b)⊕ c = min[min(a,b),c]= min[a,b,c]= a⊕ (b⊕ c).

13.2 Algebra of FunctionsDefine the following two sets of sequences:

• F: the set of non-decreasing sequences with f (0)≥ 0.

• F0: the set of non-decreasing sequences with f (0) = 0.

Definition 13.1. For f ,g ∈ F,

1. ( f ⊕g)(t) = min[ f (t),g(t)].

2. ( f ∗g)(t) = min0≤s≤t [ f (s)+g(t− s)].

Definition 13.2 (Zero and Delta function). Define two functions by

1. ε(t): ε(t) = ∞.

2. e(t): e(t) = 0 and e(t) = ∞ for all t ≥ 0.

Theorem 13.2. We have the following properties:

1. Associative( f ⊕g)⊕h = f ⊕ (g⊕h)

( f ∗g)∗h = f ∗ (g∗h)

2. Commutativef ⊕g = g⊕ f

f ∗g = g∗ f

Page 78: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

78 CHAPTER 13. (MIN,+)-ALGEBRA

3. Distributive( f ⊕g)∗h = ( f ∗h)⊕ (g∗h)

4. Zerof ⊕ ε = f

f ∗ ε = ε

5. Identityf ∗ e = e∗ f = f

6. Idempotencyf ⊕ f = f

7. Monotonef ≤ f ,g≤ g

=⇒ f ⊕g≤ f ⊕ g≤ f , f ∗g≤ f ∗ g.

Proof. Show some!

13.3 Subadditive ConstraintDefinition 13.3. An input A is said to be f -upper constrained, if

A(t)−A(s)≤ f (t− s), (13.6)

for all 0≤ s≤ t.

Theorem 13.3 (Increasing). If an input A is f -upper constrained. Then, thereexist an increasing function f such that

f (t)≤ f (t), (13.7)

and A is f -upper constraint.

Proof. Exercise.

Definition 13.4 (subadditive). We call a function f is subadditive, if and only if

f (s)+ f (t)≥ f (t + s), (13.8)

for any s, t ≥ 0.

Page 79: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

13.3. SUBADDITIVE CONSTRAINT 79

Theorem 13.4. If an input A is f -upper constrained. Then, there exist a subaddi-tive function f ∗ such that

f ∗(t)≤ f (t), (13.9)

and A is f ∗-upper constraint.

Proof. Let f ∗ be a function defined inductively as following:

f ∗(0) = 0 (13.10)f ∗(t) = min[ f (t), min

0<s<t[ f ∗(s)+ f ∗(t− s)]]. (13.11)

It is clear that f ∗ ≤ f . For 0 < s < t, we have

f ∗(s)+ f ∗(t− s)≥ min0<u<t

[ f ∗(u)− f ∗(t−u)]

≥min[ f (t), min0<u<t

[ f ∗(u)− f ∗(t−u)]]

= f ∗(t).

In addition for s = 0, t, we have

f ∗(0)+ f ∗(t) = f ∗(t).

Thus, f ∗ is subadditive. Now we will show

A(t + s)−A(s)≤ f ∗(t), (13.12)

by induction on t ≥ 0. For t = 0, we have A(s)−A(s) = 0 = f ∗(0). Assume(13.12) for all t = 0, ..., t0−1. Thus, for 0 < u < t0we have

A(t0 + s)−A(s) = A(s+ t0)−A(s+u)+A(s+u)−A(s)≤ f ∗(t−u)+ f ∗(u).

Taking min0<u<t0 on both side, we have

A(t0 + s)−A(s)≤ min0<u<t0

[ f ∗(t0−u)+ f ∗(u)].

In addition,

A(t0 + s)−A(s)≤ f (t0).

Hence, we have

A(t0 + s)−A(s)≤ f ∗(t0).

Page 80: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

80 CHAPTER 13. (MIN,+)-ALGEBRA

Example 13.2 (subadditive function).

f (t) = σ +ρt

Definition 13.5. Given a function f ∈ F, define a function f ∗ by

f ∗(0) = 0 (13.13)f ∗(t) = min[ f (t), min

0<s<t[ f ∗(s)+ f ∗(t− s)]] (13.14)

The function f ∗ is called subadditive closure of f .

The subadditive closure f ∗ is the minimal function which satisfies subaddivity.

13.4 Exercises1. Prove Theorem 13.3 by setting

f = infs≥t

f (s). (13.15)

2. Let

f (t) =

5t +3 if t > 00 if t = 0.

and

g(t) =

2t +1 if t > 00 if t = 0.

Find f ∗g(t) for t = 0,1,2,3,4.

3. Let f (t) = t2 +5t. Find the subadditive closure f ∗(t).

Page 81: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 14

Subadditive Closure and TrafficRegulation

14.1 Algebra for Subadditive ClosureDefinition 14.1. f ∗: Subbadditive closure of f .

f ∗(0) = 0 (14.1)f ∗(t) = min[ f (t), min

0<s<t[ f ∗(s)+ f ∗(t− s)]] (14.2)

Definition 14.2.

f = f ⊕ e. (14.3)

Lemma 14.1. f ∗: Subbadditive closure of f .

1. The subadditive closre f ∗ is subadditive.

2. ( f ∗)∗ = f ∗.

3. For f ∈ F0, f is subadditive if and only if f ∗ f = f .

4. ( f ∗ ∗ f ))⊕ e = f ∗

Proof. Proof of 3. Assume f ∗ f = f , then we have

f (t) = min0≤s≤t

[ f (s)+ f (t− s)].

81

Page 82: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

82CHAPTER 14. SUBADDITIVE CLOSURE AND TRAFFIC REGULATION

Thus,

f (t)≤ f (s)+ f (t− s).

On the other hand, if f is subadditive, we have f (t)≤ f (s)+ f (t−s) for 0≤ s≤ t.Thus,

f (t)≤ min0≤s≤t

[ f (s)+ f (t− s)] = f ∗ f (t).

Since f (0) = 0, the minimum of the right-side is attainde by s = 0 and we havef ∗ f = f .

Theorem 14.1. For the equation

B = A⊕ (B∗ f ), (14.4)

B = A∗ f ∗ is the maximum solution.

Proof. Let B = A∗ f ∗ in (14.4), we have

A⊕ ((A∗ f ∗)∗ f ) = (A∗ e)⊕ (A∗ ( f ∗ ∗ f ))= A∗ (e⊕ ( f ∗ ∗ f ))= A∗ f ∗.

Thus, Let B = A ∗ f ∗ is a solution of (14.4). It is not difficult to see this is maxi-mum.

14.2 Traffice Regulation

A:the cummulative arrival of a source by time t.

Definition 14.3. A is f -upper constrained for some sequence f ∈ F0, if for all0≤ s≤ t

A(t)−A(s)≤ f (t− s). (14.5)

Page 83: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

14.3. MAXIMAL F-REGULATOR 83

14.3 Maximal f -regulatorFind a method to modify the input so as to be ”optimally” f -upper constrained.

Theorem 14.2. For A, f ∈ F0, the followings are equivalent:

1. A is f -upper constrained

2. A = A∗ f

Proof. Assume A if f -upper constrained, we have

A(t)≤ min0≤s≤t

[A(t)+ f (t− s)]≤ A(t), (14.6)

since f (0) = 0. Thus A = A∗ f .Now we assume 2.

A(t) = min0≤s≤t

[A(t)+ f (t− s)]≤ A(s)+ f (t− s), (14.7)

for 0≤ s≤ t.

Theorem 14.3. Let f ,A ∈ F0 and subadditive. Define B = A∗ f , then

1. B is f -upper constrained.

2. For any f -upper constrained function C with C ≤ A, C ≤ B.

3. A is f -upper constrained ⇐⇒ B = A.

Proof.

B∗ f = (A∗ f )∗ f= A∗ ( f ∗ f )= A∗ f = B.

Thus, by Theorem 14.2, B is f -upper constrained. Since C is f -upper constrained,we have

C = (C ∗ f )≤ A∗ f = B.

Finally, if A is f -upper constrained, A = A∗ f = B by Theorem 14.2.

14.4 Excercize1. Show f ∗ ∗ f ∗ = f ∗.

2. Prove ( f ∗)∗ = f ∗.

Page 84: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 15

Performanece Bounds using (min,+)algebra

15.1 InputDefinition 15.1 (Maximal f -regulator). For f ∈ F0, B = A∗ f ∗ is called the max-imal f -regulator for the input A.

Theorem 15.1. The concatenation of the maximal f1-regulator and f2-regulatoris the maximal f -regulator where

f = f1 ∗ f2 (15.1)

Proof. Let B1 = A∗ f ∗1 and B2 = B1 ∗ f ∗2 . Then, we have

B = (A∗ f ∗1 )∗ f ∗2 = A∗ ( f1 ∗ f2)∗ = A∗ f ∗.

Example 15.1. From the Loynes representation, for the work-conserving linkwith capacity c, we have

B(t) = min0≤s≤t

[A(s)+ c(t− s)]

= A∗ f (t) (15.2)

A work-conserving link is the maximal f -regulator with f (t) = ct.

84

Page 85: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

15.2. PERFORMANCE BOUNDS 85

15.2 Performance BoundsLet A be the input and B be the output of the f2-regulator.

Q(t) = A(t)−B(t) : the queue length of the maximal f -regulator at time t.D(t) = inf[d ≥ 0 : B(t +d)≥ A(t)] :the virtual delay of the packet at time t.Virtual delay is the upper bound of the delay for FIFO queues.

Theorem 15.2. Suppose A is f1-upper constrained, then

1. B is f -upper constrained where f = f1 ∗ f2.

2. Q(t)≤max0≤s≤t [ f ∗1 (s)− f ∗2 (s)]

3. D(t)≤ inf[d ≥ 0 : f ∗1 (s)− f ∗2 (s+d) for 0≤ s≤ t]

Example 15.2. Let A be an f1-upper constrained input, where

f1(t) =

C0t t < σ/(C0−ρ)ρt t ≥ σ/(C0−ρ).

Suppose A is fed into a work-conserving link with capacity C1 and

ρ < C1 < C0. (15.3)

Then,

Q(t)≤ σ(C0−C1)C0−ρ

. (15.4)

D(t)≤ σ(C0−C1)C1(C0−ρ)

. (15.5)

15.3 Excercize1. In the setting in the situation in Example 15.2, estimate the output B and

calculate the delay and the queueing bound when B is aggregated with asimular flow and fed into the work-conserving link with capacity C2 (C2 <C1).

2. Find some problem about performance evaluation in your research projector graduate thesis. If the problem is defined by our deterministic analysis,estimate the bounds.

Page 86: Performance Evaluation of Network Systems · 2008. 8. 19. · CONTENTS 3 3.8 Interearrival Time . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Memory-less property of

Chapter 16

Bibliography

86