Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 9th, 2010 at 3:32:28 PM permalink
In Europe, as you may know, if the player makes an even money bet, and the ball lands in zero (on a single-zero wheel), the player may sometimes choose to "imprison" his bet. If the player chooses to imprison the bet, and it would otherwise win on the next spin, then the bet is returned as a push. If the imprisoned bet loses, the bet is lost. Let's call a bet in this state, after a zero, "single imprisoned."

However, if there is a second consecutive zero, then it becomes "double imprisoned." Then a win will move up the bet up a level, back to being single imprisoned. A loss always causes the bet to lose. Another zero would cause the bet to move down a level to "triple imprisoned."

Consider a bet on red, as an example. Let R=red outcome, Z=zero outcome.

Spin 1: Z, bet is single-imprisoned.
Spin 2: Z, bet is double-imprisoned.
Spin 3: R, bet is single-imprisoned.
Spin 4: Z, bet is double-imprisoned.
Spin 5: Z, bet is triple-imprisoned.
Spin 6: R, bet is double-imprisoned.
Etc...

The question is what is the probability of getting a push with infinite levels of imprisonment possible? I've heard casinos in Spain allow for infinite imprisonment, by the way, so this isn't just a theoretical question.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
BigTip
BigTip
  • Threads: 3
  • Posts: 67
Joined: May 25, 2010
September 9th, 2010 at 4:29:40 PM permalink
Mirage use to have a single zero European ruled table that had the en prison rule.
mkl654321
mkl654321
  • Threads: 65
  • Posts: 3412
Joined: Aug 8, 2010
September 9th, 2010 at 5:15:05 PM permalink
How could you ever reach a state where the imprisonment was "infinite"? No matter what, there would always be a POSSIBLE sequence of spins that would get the bet out of prison.
The fact that a believer is happier than a skeptic is no more to the point than the fact that a drunken man is happier than a sober one. The happiness of credulity is a cheap and dangerous quality.---George Bernard Shaw
BigTip
BigTip
  • Threads: 3
  • Posts: 67
Joined: May 25, 2010
September 9th, 2010 at 5:21:10 PM permalink
I don't think the meaning of infinite here means "forever". I think the meaning here means "unlimited". Blackjack tables usually let you split pairs four times. They could change the rule to an "infinite" number of times.
dwheatley
dwheatley
  • Threads: 25
  • Posts: 1246
Joined: Nov 16, 2009
September 9th, 2010 at 6:26:07 PM permalink
I think the question being asked is: what is the probability of a push, if there is no limit to the 'level' of imprisonment.

While there may be an easier way, I know a Markov analysis would answer this one. We need two absorption states, call them Success & Failure. let states 1 to n represent the imprisonment level, then consider the following transition matrix:

s F 1 2 3 4
-------------------------
S [ 1 0 0 0 0 ...

F [ 0 1 0 0 0 ...

1 [ 18/37 18/37 0 1/37 0 ...

2 [ 0 18/37 18/37 0 1/37 ...

3 [ 0 18/37 0 18/37 0 1/37

...

I think we see a pattern develop. If you find the limiting probabilities of this sucker, you can get the probability of success, which is the probability of a push. I have a computer program on another computer I'll visit next week, if no one finishes the work I'll try to post the answer.
Wisdom is the quality that keeps you out of situations where you would otherwise need it
weaselman
weaselman
  • Threads: 20
  • Posts: 2349
Joined: Jul 11, 2010
September 9th, 2010 at 6:34:00 PM permalink
If the first roll is zero (1/37), we get a push if either the next roll is red (18/37) or if the next sequence of rolls pushes (P), and then there is another red (18/37):
P = 1/37(18/37 + 18/37*P) = 18/37^2 * (P+1)


Solve this for P:
P=18/(37^2-18)=0.0133234641

Is this wrong?
"When two people always agree one of them is unnecessary"
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 9th, 2010 at 7:08:06 PM permalink
Quote: BigTip

I don't think the meaning of infinite here means "forever". I think the meaning here means "unlimited". Blackjack tables usually let you split pairs four times. They could change the rule to an "infinite" number of times.



Right, I meant what is the probability of a push from the initial state.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1730
Joined: Jul 26, 2010
September 9th, 2010 at 7:23:28 PM permalink
Quote: dwheatley

...what is the probability of a push, if there is no limit to the 'level' of imprisonment.



I get 0.01332586 as the probability of a push from the initial state of a bet on red.
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 9th, 2010 at 8:23:57 PM permalink
With a lot of hand-waiving math I'm getting 18/595=1.3899614%. I'm not very confident at this point. A telescoping sums solution seems to be evading me.

No, never mind, that can't be right.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
September 9th, 2010 at 9:20:37 PM permalink
My initial instinct is to model this as a recursive grammar:
Terms:
z = zero, or down one level
r = red, or up one level
b = black, or immediate loss.
And unless I'm mistaken, the generator for all push/success scenarios
A -> zA*r

I haven't determined whether there's a straightforward probability model for that yet, however.
"In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice." -- Girolamo Cardano, 1563
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 9th, 2010 at 9:32:58 PM permalink
Quote: MathExtremist

My initial instinct is to model this as a recursive grammar...I haven't determined whether there's a straightforward probability model for that yet, however.



Mine too. This seems like it should be easy, but I've been struggling with this for hours. Miplet...JFaulk...where are you?
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1730
Joined: Jul 26, 2010
September 9th, 2010 at 9:42:06 PM permalink
By the way, if z = probability of zero, and r = probability of red, then my probability of a push is 2rz/(1+sqrt(1-4rz)).
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 9th, 2010 at 10:42:42 PM permalink
Quote: ChesterDog

By the way, if z = probability of zero, and r = probability of red, then my probability of a push is 2rz/(1+sqrt(1-4rz)).



That comes to 0.01332586. I think that is a bit low. My estimate for an answer is 0.01334.

Note: Crossed out after posting, see new post below.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1730
Joined: Jul 26, 2010
September 9th, 2010 at 11:55:10 PM permalink
Here are the events that result in pushes (ignore the hyphens; they're just for spacing):
Z--R
Z-ZR-R
Z-ZZRR-R, Z-ZRZR-R
Z-ZZZRRR-R, Z-ZZRZRR-R, Z-ZZRRZR-R, Z-ZRZZRR-R, Z-ZRZRZR-R
etc.

Focus on the string in the middle of each event (between the hyphens). See that no initial segment of each string has more R's than Z's (because if there were more R's than Z's, the push would occur before the end of the string.) This is a definition of a "Dyck word," and the number of Dyck words of length 2n is the nth "Catalan number." See this Wikipedia article.

The Catalan numbers are (2n)!/(n!(n+1)!), and starting with n=0, they are 1, 1, 2, 5, 14, 42, 132,... So, the probability of a push should be this sum: 1*(zr) + 1*(zr)^2 + 2*(zr)^3 + 5*(zr)^4 + 14*(zr)^5 +42*(zr)^6...

I hope this reasoning is right.
weaselman
weaselman
  • Threads: 20
  • Posts: 2349
Joined: Jul 11, 2010
September 10th, 2010 at 4:20:26 AM permalink
Can someone explain what you think is wrong with my solution on the first page?
"When two people always agree one of them is unnecessary"
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 10th, 2010 at 7:18:30 AM permalink
ChesterDog, I think I may owe you an apology for doubting you yesterday. I ran a simulation last night. Here are the results:

Games played (starting from first level of imprisonment): 365,730,000,000
Pushes: 180,325,016,178
Ratio of pushes: 0.49305503
Probability of push from initial bet (1/37)*0.49305503 = 0.013325812

I will address your method later.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
September 10th, 2010 at 8:30:56 AM permalink
Quote: ChesterDog

The Catalan numbers are (2n)!/(n!(n+1)!), and starting with n=0, they are 1, 1, 2, 5, 14, 42, 132,... So, the probability of a push should be this sum: 1*(zr) + 1*(zr)^2 + 2*(zr)^3 + 5*(zr)^4 + 14*(zr)^5 +42*(zr)^6...

I hope this reasoning is right.


Yes, it looks good. I had forgotten about Dyck paths, probably since I learned about them while I was writing my Lisp parser in school and I've blocked Lisp out of my mind. Nicely done.

The probability of a push is the infinite sum above * zr again, since you can't get back to equal without ending (in this particular game). In other words, ZRZR isn't a valid solution, but Z-ZRZR-R is. Your initial formula is correct and includes the extra zr factor.

The WikiPedia page section that talks about "monotonic paths" is on-point for this problem.
"In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice." -- Girolamo Cardano, 1563
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 10th, 2010 at 4:33:16 PM permalink
Thanks for the refresher on Catalin numbers and Dyck pathes. It has been about 25 years, so I was rather rusty with them. So I understand how they could be used to find the probability of a push with a limited number of imprisonment layers. However, I have no clue how you got from the catalin numbers to the final answer of 2rz/(1+sqrt(1-4rz)) for infinite layers.

Please help!
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
weaselman
weaselman
  • Threads: 20
  • Posts: 2349
Joined: Jul 11, 2010
September 10th, 2010 at 4:57:17 PM permalink
Ok, I got where my mistake was. There can be more than one push between first zero, and last red:

P = zr + zPr + zPPr + zPPPr + ... = zr*sum(P^n)= zr/(1-P)

So, from P = zr/(1-P):

P^2 - P + zr = 0


P = (1 - sqrt(1-4zr))/2 = (1 - 1 + 4rz)/2(1+sqrt(1-4rz)) = 2rz/(1+sqrt(1-4rz))
"When two people always agree one of them is unnecessary"
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 10th, 2010 at 5:08:41 PM permalink
Quote: weaselman

Ok, I got where my mistake was. There can be more than one push between first zero, and last red:

P = zr + zPr + zPPr + zPPPr + ... = zr*sum(P^n)= zr/(1-P)

So, from P = zr/(1-P):

P^2 - P + zr = 0


P = (1 - sqrt(1-4zr))/2 = (1 - 1 + 4rz)/2(1+sqrt(1-4rz)) = 2rz/(1+sqrt(1-4rz))



Ah, thank you! I love those "I get it" moments. Sorry I never responded to your initial equation, but I wasn't sure why it was wrong either.

This is going to make for a good "Ask the Wizard" question, although "Answer the Wizard" would be a lot closer to the truth.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
boymimbo
boymimbo
  • Threads: 17
  • Posts: 5994
Joined: Nov 12, 2009
September 10th, 2010 at 7:16:15 PM permalink
This math is very nice to see on the forum.
----- You want the truth! You can't handle the truth!
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 12th, 2010 at 7:28:45 PM permalink
Here is a preview of how I'm going to address this in my next Ask the Wizard column. Turns out I didn't need to use the Catalan numbers or Dyck pathes, but it was very good to refresh my memory with them.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
  • Jump to: