SOLUTIONS MANUAL for Stochastic Modeling: Analysis and ...
SOLUTIONS MANUAL for Stochastic Modeling: Analysis and ...
SOLUTIONS MANUAL for Stochastic Modeling: Analysis and ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
44 CHAPTER 5. ARRIVAL-COUNTING PROCESSES<br />
22. The algorithms given here are direct consequences of the definitions, <strong>and</strong> not necessarily<br />
the most efficient possible.<br />
(a) Recall that the inverse cdf <strong>for</strong> the exponential distribution with parameter λ is<br />
algorithm Erlang<br />
a ← 0<br />
<strong>for</strong> i ← 1ton<br />
do<br />
a ← a − ln (1-r<strong>and</strong>om())/λ<br />
enddo<br />
return X ← a<br />
(b) algorithm binomial<br />
a ← 0<br />
<strong>for</strong> i ← 1ton<br />
do<br />
U ← r<strong>and</strong>om()<br />
if {U ≥ 1 − γ} then<br />
a ← a +1<br />
endif<br />
enddo<br />
return X ← a<br />
(c) algorithm Poisson<br />
a ← 0<br />
b ←−ln(1-r<strong>and</strong>om())/λ<br />
while {b