Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Spring 2014
M. Salimian
1. (15 points) Generate as many U(0,1) random numbers that is possible using LCG
(m=27, a=4, c=11, and X0=19). What is the period of this LCG? What is the 1038017th
random number generated by this LCG starting from X1?
Option 1: Generate one number from Poisson (4.86) using the following set of uniform
(0,1) numbers.
0.542 0.310 0.488 0.040 0.819 0.207 0.413 0.562 0.724 0.217
Poisson
1. Let , , and 0
4. Repeat Step 2
4. Repeat Step 2
4. Repeat Step 2
Option 2: Generate one number from LogNorm (6.09, 1.44) using the following set of
uniform (0,1) numbers.
0.489 0.267 0.580 0.037 0.830 0.142 0.475 0.802 0.510 0.392
Normal
1. Generate , as .
= 0.489, = 0.267
= 0.21764 < 1
Let , Z1 = , and Z2 = .
Lognormal
1. Generate ~N
2. Set
3. (15 points) Generate one number from Gamma (1.49, 6.46) using the following set
of uniform (0,1) numbers.
0.409 0.762 0.280 0.137 0.530 0.042 0.475 0.802 0.510 0.392
Gamma ( , )
Case Two: > 1
1. Set , , , ,
2. Generate and as
=0.409 =0.762
4. (20 points). YCGWIII Burger is simulating the drive in orders of its special signature
burgers during lunch time hours. From the experience, historical data and
observations they have the following information: 20% of cars do not order the
burger, and the rest will order based on the number of passengers. Probability that
cars have between 1-5 passengers is given as 0.25, 0.37, 0.19, 0.12, and 0.07
respectively. Inter-arrival time is constant and of no consequence. Use the following
set of uniform (0,1) numbers below to simulate the system. How many total burger
orders were placed?
0.52 0.31 0.48 0.04 0.89 0.27 0.43 0.52 0.72 0.21
Problem involves generating random numbers from two separate discrete distributions.
The first one represents whether the car arriving will place burger order or not and the
second one representing if placing order then how many (or how many passengers are
in that car). We use inverse cdf method.
Car 1: Create u1=0.52 that from the first inverse cdf it produces an ordering car.
Number of Passengers in Car 1: Create u2=0.31 that from the second inverse cdf it
produces a two passenger car, so order two burgers.
Car 2: Create u1=0.48 that from the first inverse cdf it produces an ordering car.
Number of Passengers in Car 2: Create u2=0.04 that from the second inverse cdf it
produces a one passenger car, so order one burger.
Car 3: Create u1=0.89 that from the first inverse cdf it produces an ordering car.
Number of Passengers in Car 3: Create u2=0.27 that from the second inverse cdf it
produces a two passenger car, so order two burgers.
Car 4: Create u1=0.43 that from the first inverse cdf it produces an ordering car.
Number of Passengers in Car 3: Create u2=0.52 that from the second inverse cdf it
produces a two passenger car, so order two burgers.
IEGR 410: Discrete Event Simulation
Spring 2014
M. Salimian
Car 5: Create u1=0.72 that from the first inverse cdf it produces an ordering car.
Number of Passengers in Car 3: Create u2=0.21 that from the second inverse cdf it
produces a one passenger car, so order one burger.
5. (15 points). Generate 1 random number from beta (3,2) using acceptance-rejection
method. Select the majorizing function to be triangular. Use the following U(0,1) values
if you need.
0.452 0.231 0.648 0.304 0.189 05.27 0.843 0.152 0.702 0.921
6. (20 points) Perform a hand simulation and plot the number of the people in system
versus time for a 1 server queue based on the following information and LIFO priority
rule is in effect. First customer arrive at time 4. Calculate the average number of people
in the system and average waiting time in the queue. Simulation time is 85 minutes.