You are on page 1of 16

Session-1

Markov chains and simulation techniques for suitable


real world problems.
Stochastic process: A family of random variables which are functions of say, time are
known as stochastic process (or random process).
Eg 1. Consider the experiment of throwing an unbiased die. Suppose that X n is the

outcome of the nth throw, n  1. Then X n , n  1 is a family of random variables such

that for distinct values of n (=1,2,3…), one gets distinct random variable X n ;

X n , n  1 constitutes a stochastic process.


Eg 2. Suppose that X n is the number of sixes in the first n throws. For a distinct value

of n= 1,2,3……., we get a distinct binomial variable X n ; X n , n  1 which gives a


family of random variables is a stochastic process.
Eg 3. Suppose that X n is the maximum number shown in the first ‘n’ throws. Here

X n , n  1constitutes a stochastic process.


Eg 4. Consider the number of telephone calls received at a switch board. Suppose that
X(t) the random variable which represents the number of incoming calls in an interval
(o, t) of duration t units. The number of calls in one unit of time is X(1). The family
{ X (t ), t  T } constitutes a stochastic process (T  [0, )) .

State space: The set of possible values of a single random variable X n of a stochastic

process X n , n  1 is known as its state space. The state space is discrete if it


contains a finite or denumerable infinite of points; otherwise, it is continuous.
Eg 1. If X n is the total number of sixes appearing in the first n throws of a die, the set

of possible values of X n is the finite set of non negative integers 0,1,…n Hence the

state space of X n is discrete. We can write X n  y1  y 2  ...  y n , where yi is a


discrete random variable denoting the outcome of ith throw and yi=1 or 0 according as
ith throw shows six or not.
Eg 2. Consider X n  z1  z 2  .....  z n , where zi is a continuous random variable

assuming values in [0,  ). Here, the set of values of X n is the interval [0, ), and so

the state space of X n is continuous.


Discrete time (parameter) stochastic process: In the above two examples we assume
that the parameter n of Xn is restricted to be non-negative integer, n=0,1,2,…. We
consider the state of system at discrete time points n=0,1,2,…, only. Here the word
time is used in a wide sense. In the first example “time n” implies throw number n.
Continuous time (parameter) stochastic process: we can visualize a family of
random variables { Xt, t  T } (or { X (t ), t  T } ) such that the state of the system is
characterized at every instant over a finite or infinite interval. The system is then
defined for a continuous range of time and we say that we have a family of random
variables in continuous time.
A stochastic process in continuous time may have either a discrete or
continuous state space.
Eg 1: Suppose that X(t) is the number of telephone calls at a switch board in an
interval (o, t). Here the state space of X(t) is discrete though X(t) is defined for a
continuous range of time. This is a continuous time stochastic process with discrete
state space.
Eg 2. Suppose that X(t) represents the maximum temperature at a particular place in
(0, t), then set of possible values of X(t) is continuous. This is a continuous time
stochastic process with continuous state space.
Thus the stochastic processes can be classified into the following four types of
processes:
(i) Discrete time; discrete state space
(ii) Discrete time; continuous state space
(iii) Continuous time; discrete state space
(iv) Continuous time; continuous state space

All the four types may be represented by { X (t ), t  T } . In case of discrete time, the
parameter generally used is n, i.e,. the family is represented by { X (n), n  0,1,2....} . In
case of continuous time both the symbols { X t , t  T } and { X (t ), t  T } ( where T is
finite or infinite interval) are used. The parameter t is usually interpreted as time,
through it may represent such characters as distance, length, thickness and soon.
Markov process: If { X (t ), t  T } is a stochastic process such that, for,
t1  t 2  ...  t n  t

Pr a  X (t )  b / X (t1 )  x1 , X (t 2 )  x 2 ,... X (t n )  x n   Pra  X (t )  b / X (t n )  xn 

the process { X (t ), t  T } is a Markov process.


Markov chain: A discrete parameter Markov process is know as a Markov chain.
Definition:The stochastic process X n , n  0,1,2,3,... is called a Markov chain if, for

j, k , j1 ,  j n1  N

Pr X n  k / X n1  j, X n2  j1 ,, X 0  j n1   PrX n  k / X n1  j,

whenever the first term is defined.


The outcomes are called the states of the Markov chain; If X n has the outcome j

(i.e. X n  j ) , the process is said to be at state j at the nth trail. To a pair of states (j, k)
at the two successive trails ( nth and (n+1)th trails) there is an associated conditional
probability P jk .

Transition probability: P jk is called the transition probability and represents the

probability of transition from state j at the nthtrial to the state k at the (n+1)th trail.
Homogeneous Markov chain: If the transition probability P jk is independent of n,

the Markov chain is said to be homogeneous. If it is dependent on n, the chain is said


to be non-homogeneous.
One step transition probability: The transition probability P jk refer to the states (j,

k) at two successive trails (say nth and (n+1)th trails); the transition is one step
transition probability.
If we are concerned with the pair of states (j, k) at two non-successive trails,
say, j at the nth trail and k at the (n+m)th trail, the corresponding probability is then

 PrX n  m  k / X n  j.
( m)
called m-step transition probability and is denoted by Pjk

Transition probability Matrix or Matrix of transition probabilities: The transition


probability P jk satisfy P jk >0, P jk 1 for all j. These probabilities may be written in

the matrix form


 p11 p12 p13 
p p 22 p 23 
 21
P   
 
   
 

This is called the transition probability Matrix of the Markov chain. P is a stochastic
matrix.
Thus a transition matrix is a square matrix with non-negative elements and unit-row
sums.
Example 1: Consider a communication system which transmits the two digits 0 and 1
through several stages. Let X n , n  1 be the digit leaving the nth stage of system and
X0 be the digit entering the first stage. At each stage there is a constant probability q
that the digit which enters will be transmitted unchanged, and probability p otherwise,
p+q=1.
Here X n , n  0 is a homogeneous two-state Markov chain with single step transition

matrix
0 1

0  q p
P 
1  p q 
Example 2. A particle performs a random walk with absorbing barriers say, as 0 and
4. Whenever it is at any position r (0 < r < 4), it moves to r+1 with probability p or to
(r-1) with probability q, p+q=1. But as soon as it reaches 0 or 4 it remains there itself.
Let Xn be the position of the particle after n moves. The different states of Xn are the
different positions of the particle {Xn} is a Markov chain whose unit-step probabilities
are given by
PrX n  r  1 / X n 1  r  p
PrX n  r  1 / X n 1  r  q, 0  r  4
and
PrX n  0 / X n 1  0  1
PrX n  4 / X n 1  4  1
The transition matrix is given by
States of X n

0 1 2 3 4

0 1 0 0 0 0
1 q 0 p 0 0 
States of X n 1 2 0 q 0 p 0
 
3 0 0 q 0 p
4 0 0 0 0 1 
Eg 3: General case of random walk: In the above example, as soon as the particle
reaches 0 it remains there with probability ‘a’ and is reflected to state 1 with
probability 1-a(0 < a <1); if it reaches state 4 it remains there with probability b and
reflected to state 3 with probability 1-b (o < b<1) then {Xn} is a Markov chain with
state space {0,1,2,3,4}.
The transition matrix is given by

0 1 2 3 4

0 a 1  a 0 0 0
1 q 0 p 0 0 
2 0 q 0 p 0
 
3 0 0 q 0 p
4 0 0 0 1 b b 
If a=1, then ‘0’ is an absorbing barrier and if a=0, then ‘0’ is a reflecting barrier
similar is a case with state 4.
Finite Markov chain: A Markov chain X n , n  0 with k states, where k is finite, is
said to be a finite Markov chain. The transition matrix P in this case is a square matrix
with k rows and k columns.
The number of states could however infinite. Where the possible values of X n form a
denumerable set, then the Markov chain is said to be denumerable infinite or
denumerable and the chain is said to have a countable state space.
Probability distribution:
The probability distribution of X 0 , X 1 , X 2 , , X n can be computed in terms of the

transition probability p jk and the initial distribution of X 0 .

PrX 0  a, X 1  b,  , X n  2  i, X n 1  j , X n  k 
 PrX n  k / X n 1  j , X n  2  i,  , X 1  b, X 0  a
 PrX n  k / X n 1  j prX n 1  j , X n  2  i,  , X 0  a
 PrX n  k / X n 1  jprX n 1  j / X n  2  i PrX 1  b / X 0  aPrX 0  a
 p jk p ij  p ab PrX 0  a.

Eg: Let X n , n  0 be a Markov chain with three states 0,1,2 with transition matrix
0 1 2
0 3 1 
4 0
4
1  
1 1 1
2 4 2 4
 3 1 
0
 4 4 
and the initial distribution PrX 0  i  , i  0,1, 2.
1
3

We have PrX 1  1 / X 0  2 
3
4

PrX 2  2 / X 1  1 
1
4
PrX 2  2, X 1  1 / X 0  2

 PrX 2  2 / X 1  1PrX 1  1 / X 0  2  . 
1 3 3
4 4 16

PrX 2  2, X 1  1, X 0  2  PrX 2  2, X 1  1 / X 0  2PrX 0  2 


3 1 1
.  .
16 3 16
PrX 3  1, X 2  2, X 1  1, X 0  2

PrX 3  1 / X 2  2Pr X 2  2, X 1  1, X 0  2  . 
3 1 3
4 16 64
Note:The transition probabilities with the initial distribution completely
specifies a
Markov chain.
Higher order transition probabilities:
 PrX n  2  k / X n  j   PrX n  2  k , X n 1  r / X n  j
( 2)
p jk
r

  p jr p rk
r

  p rk   p Jr
( m n) (n) ( m) (n) ( m)
p jk p jr p rk
r

Let p  ( p jk ) denote the transition matrix of the unit-step transition and P ( m)  Pjk ( m)

denote the transition matrix of the m-step transitions. For m=2, we have the matrix
p ( 2)  p. p  p 2 similarly p ( m n)  p ( m) p  p. p ( m)
Classification of chains: The Markov chains are of two types (i) ergodic (ii) regular
An ergodic Markov chain has the property that it is possible to pass from one state to
another in a finite number of steps, regardless of present state.
A special type of ergodic Markov chain is the regular Markov chain.
A regular Markov chain is defined as a chain having a transition matrix P such that for
some power of P it has only non-zero positive probability values.
Note: Thus all regular chains must be ergodic chains.
Example: Consider a communication system which transmits the digits 0 and 1
through several stages. At each stage the probability that the same digit will be
received by the next stage, as transmitted, is 0.75. What is the probability that a 0 that
is entered at the first stage is received as a 0 by the 5th stage?

Solution: Now we want to find the P004

0.75 0.25
The state transition matrix P is given by
P  0.25 0.75
 
0.625 0.375
Hence P  0.375 0.625
2

 

0.53125 0.46875
And
P 4
 P 2 2
P  0.46875 0.53125
 
Therefore the probability that a zero will be transmitted through four stages as a zero is
P004=0.53125.
Session-2
Problems to be discussed by the faculty:
1) Which of the following matrices are T.P.M / stochastic matrices
1 2 4
1 0 0
a. [ ] b. [31 3 3
1]
0 1 0 1
2 2

15 1
1 0
𝑐. [ ] d. [16
2
16
4]
0 1
3 3

1 0 0 2
e. [ ] f. [ 1 1 ]
−1 0 4 4
1
0 2
g. [ 1 1]
3 4

2) Give the graphical representation of the following Transition


probability matrices
0 1 0 0 0 0 0
1 1
0 2 0 0 0 0
2 1 0 0 0 0
1
1  
0 2
0 0 0 0 q 0 p 0 0
𝑎) 2 1
1 1
0 0 b) 0 q 0 p 0
0 0 2 4 1 1  
0 0 4 0 0 q 0 p
0 0 0 0 2 2 0
 0 0 0 1 
0 0 1 0 0 0
0
[0 0 0 0 0 1]

3) Write the Transition probability matrices of the following Diagram

2 3 4 5

4) Consider a system that can be in one of two possible states, S={0,1}. In


particular, suppose that the transition matrix is given by
1 1
 2 
P  2
1 1
 2 2 

Suppose that the system is in state 0 at time n=0, i.e., X0=0.


a) Draw the state transition diagram.
b) Find the probability that the system is in state 1 at time
n=3.
5) Which of the stochastic matrices are Regular
1 1
1 1 1 0
2 2
2 4 4 1 1
a) [0 1 0] b) 0
1 1 2 2
0 2 1 1 1
2 [4 4 2]

0 0 1 1
0
1 1
c) [ 2 0 2
] d) [31 ]
1
0 1 0 3
1 1
1
2 4
1 0
e) [ ] f) [0 1]
1
0 1 2
0 0 1
6) Using the diagram write the answers to the following

a. Find P(X4=3|X3=2)
b. Find P(X3=1|X2=1)
c. If we know P(X0=1)=13 find P(X0=1,X1=2).
d. If we know P(X0=1)=13, find P(X0=1,X1=2,X2=3)
7) Which of the stochastic matrices are ergotic
0 1 3 −1 1 0
1 0
𝑎) ( ) 𝑏) (2 0 1) 𝑐) ( 1 0 1)
0 1
1 −2 0 1 −1 1

8) Classify the states of the following Markov chains. If a state is


periodic, determine its period.

0.5 0.25 0.25 0


0 1 0
𝑎) (0 0 1) b) ( 0 0 1 0)
1/3 0 1/3 1/3
1 0 0
0 0 0 1
Session-3
1. Given that a person’s last cola purchase was Coke, there is a 90% chance that
his next cola purchase will also be Coke. If a person’s last cola purchase was
Pepsi, there is an 80% chance that his next cola purchase will also be Pepsi.
Write the Transition Probability matrix and diagram
2. Raining today provides 40% rain tomorrow and 60% not raining tomorrow.
Not raining today provides 20% rain tomorrow and 80% not rain tomorrow
Write the Transition Probability matrix and diagram
3. A house wife buys three kinds of cereals; A, B and C. She never buys the same
cereal on successive weeks. If she buys cereal A, then the next week she buys
cereal B. However, if she buys either B or C, then the next week she is three
times as likely to buy A as the other brand. Obtain the transition probability
matrix and determine how often she would buy each of the cereals in the long
run.
4. A market survey is made on two brands of breakfast food A and B. Every time a
customer purchases, he my buy the same brand or switch to another brand. The
transition matrix is given below:
To
A B
A 0.8 0.2
B 0.6 0.4
from

At present, it is estimated that 60% of the people buy brand A and 40% buy brand
B. Determine the market shares of brand A and brand B in the steady state.
5. Consider a certain community in well-defined area with three types of grocery
stores; for simplicity we shall call them I, II and III. Within this community (we
assume that the population is fixed) there always exists a shift of customer from
one grocery store to another. A study was made on January 1 and it was found that
¼ shopped at store I, 1/3 at store II and 5/12 at store III. Each month store I retains
90% of its customers and loses 10% of them to store II. store II retains 90% of its
customers and loses 5% each to store I store III. Store III retains 40% of its
customers and loses 50% of them to store I and 10% to store II.
I) What proportion of customers will each store retain by February 1;
March 1?
II) Assuming the same pattern continues, what will be the long run
distribution of customers among the three stores?
6. Three children (denoted by 1,2,3) arranged in a circle play a game of throwing a
ball to one another. At each stage the child having the ball is equally likely to
throw it into any one of the other two children. Suppose that X 0 denote the child
who had the ball initially and X n (n  1) denotes the child who had the ball after n
throws. Show that { X n , n  1} forms a Markov chain. Find p. Calculate
PrX 2  1 / X 0  1. , PrX 2  2 / X 0  3 , PrX 2  3 / X 0  2 and also the
probability that the child who had originally the ball will have it after 2 throws.
Find p if the number of children is m ( 3).

Session 4
1. A market research team has conducting a survey of customer buying habits with
respect to three brands of talcum power in an area. It estimate, at present, 20% of the
customers buy brand A, 50% of the customers buy brand B and 30% of the customers
buy brand C. In addition the team has analyzed its survey and has determined the
following brand switching matrix.
Brand Next Bought A B C

Brand Just Bought


A 0.6 0.3 0.1
B 0.4 0.5 0.1
C 0.2 0.1 0.7

What will be the expected distribution of consumers two time periods later and also at
equilibrium.
2. A research analyzing brand switching between different airlines, operating on the
Delhi-Mumbai route by frequent fliers. On the basis of the data collected by her, the
researcher has developed the following transition probability matrix.
To airline
AA  0.9 .03 0.07
From airline BB 0.15 0.80 0.05
CC 0.20 0.30 0.50

It is found that currently the airlines AA, BB and CC have 20%, 50% and 30% of the
market respectively.
i) Obtain the market share for each airline in two moths time, and
ii) Calculate the long run market share for each time.

3. Honey lnc had 35% of the local market for its cosmetics, while the two other
manufactures of cosmetics Lace Lnc and shalon lnc have 40% and 25% shares
respectively in the local market as on Ist April of this year. A study by a market
research firm has disclosed the following:

Honey Inc. retains 86% of its customers, while it gains 4% and 6% of the customers
from its two competitors, Lace and Shalon respectively. Lace. Inc. retains 90% of its
customers, and gains 8% and 9% of customers respectively., from Honey and Shalon.
Shalon retains 85% of its customers and gain 6% and 6% of customers from Lace and
Honey, respectively.

i) Determine the share of each firm on April Ist next year.


ii) Determine the market share of each firm at equilibrium.
4. A salesman territory consists of cities A, B and C. He never sells in the same city on
successive days. If he sells in city A, then the next day he sells in city B. However, if
he sells in either B or C, then the next day he is twice as likely to sell in city A as in
other city. In the long run how often does he sell in each cites.
5. A professor has three pet questions one of which occurs on every test he gives. The
students know these habits well. He never uses the same questions twice in a row. If
he used questions one last time, he tosses a coin and uses question two if a head comes
up. If he used question two, he tosses two coins and switches to question three if both
come up heads. If he used question three, he tosses three coins and switches to
questions one if all three come up heads. In the long run which question does he use
most often and with how much frequency is it used?
Session-5
Simulation -examples and general principles
Simulation is a numerical technique for conducting experiments that involve certain
types of mathematical and logical relationships necessary to describe the behavior
and structure of a complex real world system over extended period of time.

A simulation is the imitation of the operation of a real world process or system


overtime. NASA uses chambers to simulate zero gravity for astronauts. Airlines use
computer programs to simulate jet flights. Simulation involves the generation of
artificial history of a system and the observation of that artificial history to draw
inferences concerning the characteristics of the real system.
Simulation is a powerful technique for evaluating the behavior of a system.
Simulation is a way to learn about a system by experimenting on a copy rather than
the system itself - the copy being the model of the system. Simulation is a powerful
tool because it is usually much quicker and easier to experiment on a copy of the
system than the real system. Simulation is most effective at studying complicated
models that can not be evaluated by other means. As an example, the civil Aviation
Administration would like to assess the impact on passenger’s delay of allowing more
flights to operate out of a airport. The randomized scenario might comprise flight
delays, weather conditions, passengers boarding times, and other pertinent factors.
The simulation would calculate the delay under each scenario.
Model of system: A model is defined as a representation of a system for the purpose
of studying the system.
Types of model: Models can be classified as being mathematical or physical. A
mathematical model uses symbolic notation and mathematical equations to represent
a system. A simulation model is a particular type of a mathematical model of a
system.
Simulation models be further classified as being static or dynamic,
deterministic or stochastic, and discrete or continuous. A static simulation model,
some times called Monte Carlo simulation, represents a system at a particular point in
time. Dynamic simulation models represent systems as they change over time. The
simulation of a bank from 9:00AM to 4:00 PM is an example of a dynamic
simulation. Simulation models that contain no random variables are classified as
deterministic. Deterministic models have a known set of inputs, which will results in
a unique set of outputs deterministic arrivals would occur at a dentist’s office if all
patients arrived at the scheduled appointment time. A stochastic simulation model has
one or more random variables as inputs. Random inputs lead to random outputs since
the out puts are random, they can be considered only as estimates of the true
characteristics of a model. The simulation of a bank would usually involve random
interval times and random service times. Thus on a stochastic simulation, the output
measures the average number of people waiting, the average waiting time of a
customer must be treated as statistical estimates of the true characteristics of the
system.
1. Simulation of deterministic models: in the case of these models, the input and
output variables are not permitted to be random variables and models are described
by exact functional relationships.
2. Simulation of probabilistic models:In such cases, method of random sampling is
used. The technique used for solving these models is termed as “Monte-Carlo
Technique”.
3. Simulation of static models:These models do not take variable time into
consideration.
4. Simulation of dynamic models: These models deal with time-varying interaction.
Discrete and continuous systems: A discrete system is one in which the state
variables change only at a discrete set of points in time. The bank is an example of a
discrete system. The state variable, the number of customers in the bank, changes
only when customer arrives or when the service of a customer is completed.
A continuous system is one which the state variables changes continuously
over time. An example is the head of water behind a dam. During and for some time
after rain, water flows into the lake behind the dam. Water is drawn from the dam for
flood control and to make electricity. Evaporation also decreases the water level.
Generation of random numbers:
In the queuing models interarrival and service times are usually probabilistic rather
than deterministic. The problem in all such types of simulations is based on the use of
random numbers. These are the numbers which have equal probability of being
generated. For example, when we are interested in one digit numbers 0,1,2,…,9, there
are in all ten numbers and each of the numbers should have 1/10 probability of being
generated.
There are several methods for generation of random numbers, the most common
among these are
1. Mid square method 2. Spinning arrow method 3. Dice rolling method and the
4. spinning disc method
A convenient method of generation of random numbers may be summarized in the
following steps
1. Collect the data related to the current problem
2. Construct a frequency distribution with these data
3. Construct the relative frequency distribution
4. Assign a coding system and that relates the identified events to generated random
numbers
5. Select a suitable method for obtaining the required random numbers
6. Match the random numbers to the assigned events and tabulated the results.
7. Repeat step 6 until the desired number of simulation runs has been generated
Problems to be discussed by the faculty:
1) A baker is trying to figure out how many dozens of bagels to bake each day. The
probability distribution of the number of bagel customers is as follows

Number of customers/day 8 10 12 14
Probability 0.35 0.30 0.25 0.10
Customer order 1,2,3 or 4 dozens bagels according to the following distribution
Number of dozens order/customer 1 2 3 4
Probability 0.4 0.3 0.2 0.1
Bagel sells for $8.40 per dozen. They cost $5.80 per dozen to make. All bagels not
sold at the end of the day are sold at half-price to a local grocery store. Based on 5
days of simulation, how many (to the nearest 5 dozens) bagels should be baked each
day?
2) There is only one telephone in a public booth of a railway station. The following table
indicate the distribution of callers arrival time and duration of the calls

Time between arrivals(minutes) 5 6 7


Probability 0.2 0.70 0.1

Call duration(minutes 2 3 4 5
Probability 0.15 0.6 0.15 0.1
Simulate for the current system. It is proposed to add another telephone to the booth.
Justify the proposal based on the waiting time of callers.
Session-6
3) The newsstand buys the papers for 33 cents each and sells them for 50 cents each.
Newspapers not sold at the end of the day are sold at scrap for 5 cents each.
Newspapers can be purchased in bundles of 10. Thus the newsstand can buy 50, 60,
and so on. There are three types of news days: ‘good’; ‘fair’; and ‘poor’; they have
the probabilities 0.35, 0.45 and 0.20 respectively. The distribution of newspapers
demanded on each of these days is given in the following table
Demand probability distribution
Demand Good Fair poor

40 0.08 0.10 0.44

50 0.15 0.20 0.25

60 0.45 0.40 0.20

70 0.25 0.18 0.06

80 0.07 0.12 0.05

If the decision is to purchase 50 newspapers per day simulate the demand for 8 days
and determine the total profit.
4) A milling machine has three different bearings that fail in service. The distribution
of the life of each bearing is identical as given in the following table. When a bearing
fails, the mill stops, a repair person is called, and a new bearing is installed.
Bearing life(hours) 100 110 120 130 140
0 0 0 0 0
Probability 0.2 0.2 0.2 0.1 0.1
0 3 8 9 0
The probability distribution of the delay time of the repair person is given in
following table.
Delay(minutes) 5 10 15
Probability 0.6 0.3 0.1
Downtime for the mill is estimated as $10 per minute the on-site cost of the repair
person is $30 per hour. It takes 20 minutes to change one bearing, 30minutes to
change 2 bearings and 40 minutes to change 3 bearings. A proposal has been made to
replace all bearings when ever a bearing fails. The cost of each bearing is $35.
Simulate 5 bearings changes to evaluate the proposal using the total cost per 5000
bearing hours.
5) Students arrive at the University library counter with inter arrival times
distributed as
Time between arrivals(minutes) 5 6 7 8

Probability 0.1 0.4 0.3 0.2

The time for transaction at the counter is distributed as


Transaction time(minutes) 2 3 4 5
Probability 0.15 0.5 0.2 0.15
If more than two students are in the queue, an arriving student goes away without
joining the queue. Simulate the system and determine the balking rate of the students.
Session-7
6.A car manufacturing company manufactures 40 cars per day. The sale of cars
depends upon demand which has the following distribution:

Sales of cars 37 38 39 40 41 42
Probability 0.10 0.15 0.2 0.3 0.1 0.0
0 5 5 5
The production cost and sale price of each are Rs. 4 lacks and Rs 5 lakh
respectively. Any unsold car is to be disposed off at a loss of Rs. 2 lakh per car. There
is a pently of Rs 1 lakh per car, if the demand is not met. Using the following random
numbers, estimate total profit/loss for the company for the next ten days:
9, 98, 64, 98, 94, 01, 78, 10, 15, 19.
If the company decides to produce 39 cars per day, what will be its impact on
profitability?
7. The director of finance for a farm co-operative is concerned about the yields per acre
she can expect from this year’s corn crop. The probability distribution of the yields
for the current weather conditions is given below:

Yield in Kg. per acre 120 140 160 180


Probability 0.18 0.26
0.4 0.1
4 2
She would like to see a simulation of the yields she might expect 10 years for
weather conditions similar to those she is now experience.
(i) Simulate the average yields she might expect per acre using the following
random numbers:
20, 72, 34, 54, 30, 22, 48, 74, 76, 02
She is also interested in the effect of market price fluctuations on the co-operative ‘s
farm revenue. she makes this estimate of per Kg prices for corn.
Price per Kg(Rs) 2 2.1 2.2 2.3 2.4 2.5

Probability 0.05 0.15 0.30 0.25 0.15 0.10

(ii) Simulate the price she might expect to observe over the next 10 years using
the following random numbers: 82, 95, 18, 96, 20, 24, 56, 11, 52, 3.
(iii) Assume that prices are independent of yields combine these two into the
revenue per acre and also find out the average revenue per acre she might expect every
year.
8. A firm has a single channel service station with the following arrival and
service time probability distributions:
Inter-arrival PROBABILITY Service time PROBABILITY
time (minutes) (Minutes)
10 0.10 5 0.08
15 0.25 10 0.15
20 0.30 15 0.18
25 0.25 20 0.24
30 0.10 25 0.22
30 0.14
The customers arrival at the service station is a random phenomenon and the time
between the arrivals varies from 10 minutes to 30 minutes. The service time varies from
5 minutes to 30 minutes. The queuing process begins at 10AM and proceeds for nearly
8 hours An arrival goes to the service facility immediately, if it is free. Otherwise, it
will wait in a queue. The queue discipline is first-come first served. If the attendant’s
wages are Rs. 10 per hour and the customer’s waiting time costs Rs. 15 per hour, then
would it be economical proposition to engage a second attendant? Answer using Monte
- carlo simulation technique.

You might also like