2009_final

download 2009_final

of 6

Transcript of 2009_final

  • 8/12/2019 2009_final

    1/6

    MS&E 221 Final Examination

    Ramesh Johari March 20, 2009

    Instructions

    1. Take alternate seating.

    2. Answer all questions in the blue examination books. Answers given on any other paper will

    not be counted.

    3. The examination begins at 8:30 am, and ends at 11:30 am.

    4. No notes, books, calculators, or other aids are allowed.

    5. Show your work! Partial credit will be given for correct reasoning.

    Honor Code

    In taking this examination, I acknowledge and accept the Stanford University Honor Code.

    NAME (signed)

    NAME (printed)

    1

  • 8/12/2019 2009_final

    2/6

    Useful Formulas

    1. IfXis a geometric random variable with parameterp, then the pmf ofX is:

    P(X=k) = (1 p)k1p, k 1.

    2. IfXis a binomial random variable with parametersp andn, then the pmf ofX is:

    P(X=k) =

    n

    k

    pk(1 p)nk =

    n!

    k!(n k)!pk(1 p)nk, 0 k n.

    3. IfTis an exponentially distributed random variable with mean1/, then the density ofT isgiven byfT, where:

    fT(t) =et, t 0.

    4. IfS is a random variable with a gamma distribution of parameters n and , where n is a

    positive integer, then the density ofSis given byfS, where:

    fS(s) =es(s)n1

    (n 1)! , s 0.

    5. IfNis a Poisson random variable of parameter, then the pmf ofN is:

    P(N=k) =ek

    k!, k 0.

    6. For an M/M/1 queue with arrival rate and service rate with < , the equilibrium

    distribution is:P(Q= j) = (1 )j, j 0,

    where= /.

    7. For anM/M/ queue with arrival rateand service rate, the equilibrium distribution is:

    P(Q= j) =ej

    j! , j 0,

    where= /.

    8. For anM/M/K/Kqueue with arrival rateand service rate, the equilibrium distributionis:

    P(Q= j) = j/j!

    1 + + K/K!, 0 j K,

    where= /.

    2

  • 8/12/2019 2009_final

    3/6

    Part A (5 questions; 5 points each; 25 points total)

    Answer each of the following short answer questions. Explain your answers!

    1. Let {Xn} and {Yn} be independent irreducible discrete time Markov chains on a finite

    state space {1, . . . , N } with the same invariant distribution ((1), . . . , (N)). Supposeboth chains start in state 1 at time 0. Let T be the first time strictly larger than zero thatXT =YT = 1. What isE[T]?

    2. SupposeX1, X2, . . . are independent and identically distributed random variables that takevalues in the nonnegative integers. DefineYn = max{X1, . . . , X n}. Are there any condi-tions under which {Yn} has a recurrent communicating class?

    3. Suppose that the rate matrix Q of a continuous time Markov chain is symmetric, i.e., it

    satisfiesQij = Qji. Does that imply the transition matrix of the corresponding jump chainis symmetric as well?

    4. Can a discrete time Markov chain on a finite state space have any null recurrent states?

    5. Consider a continuous time Markov chain on two statesAand B, with transition rate= 1from A to B, and transition rate = 2from Bto A. Let Tbe the last time the chain changedstatebeforetimet= 1, 000, 000, and let Sbe the first time the chain changes state aftertimet= 1, 000, 000. Give an approximate value for the mean ofS T.

    3

  • 8/12/2019 2009_final

    4/6

    Part B (3 questions; 75 points total)

    Problem 1 (5 points per part; 25 points total). A company has manufacturing plants in three

    citiesA,B , andC, and two inspectors. Inspectori requires an exponentially distributed amountof time with mean1/i(j)to inspect plantj . Assume that when an inspector finishes inspecting a

    plant, they immediately visit the plant the other inspector is not currently visiting.Assume that1(A) =1(B) =2(B) =2(C) = 1, and that1(C) =2(A) = 2.

    (a) Give an appropriate state space to describe the movement of the two inspectors, and draw the

    corresponding state transition diagram. Which states are recurrent, and which are transient?

    (b) Give the jump chain transition matrix corresponding to the model in part (a). Which states

    are recurrent, and which are transient? Which are aperiodic?

    (c) Without doing any calculations, explain why a unique invariant distribution exists for the

    jump chain. Is an invariant distribution for the continuous time chain?

    (d) Assume inspector 1 is currently at the plant in city A, and inspector 2 is currently at the plant

    in city B; call these their initial plants. Write a system of equations that can be solved to

    find the probability both inspectors visit the plant in city C at least once before the first time

    at which both inspectors simultaneously find themselves back at their initial plants.

    (e) Find the long run fraction of time that inspector 1 spends at the plant in city C.

    4

  • 8/12/2019 2009_final

    5/6

    Problem 2 (5 points per part; 30 points total). A store has a parking lot with Nspaces, whichare numbered1, 2, . . . , N ; the number of the parking spot denotes its distance from the front doorof the store. Cars arrive according to a Poisson process of rate . Upon arrival, a car parks in thelowest numbered parking spotthat is available; if the parking lot is full, the car leaves immediately.

    Assume that each parked car spends an exponentially distributed amount of time with mean1/

    in the parking lot, independently of other cars.

    (a) For this part only, suppose thatN = 1. What is the long run fraction of time that the singleparking spot is full?

    (b) For parts (b) and (c) only, assume thatN= 2. What is the long run fraction of time that thefirst parking spot is full?

    (c) Assume the parking lot is in equilibrium. If an arriving car is able to park, what is the mean

    distance from the car to the front door of the store?

    (d) For generalN, what is the long run fraction of arriving cars that are turned away?

    (e) For 1 n N, letXn(t) denote the number of free parking spaces at time t among thespaces numbered1, 2, . . . , n. Thus, for example, ifX4(t) = 2, it means that two of the fourspaces1, 2, 3, 4are free. For eachn, is {Xn(t)} a continuous time Markov chain? Explainyour answer.

    (f) (Harder complete only after you have finished the rest of the exam!) Now assume that

    N= , i.e., the parking lot has infinitely many spots.

    LetE(x, C)denote theErlang formula:

    E(x, C) =

    xC/C!

    1 + x + x2/2 + + xC/C! .

    Assume the parking lot is in equilibrium. Show that the mean distance an arriving car parks

    from the front of the store is:

    1 +

    C=1

    E

    , C

    .

    5

  • 8/12/2019 2009_final

    6/6

    Problem 3 (5 points per part; 20 points total). Suppose that orders arrive to a tailor shop

    according to a Poisson process of rate . Each order consists of a a random number of itemsof clothingN, where Nis a geometric random variable with parameter p, independent of otherorders. Assume that each garment requires an independent exponentially distributed amount of

    time to complete with mean1/, and that the tailor can only work on one garment at a time.

    (a) What is the distribution of the total processing time of a single order?

    (b) State an assumption on,p, andto ensure that the tailor does not build an infinite backlogof garments.

    (c) Under the assumption of part (b), what is the equilibrium disribution for the number of

    garments in the tailors shop?

    (d) Consider the following queueing system. Jobs arrive according to a Poisson process of rate ,and service times are independent exponentially distributed random variables of mean 1/.Assume that after a job completes service, it departs with probability p or is recirculatedback to the server with probability1p. What is the long run average number of jobs in thesystem?

    6