CommentSolution4_18

CommentSolution4_18 - . If this occurs, then we have that J...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
What is the algorithm in Q. 18 doing? In Q. 17 you have established that X = min f n 1 : I n = 1 g where the I n P ( I n = 1) = n = 1 ± P ( I n = 0) . Now, we have that there exists 2 (0 ; 1) such that n ² 1 . So, we can think of I n having the following decomposi- tion. I n = J n K n , where f J n : n 1 g and f K n : n 1 g are two independent sequences of independent Bernoulli random variables. The J n &s are NOT iden- tically distributed, P ( J n = 1) = n = 1 ± P ( J n = 0) . The K n with P ( K n = 1) = = 1 ± P ( K n = 0) . So, in order to simulate X we can do the following. First we simulate S = min f n 1 : K n = 1 g (note that S ² X ). Observe that S ³ Geo ( ) , we know then that K S = 1 to see if I S = 1 we must check if J S = 1 and to do so we simulate an independent uniform U ³ U [0 ; 1] and check if S ² U
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . If this occurs, then we have that J S = 1 and therefore I S = J S K S = 1 . Clearly, then, in this case X = S . If on the other hand, we have that & S =& > U we must have that J S = 0 and therefore I S = 0 . So, we need to search for min f n > S : K n = 1 g (which is the second success in the sequence of K n &s). To so we simply simulate another Geo ( & ) , independent of everything else and add it up to S , that is S S + Geo ( & ) and once again we need to verify if J S = 1 , which we do exactly as we did before. We then continue in this way until we obtain both J S = 1 and K S = 1 at which point we let X = S . 1...
View Full Document

Ask a homework question - tutors are online