Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-03-17 21:15:56

lucik1900
Member
Registered: 2013-03-15
Posts: 12

rat run probability

A rat is released in the space outside a maze consisting of three rooms and six doors, as depicted in the following figure.

Whenever the rat is in a space or room with k doors, it chooses each of these doors to move through next with probability 1/k. We are interested in the movement of the rat from when it first enters the maze until it first leaves.

(a) If the rat enters the maze at Room 1, find the probability that it will leave
from Room 3.
(b) If the rat starts in the space around the maze, find the probability that it will
eventually leave the maze from Room 3.
(c) If the rat leaves the maze from Room 3 find the probability that it entered at
Room 1.
(d) Suppose that the rat is now in the maze and we gain information which
makes us 70% confident that it entered at Room 1 and 20% confident
that it entered at Room 2.

Find the probability that:
(i) the rat will leave from Room 3
(ii) the rat entered at Room 1 if it leaves from Room 3
(iii) the rat entered at Room 1 if it leaves from Room 1.
For (d) it may be assumed that had we known at which room the rat entered the maze,
the said additional information would not alter our beliefs regarding subsequent movements of the rat.

Please help me !!Thank you very much!dizzydizzy

Offline

#2 2013-03-17 22:06:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Hi;

(a) If the rat enters the maze at Room 1, find the probability that it will leave
from Room 3.

These are Markov chains but the terminology is confusing. What does it mean to leave from room 3. Does it mean to end up in the space or in room 2?

Last edited by bobbym (2013-03-18 00:18:51)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2013-03-17 23:58:29

lucik1900
Member
Registered: 2013-03-15
Posts: 12

Re: rat run probability

"We are interested in the movement of the rat from when it first enters the maze until it first leaves."

It should be "end up the space"

Offline

#4 2013-03-18 00:13:11

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Hi;

So we start in the space and for this one we end up in the space.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2013-03-18 06:33:15

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Hi;

Last edited by bobbym (2013-03-18 06:33:29)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2013-03-18 16:51:55

lucik1900
Member
Registered: 2013-03-15
Posts: 12

Re: rat run probability

Hi,
How do you get that?

could you please show me your working?

Offline

#7 2013-03-18 19:42:54

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Hi;

Two ways, computer simulation and Absorbing Markov chain. There is a third way but I am unable to get it to work,


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#8 2013-03-29 23:18:12

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

What are Markov Chains?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#9 2013-03-29 23:26:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

named after Andrey Markov, is a mathematical system that undergoes transitions from one state to another, between a finite or countable number of possible states. It is a random process usually characterized as memoryless: the next state depends only on the current state and not on the sequence of events that preceded it. This specific kind of "memorylessness" is called the Markov property. Markov chains have many applications as statistical models of real-world processes

As usual Wikipedia achieves new heights in turning something simple into something that only Einstein can understand.

To understand them you have to see them.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2013-03-29 23:28:33

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

Hopefully not with a video


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#11 2013-03-29 23:29:20

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

No, with a small example. I was just working on one that is tiny.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#12 2013-03-29 23:32:17

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

Will you please show me? smile


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#13 2013-03-29 23:32:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Markov chains are used i probability and you will need to understand matrices and vectors. If you do not, don't worry, just enjoy the show and it all will come later.

Lets say a city has 85% of its living in the city and 15% of the population lives in the suburbs. But each year 7% of the people in the city move to the suburbs but only 1% of the people in the suburbs move back to the city. Assuming that the total population remains constant ( suburbs + city ) what percentage of people will be in the city after 5 years?

How do we answer this question?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2013-03-29 23:50:32

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

We calculate it one by one year stepwise


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#15 2013-03-29 23:55:59

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

There is an easier way.

This is the initial state vector,

The transition matrix P is

Nothing amazing here just defining the terms.

We can strip away the labels and just leave the numbers.

To get the answer we just evaluate

To do that take this expression

{.85,.15}.MatrixPower({{.93,.07},{.01,.99}},5)

over to Wolfram and let me know what you get.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2013-03-30 00:30:49

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#17 2013-03-30 00:37:01

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

That is very good.

Remember how the A0 vector ( initial state vector ) was labelled?

That says the first element is the percentage in the city and the second element, the percentage in the suburbs.

Now your answer was

That says 60.28% are in the city and 39.71% are now living in the suburbs after 5 years.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#18 2013-03-30 00:40:10

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

Ok


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#19 2013-03-30 00:45:34

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

This is a pretty dry example that only touches the surface of what they can do. A real problem would be much larger and more meaningful.
The OP's problem can be solved with Markov chains.

But at least you got to see a little bit of it.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2013-03-30 00:49:59

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

Oh! So it is a way to do a chain of calculations quickly with matrices?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#21 2013-03-30 00:52:30

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Yes, it is like condensing a whole tree down to just a box of numbers. Also it can contain a tree that has an infinite number of levels, branches and nodes. One that you could never draw...


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#22 2013-03-30 00:56:48

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

How to setup the simulation for this problem?


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#23 2013-03-30 01:01:49

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Hi;

We can solve the problem using 2 linked recurrences:

I spoke to soon before, there might be a way to simulate this process. We will talk about it when I get back.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#24 2013-03-30 02:08:10

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: rat run probability

Sorry for the confusion, I meant : the simulation approach for the OP's problem


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#25 2013-03-30 04:41:48

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: rat run probability

Which part? There are a lot of questions that the OP wanted answers to.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB