Math Is Fun Forum

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

You are not logged in.

#51 2014-09-09 20:46:08

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

Re: Markov chains

Ok but I am sleeping now, how Can I post simulations while sleeping?

Zzz


'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

#52 2014-09-09 20:48:20

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

Re: Markov chains

I was asking anonimnystefy but it may be possible to use even less than 9 states as an answer to you.


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

#53 2014-09-09 20:49:57

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

Re: Markov chains

Okay, how?


'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

#54 2014-09-09 20:52:43

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

Re: Markov chains

It is just an idea right now. It probably will not even work. I am still working on a reasonable simulation first.

See you in a little bit have to get a bit of rest.


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

#55 2014-09-09 21:24:21

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

To have only 9 states, you can merge the cases where only B is left, only C is left, B and C are left with B being asked first, B and C are left with C being asked first and use that one as an absorbing state.

I'll post the sim as soon as possible.

EDIT: Here it is:

Count[Table[Block[{l = {1, 2, 3}},
While[Length[l] > 1,
  r = RandomReal[];
  If[(Length[l] > 1) && (r < 1/5), l = DeleteCases[l, 1]];
  r = RandomReal[];
  If[(Length[l] > 1) && (r < 1/2), l = DeleteCases[l, 2]];
  r = RandomReal[];
  If[(Length[l] > 1) && (r < 9/10), l = DeleteCases[l, 3]];];
  l
], {1000000}] // Flatten, 1]/1000000 // N

Last edited by anonimnystefy (2014-09-09 22:38:20)


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#56 2014-09-10 02:06:12

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

Re: Markov chains

Hi;

Here is mine:

h = Table[{.8, .5, .1}, {33}];
n = 1000000;
ans = Table[
   s = h;
   w1 = RandomInteger[{1, 33}];
   s[[w1, 1]] = .2;
   w2 = RandomInteger[{1, 33}];
   w3 = RandomInteger[{1, 33}];
   s[[w3, 3]] = .9;
   w1 < Max[w3, w2], {n}];
Count[ans, True]/n // N

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

#57 2014-09-10 04:45:30

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

Re: Markov chains

Isn't this thread about 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

#58 2014-09-10 04:56:23

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

Re: Markov chains

Yes it is but we are at your request working on a specific problem which I have not solved yet. The simulation now provides an approximate answer and a bound on that answer. This will weed out many dead ends. The digital age has made this a difficult concept to grasp.


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

#59 2014-09-10 06:30:25

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

I have solved it, and I'm pretty sure of the answer. The simulation and the analytic method agree.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#60 2014-09-10 06:44:55

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

Re: Markov chains

Okay, I am still working on 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

#61 2014-09-10 07:39:44

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

Hm, your simulation is incorrect. You are not calculating the probability correctly.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#62 2014-09-10 07:47:24

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

Re: Markov chains

I made it to get an approximate answer? It gets about .65 which is quite close.

You can post your solution if you like because I have to go shopping and need to work on mine a bit longer. Please label your rows and columns.


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

#63 2014-09-10 08:00:02

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

I can post it, but the fact that it's close is just a coincidence here. It would get that number whatever the probabilities were.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#64 2014-09-10 08:11:26

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

Re: Markov chains

Hi;

It does appear you are correct! I am having trouble writing this one in the functional style.

Post yours please.


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

#65 2014-09-10 08:22:04

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

I already did.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#66 2014-09-10 08:46:52

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

Re: Markov chains

I meant the analytical solution.


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

#67 2014-09-10 08:53:48

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

Ah, sorry.

Well, it's very stupid.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#68 2014-09-10 08:55:24

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

Re: Markov chains

Looks pretty good from here but it is not a Markov chain.


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

#69 2014-09-10 08:58:25

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

It is not, but that is my solution.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#70 2014-09-10 09:00:31

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

Re: Markov chains

I was afraid you were going to say that. I am not sure this one can be solved by a Markov chain.


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

#71 2014-09-10 09:02:01

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

It can, I have the matrix. It's quite big, though.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#72 2014-09-10 09:04:25

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

Re: Markov chains

Ah, can you post that? I am having trouble with that portion of the problem too.


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

#73 2014-09-10 09:10:06

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

#74 2014-09-10 09:11:44

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

Re: Markov chains

Wunderbar! What are the labels?


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

#75 2014-09-10 09:14:21

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,049

Re: Markov chains

Sorry, forgot.

In order: *A*BC, A*B*C, AB*C*, *A*B, A*B*, *A*C, A*C*, A, B+C.


“Here lies the reader who will never open this book. He is forever dead.
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

Board footer

Powered by FluxBB