Professional Documents
Culture Documents
CMT 431 Mat 466
CMT 431 Mat 466
FACULTY OF SCIENCE
REGULAR PROGRAMME
(ii.) Determine the value of π using Monte-Carlo Method given the area of a circle
is A=π r 2 . Generate 10 pairs of random numbers (5 marks)
d.) Customers arrive at a watch repair shop according to a Poisson process at a rate of
one per every 10 minutes and the service time is an exponential random variable with
mean of 8 minutes. Find:
(iii.) The number of customers waiting for a service at a given time (2 marks)
Q2 a.) Highlight the steps involved in the following tests for random numbers
Q 3 a.) Generate ten random numbers and use them to determine the outcomes of
the following
(i) Throwing an unbiased coin (4 marks)
(ii) Throwing a dice (4 marks)
(iii) The colour of a traffic light found by a randomly arriving car when green is
50% of the time, yellow is 10% of the time and red is 40% of the time (4 marks)
b.) (i.)Use Monte-Carlo method to solve the following integrals using 10 pairs of
random numbers
4
I =∫ x dx
2
(4 marks)
1
(iii.) The color of traffic light found by a randomly arriving car when green is 50 % of
the time, yellow is 10% of the time and the red is 40% of the time (5 marks)
c.) Generate a sequence of five random numbers, such that r i +1=ar ; ar:mod m taking
a=16, m=23 and r 0 =15 (4 marks)
Q5 a.) James Kamau who is a barber, has found out that he can shave on average 6
customers per hour. The arrival rate of customers averages 5 customers per hour.
Required:
(i.) The proportion of time that James Kamau is idle. (2 marks)
(ii.) The probability that a customer receives immediate service upon arrival.
(2 marks)
(iii.) Average number of customers in the queuing system. (3 marks)
(iv.) Average time a customer spends in the queuing system. (3 marks)
b.) Analyze the merits and demerits of simulation technique (10 marks)
*END*