You are on page 1of 2

U NIVERSITY OF S CIENCE AND T ECHNOLOGY OF H ANOI

M ASTER ICT

Lottery ball game, where to put your money?

Dr. Anh Tuan GIANG


February 29, 2016

INTRODUCTION Markov chain is a mathematical framework that helps to model the


dynamic systems. In this practical work, we are going to simulate the behaviours of those
systems and compare the results between theory (provided by Markov modeling) and practice
(simulation).

1 T HE LOTTERY BALL GAME


The lottery ball game consists of two objects. First object is the lottery ball cage. This cage
is composed by 6 slots named sl ot 0 , sl ot 1 , sl ot 2 , sl ot 3 , sl ot 4 , sl ot 5 . There is a lottery ball at
sl ot 0 initially. Beneath each slot ground, there is a spring. This spring works as a gun triggered
when the ball stays on the slot ground. After being shot by the spring, the ball goes up and
can be dropped to the right or left slot except for the first and the last slot. A ball staying in
the first (or the last) slot can only moves to its right (or its left) slot after being shot. At each
window of a slot, there is a counting censor. This censor will count the number of times that a
ball passing through.
The second object of this game is the player. Initially, the player will choose a random
number between 500 and 1000 and beting his money on only one slot. Afterthat, the lottery
ball cage will trigger the ball and only stop when the number of passing time of the ball reach
the player random number.
The player will win the money if the ball stays in the slot that he bet before.

1
2 M ARKOV CHAIN MODELING
Now, assume that the probability of moving to the right slot is p and the left slot is 1 ° p.
Suppose that the moving probabilities of all slots are homogeneous which means p(sl ot i ) =
p(sl ot j ) wi t h i 6= j .

• Using Markov chain to model the game.

• What is the transition matrix of this model?

• Find the equilibrium distribution vector of this model.

3 L OTTERY BALL GAME SIMULATION


• First, code a program to simulate the whole game process.

• Second, use Monte Carlo method with this simulation, meaning that run your code
100.000 times to observe the output space.

• Last, compare the results between theory and simulation. Plot them with different
values of p.

You might also like