0% found this document useful (0 votes)
130 views4 pages

Midterm CS433 Key Answers

This document contains a midterm test for a simulation and modeling course. The test contains 9 questions covering key concepts like the difference between modeling and simulation, queue modeling, probability distributions including exponential and binomial, Monte Carlo simulation techniques, and using random variables to model scenarios. Students are asked to define terms, calculate probabilities, determine expected values, and apply concepts like queueing theory to example problems.

Uploaded by

glories_
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views4 pages

Midterm CS433 Key Answers

This document contains a midterm test for a simulation and modeling course. The test contains 9 questions covering key concepts like the difference between modeling and simulation, queue modeling, probability distributions including exponential and binomial, Monte Carlo simulation techniques, and using random variables to model scenarios. Students are asked to define terms, calculate probabilities, determine expected values, and apply concepts like queueing theory to example problems.

Uploaded by

glories_
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

KINGDOM OF SAUDI ARABIA ‫المملكة العربية السعودية‬

Ministry of Higher Education ‫وزارة التعليم العالي‬


Al-Imam Muhammad Ibn Saud Islamic ‫جامعة المام محمد بن سعود‬
University ‫السلمية‬
College of Computer & Information Sciences ‫كلية علوم الحاسب والمعلومات‬

Department of Computer Science


CS-433: Simulation and Modeling
Mid Term Test- 1

Max. Time: 1 h:30min


Name:…………………………………………………………………………………………………………………Grade: /30
ID number:

1. (2 points)
a. True or False? The process of validation checks to see if your computer code is correct.

b. True or False? An activity is duration of time of unspecified length.

c. True or False? The heart of any simulation language is the future events list.

d. Using your own words, clearly explain the difference between modeling and simulation.

Refer to the slides

2. What is an D/M/1 and M/M/1 queue? Is a Web server probably better modeled with a D/M/1 or
M/M/1 queue? Explain your answer. (1 points)

Refer to the slides.

3.The first eight customers at Menahi’s single-server ice cream shop have the following inter-
arrival times and priorities:

Further, if an arriving customer sees two or more people in the line, he will become disgusted and
leave the shop without ever entering the line. Each customer requires exactly 4 time units to be
served.

Dr. Ismail BEKHTI - phone 2581574 S2_2008/2009 1/4


- fill in the blank columns in the following table (4 points):

4. A random variable X can take on discrete values (negative integers and 0) as well as
continuous values (positive real numbers). It can be modeled by a probability density function f(x)
for the continuous values and a probability distribution function p(x) for the discrete values.

a. Write down the expression stating that the probability of X taking on any value is 1. (1 point)

b. Write down a formula for the expectation value E(X). (1 point)

5. Let X be a continuous real-valued random variable whose density function is

- Compute the mean E(X) and variance V(X) for the above random variable (2 points).

6.
a. If X ~ Exp(λ ) represents the lifetime of a lightbulb, find the probability that the lightbulb will
survive at least 1/λ time units. (1 points)

e-1.

b. If X ~ Exp(λ ) represents the lifetime of a lightbulb, find the probability that the lightbulb will
survive at least 2/λ time units given that it has already survived at least 1/λ time units. (1 point)

Dr. Ismail BEKHTI - phone 2581574 S2_2008/2009 2/4


e-1..
7. Suppose X, Y , and Z follow a Bernoulli(0.6). What is the probability that X + Y + Z > 2? (2
points)

that W = X+Y +Z ~ Bin(3; 0.6). Thus, P(W >= 2) = 0.648

7. A bus arrives every 20 minutes at a specified stop beginning at 6:40 a.m. and continuing until
8:40 a.m. A certain passenger does not know the schedule, but arrives randomly (Uniformly
distributed) between 7:00 a.m. and 7:30 a.m. every morning.

- What is the probability that the passenger waits more than 5 minutes for a bus? (3 points)

The passenger has to wait more than 5 minutes only if the arrival time is between 7:00 and 7:15
or between 7:20 and 7:30. If X is a RV that denotes the # of minues past 7:00 that the passenger
arrives,
the desired probability is P(0 < X < 15) + P(20 < X < 30). X is a uniform RV on (0,30).
Therefore the desired probability is given by

F(15) + F(30) - F(20) = 15/30 + 1 - 20/30 = 5/6.

8. Customers arrive at a store according to a Poisson process. The mean inter-arrival time is 2
minutes.

a. What is the probability that at least 2 customers arrive during a time interval of 4
minutes? (2 points)

b. The 1rst customer arrived after 1 minute. What is the probability that the second
customer arrives less than 1 minute later? (2 points)

Dr. Ismail BEKHTI - phone 2581574 S2_2008/2009 3/4


c. The 1rst customer arrived after 10 minutes. What is the probability that the second
customer arrives less than 1 minute later? (1 points)

d. After the store has been open for 8 hours, the number of customers n are counted. What
is the probability distribution for n? Give a formula. (2 points)

9. Suppose we are going to compute the area of a circle whose equation is (x+4)2 + (y-3)2 = 25,
using Monte Carlo simulation method.

(a) Define the corresponding distributions f(x) and f(y) (2 points)


(b) Show how a sample point (x, y) is determined using the (0, 1) random pairs (R1, R2).
(3 points)

Refer to the Monte Carlo simulation chapter

Dr. Ismail BEKHTI - phone 2581574 S2_2008/2009 4/4

You might also like