Simulation Problems

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Compiled by Prof.

Niketa Gandhi, UDCS

M.Sc Part I Computer Science Paper III Section II Simulation & Modeling University Problems (May 05 to October 10)
1. A company manufactures 200 motor cycles per day. Depending upon availability of raw materials and other conditions, the daily production has been varying from 196 motor cycles to 204 motor cycles, whose probability distribution is as given below: Production 196 197 198 199 200 201 202 203 204 per day Probability 0.05 0.09 0.12 0.14 0.20 0.15 0.11 0.08 0.06 The motor cycles are transported in a specially designed three storeyed lorry that can accommodate only 200 motor cycles. Using the following random numbers: 82, 89, 78, 24, 52, 53, 61, 18, 04, 23, 50, 77, 27, 54, 10. Simulate the process to find out: (i) The average number of motor cycles waiting in the factory. (ii) The average number of empty spaces on the lorry. (October 10) (8) 2. In a computer laboratory, the facility of only one printer is available for a group of four students. Each student has the same probability 0.30 of requiring the printer facility. Assume that all the four students work independently. Find the probability that the printer is not used by any one of them and probability that printer is used by only one of them. (October 10) (4) 3. A cola-dispensing machine is set to dispense on average 7 ounces of cola per cup. The standard deviation is 0.10 ounces. The distribution amounts dispensed follows a normal distribution. (Given area under standard normal curve from z = - to 1 is 0.8413) (i) What is the probability that the machine will dispense between 7.10 and 7.25 ounces of cola? (ii) What is the probability that the machine will dispense 7.25 ounces of cola or more? (October 10) (4) 4. A barber shop has two barbers. Assume that the customers arrive in a poisson fashion at the rate of 5 per hour. Each barber serves customers according to an exponential distribution with mean of 15 mins. (i) What is the probability that a customer will not have to wait for hair cut? (ii) What is the expected number of customers in the queue? (October 10) (4)

1/1

Compiled by Prof. Niketa Gandhi, UDCS

5. The time intervals between dial up connections to an Internet service provider are exponentially distributed with a mean of 15 seconds. Find the probability that the third dial up connection occurs after 30 seconds have elapsed. (October 10) (4) 6. Test whether the 3rd, 8th, 13th and so on, numbers in the following sequence are auto correlated. Use = 0.05 and table value = 1.96. Observations: 0.12, 0.01, 0.23, 0.28, 0.89, 0.31, 0.64, 0.28, 0.83, 0.93, 0.99, 0.15, 0.33, 0.35, 0.91, 0.41, 0.60, 0.27, 0.75, 0.88, 0.68, 0.49, 0.05, 0.43, 0.95, 0.58, 0.19, 0.36, 0.69, 0.87. (October 10) (8) 7. Write an algorithm to generate a sequence of 2-digit random numbers using Linear Congruential method. Also generate there random numbers between 0 and 1 with X0 = 37, a = 7, c = 29 and m = 100. (October 10) (5) 8. A firm has a single channel service station with the following arrivals and service time probability distributions: Inter-arrival time Probability Service Time Probability (minutes) 10 0.10 5 0.08 15 0.25 10 0.14 20 0.30 15 0.18 25 0.25 20 0.24 The customers arrival at the 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 10 am. 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 attendants wages are Rs. 1 per minute and the customers waiting time costs Rs. 1.5 per minute. Obtain average waiting time cost of customer and average attendants wage using simulation for next ten arrivals. Use random numbers: For arrival: 0.64, 0.28, 0.83, 0.93, 0.99, 0.15, 0.33, 0.35, 0.91, 0.41 For service: 0.35, 0.59, 0.01, 0.87, 0.59, 0.80, 0.09, 0.30, 0.47, 0.27 (April 10) (9)

9. Suppose a random variable X has following probability density function: P(x) = 1/3; x = 0 = 2/3; x = 1 = 0; elsewhere Obtain (i) Cumulative Distribution Function (cdf) (ii) Expectation of X (E(X)) and (iii) P(X=2)
2/2

Compiled by Prof. Niketa Gandhi, UDCS

(April 10)

(4)

10. The average number of students visiting health unit in a University on any one day follows a Poisson distribution equal to four students per day. What is the probability that the number of students visiting the health unit on a particular day is (i) equal to five and (ii) less than one? (April 10) (4) 11. Life time of the video adapter card for a PC, in months denoted by the random variable X is exponentially distributed with mean 4. What is the probability that the card will last for at least 2 years and what is the probability that the card will last for more 2 years given that it was alive at one hour? (April 10) (4) 12. A barber shop is run by a single barber and the shop has total six chairs available to accommodate waiting customers. When all chairs are full a person has to go elsewhere without entering the shop. Customers arrive with a Poisson process at an average rate of three per hour and spend fifteen minutes in the barbers chair for hair cut. (i) What is the probability that a customer will not have to wait for hair cut? (ii) What is the expected number of customers in the queue? (April 10) (4) 13. The mean starting salary for college graduates in the spring of 2005 was $36, 280. Assume that the distribution of starting salaries follows the normal distribution with standard deviation of $3, 300. What is the probability that graduates have starting salaries (i) between #35,000 and $40, 000 (ii) more than $45,000. Given area under standard normal curve; from z = - to 1.13 is 0.870762; from z = - to -0.39 is 0.3483 and from z = - to 2.64 is 0.9959. (April 10) (4) 14. Obtain a generator to generate random sample for the following distribution: F(x) = 0; x < 0 = x2/2; 0 < x < 1 = 1 (2 x)2/2; 1 < x < 2 = 1; x > 2 Also generate a random sample of size n = 3 using your generator. To generate random sample use random numbers; 0.276, 0.183, 0.080. (April 10)

(5)

15. The probability distribution of the yields of corn for the current weather conditions is given below:Yield per 120 140 160 180 acre in kgs Probability 0.18 0.26 0.44 0.12
3/3

Compiled by Prof. Niketa Gandhi, UDCS

The probability distribution of per kg price of corn as follows: Price per 10 12 14 16 18 kg. in Rs. Probability 0.20 0.30 0.25 0.15 0.10 Assuming that prices are independent of yields, combine these two into revenue per acre for next 5 years. Also, find the average revenue per acre. Use following random numbers: For Yield: 20, 72, 34, 54, 30 For Price: 82, 95, 15, 96, 23 (Revenue per Acre = Yield per Acre x Price per kg.) (October 09) (8) 16. A pair of unbiased dice is rolled once. Find the probability distribution function of the sum of the two numbers occurring on the uppermost face of the dice. Also find the cumulative distribution function. (October 09) (4) 17. A production process manufacturing computer chips produces on average 2% defective chips. Everyday a random sample of 10 chips is taken from the process. The process will be stopped if the sample contains not more than two defective chips. Determine the probability that the process is stopped by this sampling scheme. (October 09) (4) 18. The income of a group of 5000 persons is normally distributed with mean Rs. 7500 and standard deviation Rs. 500. Find the number of persons having income (i) above Rs. 8500 (ii) between Rs. 7000 and Rs. 8250. Given: the area (A) below the Standard Normal Curve between 0 and x is as follows:x A 1.00 0.34134 1.50 0.43319 2.00 0.47725 (October 09)

(4)

19. A small barber shop, operated by a single barber, has room for at most 2 customers. Potential customers arrive at a poisson rate of 3 per hour and successive service times are independent exponential random variables with mean hours. (i) What is the probability that the system is empty? (ii) What is the expected number of customers in the system? (October 09) (4) 20. Consider the following sequence of random numbers:0.12 0.01 0.23 0.28 0.89 0.31 0.99 0.15 0.33 0.35 0.91 0.41 0.68 0.49 0.05 0.43 0.95 0.58
4/4

0.64 0.60 0.19

0.28 0.27 0.36

0.83 0.75 0.69

0.93 0.88 0.87

Compiled by Prof. Niketa Gandhi, UDCS

Test whether 3rd, 8th, 13th etc. numbers in the sequence are auto correlated. [Given: the area below the Standard Normal Curve between + 1.96 is 0.95] (October 09) 21. People were found to arrive at a one-person employment office according to the following probability distribution. Inter-arrival time(in minutes) 2 3 4 5 6 Probability 0.10 0.25 0.35 0.20 0.10 If the service time is 4 minutes for all, use simulation to determine i.) The average waiting time in the system. ii.) The maximum queue length. Use the following sequence of random numbers: 14,68,8,48,78,19,51,77,15 (October 09)

(8)

(8)

22. The probability distribution of demand of cakes from the Fresh Food Bakery has been as follows: Daily Demand 0 10 20 30 40 Probability 0.05 0.30 0.30 0.25 0.10 The probability distribution of production is as follows: Daily Production 10 20 30 40 Probability 0.35 0.30 0.20 0.15 The bakerys production cost is Rs. 4/- per cake, sale price is Rs. 10/- per cake, and any cake unsold is waste. Estimate average demand of cakes and average profit or loss per day by simulating for 5 days. Use the following random numbers. For demand: 50, 22, 96, 31, 78 For production: 74, 54, 13, 26, 94 (April 09) (8) 23. A pair of unbiased dice is rolled once. Find the probability distribution of the minimum of the two numbers occurring on the upper most face of the dice. Also find the mean. (April 09) (4) 24. An ambulance service gets on average 4 emergency calls at night. Assuming Poisson distribution, find the probability of receiving at most 2 emergency calls tomorrow night. (April 09) (4) 25. The marks in a particular subject are assumed to follow a normal distribution with mean 40 and variance 9. If 1000 students appear for the test, find the number of students who get marks: (1) below 36 (2) between 43 and 46. Given the area (A) below the standard normal curve between 0 and x is as follows: x 1.00 1.33 2.00 A 0.34134 0.40824 0.47725

5/5

Compiled by Prof. Niketa Gandhi, UDCS

(April 09)

(4)

26. A telephone exchange has two long distance operators. It is observed that during the peak load, long distance calls arrive in a poisson fashion at an average rate of 15 per hour. The length of service on these calls is exponentially distributed with mean length of 5 minutes. (i) What is the probability that the system is empty? (ii) What is the expected number of customers in the queue? (April 09) (4) 27. A sequence of 10000 four digit numbers has been generated and an analysis indicates the following combinations and frequencies: Combination Observed Frequency Four different digits 5650 One pair of digits 3920 Three like digits 240 Two pairs 170 All four digits are same 20 Based on Poker test, test whether these numbers are independent. Given: The table values of Chi-square with n d.f for = 0.05 are given below: n 1 2 3 4 Table Value 3.841 5.991 7.815 9.488 (April 09) (8) 28. A bakery keeps a stock of popular brand of bread. Previous experience indicates the daily demand as given below: Daily Demand 0 10 20 30 40 50 Probability 0.01 0.20 0.15 0.50 0.12 0.02 Consider the following sequence of random numbers: 48, 78,19,51,56,77,15,14,68,8 Using the above sequence, simulate the demand for the next 10 days. i.) If the owner of the bakery decides to make 30 breads everyday, find out the stock situation. ii.) Estimate the daily average demand for the bread on the basis of simulated data. (October 08) (8) 29. A storm hitting the eastern coast of India follows a Poisson distribution with a mean of 0.5 per year. Determine the probability of i.) more than two storms hitting the Indian coast in a year ii.) no storms hits the Indian coast in a year (October 08) (4)

6/6

Compiled by Prof. Niketa Gandhi, UDCS

30. The lifetime, in years, of a satellite placed in orbit is given by an Exponential distribution with mean 2. Find the probability that the satellite dies between 3 to 6 years from the time it is placed in the orbit. (October 08) (4) 31. A barber shop is run by a single barber and the shop has total 6 more chairs available to accommodate waiting customers. When all chairs are full a person has to go elsewhere without entering the shop. Customers arrive with a poisson process at an average rate of 3 per hour and spend 15 minutes in the barbers chair for hair cut. i.) What is the probability that a customer will not have to wait for hair cut? ii.) What is the expected number of customers in the queue? (October 08) (4) 32. The mean yield for one acre plot is 660 kilos and s.d. is 8 kilos. Assuming normal distribution, find the probability that for a one acre plot selected at random the yield is (i) over 680 kilos (ii) between 670 kilos and 690 kilos. [Given: the area (A) below the Standard Normal Curve between 0 and x is as follows] X 1.25 2.50 3.75 A 0.39435 0.49379 0.49991 (October 08) (4) 33. Use the Runs Up and Runs Down Test to determine whether the hypothesis of Independence can be accepted for the following set of numbers. Use = 0.05. [Given: the area below the Standard Normal Curve between + 1.96 is 0.95] 0.37 0.51 0.54 0.01 0.81 0.28 0.69 0.34 0.75 0.49 0.72 0.43 0.56 0.97 0.30 0.94 0.96 0.58 0.73 0.05 0.06 0.39 0.84 0.24 0.40 0.64 0.40 0.19 0.74 0.62 (October 08) (8) 34. Forty percent of the assembled ink-jet printers are rejected at the inspection station. Find the probability that i.) the first acceptable ink-jet printer is the third one inspected. ii.) Of the 5 ink-jet printers none is acceptable. (7th April 08) 35. For a Uniform(Rectangular) distribution over (4,16) find the probability that X lies between 6 and 8. (7th April 08)

(4)

(4)

29.A barber shop has two barbers. Assume that the customers arrive in Poisson fashion at the rate of 5 per hour. Each barber serves customers according to an Exponential Distribution with a mean of 15 minutes. i.) What is the probability that a customer will not have to wait for a haircut? ii.) What is the expected number of customers in the queue? (7th April 08) (4)
7/7

Compiled by Prof. Niketa Gandhi, UDCS

30. The weights of N.C.C Cadets are found to be normally distributed with mean 50 Kg. and s.d. 5 k.g. If a cadet is selected at random find the probability that his weight is i.) above 55 kg. ii.) between 40 kg. and 65 kg. [Given the area (A) below the Standard Normal Curve between 0 and x is as follows] x 1.00 2.00 3.00 A 0.34134 0.47725 0.49865 (7th April 08) 31. Use the Runs Above and Runs Below the Mean Test to determine whether the hypothesis of Independence can be accepted for the following set of numbers. Use = 0.05 [Given : the area below the Standard Normal Curve between +- 1.96 is 0.95] (4)

0.72 0.06 0.18

0.43 0.39 0.26

0.56 0.84 0.98

0.97 0.24 0.88

0.30 0.40 0.64

0.94 0.64 0.47

0.96 0.40 0.60

0.58 0.19 0.11

0.73 0.74 0.29

0.05 0.62 0.78 (8)

(7th April 08) 32.The Probability density function of the life of an electronic device is given by f(x) = (1/2) e-x/2 for x 0 =0 otherwise, Find the Mean and Variance of the distribution. (19th October 07)

(5)

33. Arrivals at a bank tellers window are Poisson distributed at the rate of 1.2 per minute. i.) What is the probability of zero arrivals in the next minute? ii.) What is the probability of zero arrivals in the next 2 minutes? (19th October 07) (5) 34.Customers arrive at a railway reservation counter at random at a rate of 50 customers per hour. There are 20 reservation clerks, each serving 5 customers per hour on an average. i.) Find average number of busy servers. ii.) Find the long run average utilization of a server. iii.)If the railway authorities want to reduce the number of servers, what is the minimum number of servers needed to have a stable system. (19th October 07) (5)

8/8

Compiled by Prof. Niketa Gandhi, UDCS

35. A sequence of 1000 three digit numbers are generated and an analysis indicates that 680 have three different digits, 289 contain exactly one pair of like digits and 31 contain three like digits. Use Poker to test check whether the numbers are independent. [Given : 2 0.005 , 2 = 5.99] (19th October 07) (5) 36.The Probability density function of the life time of an electric bulb is given by f(x) = (1/2) e-x/2 for x 0 =0 otherwise. (7th April 07)

(5)

37. Some of the students who have taken admission for MSc. Computer Science are Debarred from writing University Examination because of poor attendance. Records Indicate that the number of the students debarred from University examination Because of poor attendance follow Poisson Distribution with a mean of 1 %. Find Probability that two or fewer number of students will be debarred from examination Because of poor attendance in the total enrollment of 300 students for the course. (7th April 07) (5) 38. The inter arrival times and service times of a single window driving license issuing Office are exponentially distributed. The value of and are 2 per hour and 3 per Hour respectively. Find i.) The server utilization . ii.) The probability of only one customer in the queue. (7th April 07)

(5)

39. Use Linear congruential method to generate a sequence of three 2-digit random Numbers. [Given : x0 = 27, a = 8, c = 47 and m = 100.] (7th April 07)

(5)

40.Develop a random variate generation scheme for the triangular distribution with Pdf given by : f(x) = (x - 2) / 2 where 2 x 3 = 2(6 - x)/12 where 3 x 6 =0 otherwise (7th April 07) 41. A Local Computer Company has found from experience that the demand for Computer is distributed as Poisson with a mean of 4 computers per week. If the company keeps 6 computers during a particular week, what is the probability
9/9

(5)

Compiled by Prof. Niketa Gandhi, UDCS

that the demand for computer will exceed the supply that week. (Given : e-4 = 0.0183) (20th October 06)

(5)

42. The life in hours of electronic tubes manufactured by a certain process is known to have probability density function : f(x) = (1/500) e -(1/500) (x - 500) , x 500 Determine the chance of one such tube lasting for i.) at least 1000 hours ii.) any where from 600 to 900 hours. (Given : e-1 = 0.3679, e-1.8 = 0.1653, e-1. 2 = 0.3012, e-0.2 = 0.8187 and e -0.8 = 0.4493, e = 2.7183) (20th October 06) (5)

43. Explain the procedure of Random Variable generation for Exponential distribution. And also generate three random variables for exponential distribution with = 2 and Using the following random numbers 0.94, 0.87 and 0.37. (5) (20th October 06) 44. The following table gives the average system times in four Replications of the simulation model for the Able Baker Carhop problem : Run Able`s utilization 1 0.808 2 0.875 3 0.708 4 0.842 Obtain 95% confidence interval for the average system time. (Given : t0.25 , 3 = 3.18 from Students t-table). (20th October 06) 45. A sample of 200 arrivals at a service station to the following distribution Inter arrival time : 0.5 1 (in minutes) Probability : 0.03 0.1 1.5 2 2.5 3

(5)

0.12

0.31

0.26

0.18

The observed service time distribution is : Service Time : 0.5 1 1.5 2 2.5 (in minutes) Probability : 0.05 0.22 0.25 0.15 0.2

0.13

10/10

Compiled by Prof. Niketa Gandhi, UDCS

Estimate average percentage of customers waiting and idle time of the server by Simulating for the next 10 arrivals. Observations begins at the time t = 0. First, Customer arrives later. Random Numbers : For arrival distribution : 85 96 28 66 68 35 19 45 69 59 For service distribution :74 29 92 62 31 44 24 70 52 43 (8th April 06) 46. Arrivals at bank tellers cage are Poisson distributed at the rate of 1.2 per minute. i.) What is the probability of zero arrivals in the next two minutes ? ii.) What is the probability of one arrival in the next two minutes? (Given e-1.2 = 0.3012 and e-2.4 = 0.0907) (8th April 06)

(5)

(5)

47. A sample of 100 dry battery cells tested to find the length of life produced the following results : mean = 12 hours, standard deviation (s.d.) = 3 hours. Assuming that the data are normally distributed, what percentage of battery cells are expected to have life i.) more than 15 hours ii.) between 10 and 14 hours? Given area under standard normal curve : from z = - to z =1 is 0.84134 and from z = - to z = 0.67 is 0.74857. (8th April 06)

(5)

48. Explain procedure of generating random variables by inverse transformation for Continous Uniform distribution. Also generate three random variables for Uniform Distribution for the given parameter values a = 2 and b = 5 using the following Random numbers : 0.19, 0.29 and 0.94 (8th April 06) (5)

49. A survey conducted by a market research agency indicated that 82% of customers who engage in window shopping and enquiring about the price of a particular product ends up purchasing the product within a year. Find the probability that two or more customers in a sample of twenty will never purchase the product they where interested in. (21st October 05) 50. The pdf of the life of a laser ray device is given by f(x) = (1/2) e-(x/2) if x 0 =0 otherwise.
11/11

(3)

Compiled by Prof. Niketa Gandhi, UDCS

Find the Mean and Variance of the distribution. (21st October 05) (4) 51. IQ scores are normally distributed throughout society with a mean of 100 and standard deviation of 15. i.) A person with an IQ 140 or higher is called brilliant. What proportion of society is in the brilliant category? iii.) What proportion of society will miss the brilliant category by 5 or less points? (Given from the standard normal z-table : p(z 2.67) = 0.99621, p(z 2.33) = 0.99010, p(z 3) = 0.99952 (21st October 05) (4)

52. For the following sequences of random numbers, test whether the hypothesis that the numbers are independent be rejected at 5% level of significance using runs above and below the mean test. 0.41 0.68 0.89 0.94 0.74 0.91 0.55 0.62 0.36 0.27 0.19 0.72 0.75 0.08 0.54 0.02 0.01 0.36 0.16 0.28 0.18 0.01 0.95 0.69 0.18 0.47 0.23 0.32 0.82 0.53 0.31 0.42 0.73 0.04 0.83 0.45 0.13 0.57 0.63 0.29 (Given : p(z 1.96) = 0.975 from the standard normal z-table) (21st October 05)

(5)

53. Write the cdf of a triangular distribution. Use this to generate a sequence of Triangular variates with the range (1, 10) and mode at x=4 by applying Inverse Transform method. (21st October 05)

(5)

54. The following table gives the average system times in four replications of the Simulation model for the Able Baker Carhop problem.

Run 1 2 3 4

Ables utilization 0.808 0.875 0.708 0.842

Compute a 95% confidence interval for the average system time. (Given t 0.25 = 3.18 from Students t-table.) (21st October 05)

(5)

12/12

Compiled by Prof. Niketa Gandhi, UDCS

55. State the cdf of a triangular distribution. Use it to solve the following problem The Central Processing Unit requirement for programs in an operating system follow a triangular distribution with a = 0.05, b = 1.5 and c = 6 seconds. Determine the CPU requirement for a program is at most 2.5 seconds. (13th May 05) 56. A service engineer is beeped each time there is a call for service. The number of beeps per hour occurs in Poisson distribution with the mean 3 per hour. i.) Find the probability that there will be no calls in one-hour period. ii.) Find the probability that there will be 3 or more calls in one-hour period. (13th May 05) 57. The Inter-arrival times and service times at a single window railway reservation Counter are given to be exponentially distributed. If the arrival rate is 2 customers Per hour and service rate is 3 customers per hour, find the following: i.) The probability that the window is idle. ii.) The probability that the window is busy. iii.) The average number customers in the system. iv.) The server utilization. (13th May 05)

(4)

(4)

(4)

58. Briefly explain Kolmogrov-Smirnov(KS) test to check the uniformity of random Numbers. A sequence of numbers 0.54, 0,73, 0.98, 0.11 and 0.68 has been generated. Use The Kolmogorov-Smirnov test to determine if the hypothesis that the numbers are Uniformly distributed on the interval [0,1] can be rejected (Given D0.05 = 0.565 for N = 5 from KS table) (13th May 05)

(5)

59. 100 random numbers between 0 and 1 are classified into ten classes as in the Following. Check whether the numbers are uniformly distributed using Chi-Squared Test. Class 1 2 3 4 5 6 7 8 9 10 Observed 8 8 10 9 12 8 10 14 10 11 numbers (Given : level of significance = 5%, x2 0.05, 9 = 15.9) (13th May 05) (5) 60. A simulation model of a job shop was developed to investigate different scheduling Rules. To validate the model, the currently used scheduling rule was incorporated Into the model and the resulting output compared to observed system behaviour. By Searching the previous years data it was estimated that the average number of jobs in Shop was 22.5 on a given day. Seven independent replications of the model were
13/13

Compiled by Prof. Niketa Gandhi, UDCS

Run, each of 30 days, with following results for the average number of jobs in the Shop. 18.9 22.0 19.4 22.1 19.8 21.9 20.2 i.) Develop and conduct a statistical test using students t-distribution to determine if model output is consistent with system behavior. ii.) What is the power of this test if a difference of two jobs is viewed as Critical? iii.) What sample size is needed to guarantee a power of 0.8 or higher? (Given : Level of significance = 5%, t0.25, 6 = 2.45 from students t-table) (13th May 05)

(5)

14/14

You might also like