Lesson #11: Elementary  Queueing Theory - Birth Death Simulations

Simulating Markov Chains

rRow[distlist_List]:=Module[{},

(*This function should return a random variable with distribution as distList*)
RandomInteger[{1,Length[distlist]}]
]

rRow[distlist_List]:=RandomChoice[distlist->Table[i,{i,Length[distlist]}]]

pp={{0.2`,0.1`,0.7`},{0.499`,0.001`,0.5`},{0.001`,0.199`,0.8`}};
pp//MatrixForm

next[i_]:=rRow[pp[[i]]]
NestList[next,2,100]

pp={{0.2,0.1,0.7},
{0.5,0.01,0.49},
{0.01,0.19,0.8}};
rRow[distlist_List]:=RandomChoice[distlist->Table[i,{i,Length[distlist]}]];
NestList[rRow[pp[[#]]]&,2,100]

pp={{0.2,0.8},
{0.5,0.5}};
rRow[distlist_List]:=RandomChoice[distlist->Table[i,{i,Length[distlist]}]];
rel=NestList[rRow[pp[[#]]]&,1,10000];
Short[rel]

ListPlot[rel]

Simulating Markov Jump Processes

Discussion Only

Simulating a Birth Death Process - Continuation in next class

Working on a Queueing Demonstrations