Thread Rating:

Poll

21 votes (45.65%)
14 votes (30.43%)
6 votes (13.04%)
3 votes (6.52%)
12 votes (26.08%)
3 votes (6.52%)
6 votes (13.04%)
5 votes (10.86%)
12 votes (26.08%)
10 votes (21.73%)

46 members have voted

GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
Thanked by
teliot
June 22nd, 2021 at 1:01:37 PM permalink
I finally have a proof the sum of squares of the integers from 1 to N can never be equal to the sum of the squares of the integers from N+1 to N+B for any B.

I realised that the real root of x^3-12x+20=0 is -4^(1/3)-16^(1/3) and the ratio of B/N has to be about 2^(1/3)-1 for n large, so it looked hopeful that the problem could be solved by using existing results on Diophantine approximation.

The formula for the y co-ordinate was y=6/(2N-2B+1) in the transformation to the Weierstrass form. We also know from the general theory of elliptic curves that y=s/t^3, with s, t coprime. 2N-2B+1 is odd and positive. If we choose t to be positive, then s has to be 2 or 6, so y=2/t^3 or 6/t^3, therefore 2N-2B+1 is 3t^3 or t^3. Now N=B+(3t^3-1)/2 or B+(t^3-1)/2 and if we substitute these values into equation linking B and N, something remarkable happens, lots of terms cancel out and we get the equations -48B^3-72B^2t^3+27t^9-3t^3=0 and -48B^3-24B^2t^3+t^9-t^3=0.

All the terms, except for the B^3 terms, are divisible by t^3, so t divides 2B. We can write 2B=bt, where b is an integer, then we can factor out t^3 and we get -6b^3-18b^2t^2+27t^6-3=0 and -6b^3-6b^2t^2+t^6-1=0, resp.
These can be written as 2(3t^2+b)^3-(3t^2+2b)^3=3 and 2(t^2+b)^3-(t^2+2b)^3=1, so now we have to look for integer solutions of 2X^3-Y^3=3 and 2X^3-Y^3=1.

Michael Bennett has a paper called Effective Measures of Irrationality for Certain Algebraic Numbers (available free on his website), which includes his estimates for approximations of cube roots of various integers. Theorem 6.1 states that
|2X^3-Y^3| ≥ max(|X|,|Y|)^0.53, this implies that the only solution of 2X^3-Y^3=1 is X=1, Y=1, while if 2X^3-Y^3=3, then |X|,|Y|<8, and a quick search gives the solutions X=1, Y=-1 and X=4, Y=5.

None of these give feasible solutions for N and B.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
June 22nd, 2021 at 1:50:10 PM permalink
Quote: GM

I finally have a proof the sum of squares of the integers from 1 to N can never be equal to the sum of the squares of the integers from N+1 to N+B for any B.

I realised that the real root of x^3-12x+20=0 is -4^(1/3)-16^(1/3) and the ratio of B/N has to be about 2^(1/3)-1 for n large, so it looked hopeful that the problem could be solved by using existing results on Diophantine approximation.

The formula for the y co-ordinate was y=6/(2N-2B+1) in the transformation to the Weierstrass form. We also know from the general theory of elliptic curves that y=s/t^3, with s, t coprime. 2N-2B+1 is odd and positive. If we choose t to be positive, then s has to be 2 or 6, so y=2/t^3 or 6/t^3, therefore 2N-2B+1 is 3t^3 or t^3. Now N=B+(3t^3-1)/2 or B+(t^3-1)/2 and if we substitute these values into equation linking B and N, something remarkable happens, lots of terms cancel out and we get the equations -48B^3-72B^2t^3+27t^9-3t^3=0 and -48B^3-24B^2t^3+t^9-t^3=0.

All the terms, except for the B^3 terms, are divisible by t^3, so t divides 2B. We can write 2B=bt, where b is an integer, then we can factor out t^3 and we get -6b^3-18b^2t^2+27t^6-3=0 and -6b^3-6b^2t^2+t^6-1=0, resp.
These can be written as 2(3t^2+b)^3-(3t^2+2b)^3=3 and 2(t^2+b)^3-(t^2+2b)^3=1, so now we have to look for integer solutions of 2X^3-Y^3=3 and 2X^3-Y^3=1.

Michael Bennett has a paper called Effective Measures of Irrationality for Certain Algebraic Numbers (available free on his website), which includes his estimates for approximations of cube roots of various integers. Theorem 6.1 states that
|2X^3-Y^3| ≥ max(|X|,|Y|)^0.53, this implies that the only solution of 2X^3-Y^3=1 is X=1, Y=1, while if 2X^3-Y^3=3, then |X|,|Y|<8, and a quick search gives the solutions X=1, Y=-1 and X=4, Y=5.

None of these give feasible solutions for N and B.

Love this. You begin with the ratio of B/N. I looked at this as well, though through much more naive eyes than yours. Essentially my idea was to work backwards, as in, can B = N-1, if not, can B = N-2, etc. and do a downward induction on N using simple summation formulas. Of course, I couldn't make it work, but estimating this ratio (the point in this sum on the rhs that is optimally close to the lhs) is exactly the point. Not sure how you got your approximation for B/N. Once you have it though the line seems very direct that you give.

I don't know Bennett's paper, but I can see that if his results apply, then everything works here. It's very easy to follow. Very nice and glad you took this on. I'd enjoy a complete write-up if you are so inclined.

Quick question, are you at UBC? If so, we have common friends.
Climate Casino: https://climatecasino.net/climate-casino/
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
Thanked by
teliot
June 22nd, 2021 at 2:22:25 PM permalink
Quote: teliot

Not sure how you got your approximation for B/N.


It is not difficult. The equation relating B and N is -B-3B^2-2 B^3+N-6BN-6B^2N+3N^2-6BN^2+2N^3=0, it has degree 3 in both variables. If N is large, then B has to be large, too, so any term of degree less than 3 is small compared to the degree 3 terms. The degree 3 terms are -2B^3-6B^2N-6BN^2+2N^3=2(2N^3-(N+B)^3), so (N+B)^3 has to be approximately equal to 2N^3, therefore B/N has to be close to 2^(1/3)-1.

No, I am not at UBC.
Last edited by: GM on Jun 22, 2021
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3044
Joined: Nov 26, 2018
June 22nd, 2021 at 4:36:56 PM permalink
Quote: Ace2

What ThatDonGuy said plus EM constant.

So 100 * ln(10) + .5772 + 1 =~ 231.84


Correct!!

Very good. (With ThatDonGuy also right on top of it.)


--------------------------------------------------

Have you tried 22 tonight? I said 22.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 22nd, 2021 at 4:56:28 PM permalink
ThatDonGuy should get the credit for this one. I only added the EM constant.
It’s all about making that GTA
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
June 22nd, 2021 at 4:58:35 PM permalink
Quote: Ace2

ThatDonGuy should get the credit for this one. I only added the EM constant.


No, you get the beer for this one (not that I can tell them apart, anyway) - I wouldn't have known to use it.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 22nd, 2021 at 8:49:22 PM permalink
If anyone is interested, the exact answer is:

1 plus the integral from zero to infinity of (1 - (1 - 1/e^(x/a))^a) / a dx, where a = 10^100 -1

However I doubt there's an integral calculator that can handle 10^100 -1
It’s all about making that GTA
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5365
Joined: Feb 18, 2015
June 24th, 2021 at 5:16:50 PM permalink
Quote: GM


No, I am not at UBC.



to GM:

Let me echo what teliot posted and say that we are

1. delighted to have you in the forum. Welcome.

2. curious about your background, given the level of erudition in your posts

3. curious about whether you came to this forum for gambling discussions, gaming mathematics or what?

Naturally, you are under no obligation to answer these friendly questions, or to pull aside any of the veils of anonymity. But if you should be willing to respond at even a very limited level of detail, we would be happy to get to know you. And if you wish to remain "the Man in the iron Mask" we are still pleased to be making your acquaintence.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
June 24th, 2021 at 5:40:01 PM permalink
Quote: gordonm888

to GM:
2. curious about your background, given the level of erudition in your posts
3. curious about whether you came to this forum for gambling discussions, gaming mathematics or what?


I am a professional mathematician, I am interested in the mathematics of gambling, but that's not my day job.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 25th, 2021 at 12:04:34 PM permalink
Using a standard single die, Alan bets Bob that a number (any number) will be rolled six times before all six numbers have appeared. The bet is Alan's $100 vs Bob's $300. What is Alan's edge?
It’s all about making that GTA
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
June 25th, 2021 at 3:58:46 PM permalink
Quote: Ace2

Using a standard single die, Alan bets Bob that a number (any number) will be rolled six times before all six numbers have appeared. The bet is Alan's $100 vs Bob's $300. What is Alan's edge?


His expected win is about $1.05. The exact number is 60232506172075/57127475625984.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 25th, 2021 at 4:10:05 PM permalink
Quote: GM

His expected win is about $1.05. The exact number is 60232506172075/57127475625984.

I disagree
It’s all about making that GTA
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
June 25th, 2021 at 6:13:50 PM permalink
Quote: Ace2

Using a standard single die, Alan bets Bob that a number (any number) will be rolled six times before all six numbers have appeared. The bet is Alan's $100 vs Bob's $300. What is Alan's edge?



2,409,300,246,883 / 228,509,902,503,936


Is there a calculus way to solve this, considering that you are testing that one condition occurs before another?
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 25th, 2021 at 6:55:48 PM permalink
Quote: ThatDonGuy


2,409,300,246,883 / 228,509,902,503,936


Is there a calculus way to solve this, considering that you are testing that one condition occurs before another?

Yes, and I do prefer closed form solutions
It’s all about making that GTA
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
June 26th, 2021 at 8:17:05 AM permalink
Quote: Ace2

Quote: ThatDonGuy


2,409,300,246,883 / 228,509,902,503,936


Is there a calculus way to solve this, considering that you are testing that one condition occurs before another?

Yes, and I do prefer closed form solutions


Let's see how close I can get to it this time...

P(a 1 is not rolled in time t) = e^(-t/6)
...
P(a 6 is not rolled in time t) = e^(-t/6)
P(each number is rolled at least once in time t) = (1 - e^(-t/6))^6
P(at least one number is not rolled in time t) = 1 - (1 - e^(-t/6))^6

P(a 1 is rolled at least once in time t) = 1 - e^(-t/6)
This is the part I'm not confident about:
P(a 6 is rolled at least six times in time t) = (1 - e^(-t/6))^6
P(a 6 is not rolled at least six times in time t) = 1 - (1 - e^(-t/6))^6
P(no number is rolled at least six times in time t) = (1 - (1 - e^(-t/6))^6)^6
P(at least one number is rolled at least six times in time t) = 1 - (1 - (1 - e^(-t/6))^6)^6

The solution is the integral of (1 - (1 - (1 - e^(-t/6))^6)^6) (1 - (1 - e^(-t/6))^6) dt over t = 0 to +infinity.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 26th, 2021 at 9:09:14 AM permalink
I took the integral over all time of:

[{(x/6) + (x/6)^2/2 + (x/6)^3/3! + (x/6)^4/4! + (x/6)^5/5!} * 1/e^(x/6)]^5 * 1/e^(x/6) * 6 * 1/6 dx

Which is 683120407264925 / 914039610015744 =~ .747364 = b = the chance of Bob winning

So Alan's edge is (1 - b) * 4 - 1 =~ 1.05%

The integral evaluates, at all times 0 to infinity, the probability of being in the state where five numbers have hit 1 to 5 times and one number has not hit. Multiply by 6 since the the one number that hasn't hit can be 1-6. Starting from that state, multiply by 1/6 for the probability that Bob wins on the next roll
It’s all about making that GTA
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5365
Joined: Feb 18, 2015
June 27th, 2021 at 7:48:41 PM permalink
Quote: Gialmere

It's easy Monday. Let's take a spin...



You're studying to be a lab technician and have started to learn about the centrifuge. A centrifuge has 12 locations for test tubes, located evenly in a circle. (Let them be referenced as the hour locations on a clock.) Prior to spinning the tubes, the centrifuge must be evenly balanced about its center.

Assuming all test tubes weigh the same amount, what numbers of test tubes (from 1 to 12) can be spun without needing to add dummy tubes to balance out the weight?

For example, you can't spin 1 sample tube at 9 o'clock without balancing it with a dummy at 3 o'clock, but you could spin 2 sample tubes.




I've been away for awhile and am just catching up. Putting weights at 3:00 and 9:00 gives rise to stresses that deform the centrifuge walls, causing it to deform into an oblong shape along the axis of the weights. There will be resultant stresses on the bearings, causing wear, and eventually some inelastic deformation of the rotor wall.

I understand its just a silly little math problem with a centrifuge being evoked as an illustration of the math problem. But a rotating centrifuge like you guys have sketched is unbalanced!

You would need to load test tubes, empty or not, at all radial locations.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 28th, 2021 at 10:32:43 AM permalink
Deleted
It’s all about making that GTA
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27079
Joined: Oct 14, 2009
June 28th, 2021 at 12:42:48 PM permalink
Quote: Ace2

I took the integral over all time of:

[{(x/6) + (x/6)^2/2 + (x/6)^3/3! + (x/6)^4/4! + (x/6)^5/5!} * 1/e^(x/6)]^5 * 1/e^(x/6) * 6 * 1/6 dx

Which is 683120407264925 / 914039610015744 =~ .747364 = b = the chance of Bob winning



Okay, I agree. Good problem.

I was working it as the probability of Adam winning, which can happen more kinds of ways is thus more complicated.

I realized I had a duplicate problem in the last Ask the Wizard column, so I just replaced it with this one.
Last edited by: Wizard on Jun 28, 2021
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 28th, 2021 at 5:17:25 PM permalink
Quote: Ace2

Using a standard single die, Alan bets Bob that a number (any number) will be rolled six times before all six numbers have appeared. The bet is Alan's $100 vs Bob's $300. What is Alan's edge?

Extra credit: What's the expected number of rolls to resolve the bet?
It’s all about making that GTA
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 29th, 2021 at 2:29:35 PM permalink
Extra credit: What's the expected number of rolls to resolve Alan and Bob's dice bet?

I guess no one can solve or no one cares or both. Here's how I solved:

Let y = [{(x/6) + (x/6)^2/2 + (x/6)^3/3! + (x/6)^4/4! + (x/6)^5/5!} * 1/e^(x/6)]
Let z = 1/e^(x/6)

Take the integral over all time of:

6*y^5*z + 15*y^4*z^2 + 20*y^3*z^3 + 15*y^2*z^4 + 6*y*z^5 + z^6 dx

to get 1,981,795,937,732,780 / 152,339,935,002,624 =~ 13.01 rolls.

I did not confirm this with a simulation but that figure seems reasonable since the expected number of rolls to hit all six numbers at least once is easy calculated as 14.7, so we know the answer must be less than that, but probably not by much.

The formula says: sum the probabilities over all time zero to infinity that the bet is in an unresolved state. The first term evaluates the 6 ways of having five numbers with 1-5 hits and one number with zero hits, the next term evaluates the 15 ways of having four numbers with 1-5 hits and two numbers with zero hits and so on: 20*3/3, 15*2/4, 6*1/5, 1*0/6. I realize the formula could be further condensed but I prefer keeping it in a more intuitive format.
Last edited by: Ace2 on Jun 29, 2021
It’s all about making that GTA
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
Thanked by
Gialmere
June 29th, 2021 at 3:26:06 PM permalink
Quote: Ace2

to get 1,981,795,937,732,780 / 152,339,935,002,624 =~ 13.01 rolls


The last digit of the numerator should be 9.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 29th, 2021 at 3:31:23 PM permalink
Source?
It’s all about making that GTA
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
June 29th, 2021 at 3:53:27 PM permalink
I modified my earlier calculation to calculate the expectation instead of the probabilities, and I also calculated the integral in Mathematica. Both gave 1981795937732789/152339935002624.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
June 29th, 2021 at 4:28:58 PM permalink
Well it looks like either Mathematica or integral-calculator.com is accurate to "only" 14 digits, which doesn't concern me much.. I've been using the latter for quite some time now and I don't ever recall an error.
It’s all about making that GTA
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
Thanked by
Ace2teliot
June 29th, 2021 at 4:54:48 PM permalink
I would trust Mathematica over integral-calculator. com.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
June 29th, 2021 at 9:45:40 PM permalink
Quote: GM

I would trust Mathematica over integral-calculator. com.

I've seen Excel do this with baccarat calculations, round the final digit to 0 when I import the data. Based on this error, my Spidey sense tells me the int data size on integral-calculator is the same as Excel.
Climate Casino: https://climatecasino.net/climate-casino/
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
Thanked by
unJon
June 30th, 2021 at 11:07:44 AM permalink
Quote: teliot

I've seen Excel do this with baccarat calculations, round the final digit to 0 when I import the data. Based on this error, my Spidey sense tells me the int data size on integral-calculator is the same as Excel.


Mathematica can handle arbitrarily large integers in principle, 16 digits is definitely not a problem. LibreOffice Calc can also handle 1981795937732789.
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27079
Joined: Oct 14, 2009
July 1st, 2021 at 11:40:24 AM permalink
The following question I do not claim to have a correct answer for and perhaps there isn't one. It was inspired the following scene from The Dark Knight. Watching it is not required to understand the problem.


Direct: g3dl32LaOls

Suppose there is a game show with two perfect logicians as players. The game starts with a pot of $1,000,000.

1. Logician A will make a suggestion on how to divide the pot.

2. If Logician B accepts the suggestion, then they split it that way and the game is over.

3. If Logician B rejects the offer, the host will rake 10% out of the remaining pot.

4. Logician B will make a suggestion on how to divide the remaining pot.

5. If Logician A accepts the suggestion, then they split it that way and the game is over.

6. If Logician B rejects the offer, the host will rake 10% out of the remaining pot.

7. Go back to step 1.

The question is how should logician A initially suggest dividing the pot?
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
unJon
unJon
  • Threads: 16
  • Posts: 4771
Joined: Jul 1, 2018
July 1st, 2021 at 3:10:19 PM permalink
Is a penny the smallest denomination? How does the host round the 10% if there’s a fraction of a penny?
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
July 1st, 2021 at 4:35:44 PM permalink
Quote: Wizard

The following question I do not claim to have a correct answer for and perhaps there isn't one. It was inspired the following scene from The Dark Knight. Watching it is not required to understand the problem.

Suppose there is a game show with two perfect logicians as players. The game starts with a pot of $1,000,000.

1. Logician A will make a suggestion on how to divide the pot.

2. If Logician B accepts the suggestion, then they split it that way and the game is over.

3. If Logician B rejects the offer, the host will rake 10% out of the remaining pot.

4. Logician B will make a suggestion on how to divide the remaining pot.

5. If Logician A accepts the suggestion, then they split it that way and the game is over.

6. If Logician B rejects the offer, the host will rake 10% out of the remaining pot.

7. Go back to step 1.

The question is how should logician A initially suggest dividing the pot?


A should offer 9/19 of the money to B.
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27079
Joined: Oct 14, 2009
July 1st, 2021 at 5:22:12 PM permalink
Quote: unJon

Is a penny the smallest denomination? How does the host round the 10% if there’s a fraction of a penny?



Yes. He rounds to the nearest penny.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27079
Joined: Oct 14, 2009
July 1st, 2021 at 5:22:47 PM permalink
Quote: GM

A should offer 9/19 of the money to B.




I pretty much agree. I would only add he sound throw in an extra penny, so that B will take the offer. You don't want B completely indifferent. He might flip a coin and reject and offer you back $426,315.79, $100,000 less than the $526,315.78 you offered yourself initially.

I round up to $473,700, just to be nice, but I know a perfect logician would get every penny possible and offer $473,684.22.

"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Dieter
Administrator
Dieter
  • Threads: 16
  • Posts: 6040
Joined: Jul 23, 2014
July 1st, 2021 at 9:13:46 PM permalink
Quote: Wizard

He rounds to the nearest penny.



This strikes me as unusual. I would expect the host to rake the entire penny as breakage in the case of a fractional cent.

Either way is fine for the thought experiment, but after 100+ rejected compromise offers, he's earned it.
May the cards fall in your favor.
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
July 4th, 2021 at 2:17:04 PM permalink
Quote: Dieter

This strikes me as unusual. I would expect the host to rake the entire penny as breakage in the case of a fractional cent.

Either way is fine for the thought experiment, but after 100+ rejected compromise offers, he's earned it.


I assumed that the host would round up the fractional cents, otherwise if the total amount gets down to 4c, the game may never finish.

If we assume that the logicians only interested in maximising their own winning and are willing to accept an offer that is equal to the maximum what they could get if they refused the offer, then A should offer B $473684.21. If they are not willing to co-operate and each of them will only accept an offer that is at least 1c more than the maximum what they could get if they refused the offer, then A should offer B $473684.22.
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27079
Joined: Oct 14, 2009
July 5th, 2021 at 1:05:14 PM permalink
Quote: GM

A should offer B $473684.21. If they are not willing to co-operate and each of them will only accept an offer that is at least 1c more than the maximum what they could get if they refused the offer, then A should offer B $473684.22.



I agree.

Please put future answers in spoiler tags. That way any late-comers can enjoy the problem without seeming the answer posted.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Dieter
Administrator
Dieter
  • Threads: 16
  • Posts: 6040
Joined: Jul 23, 2014
July 5th, 2021 at 8:15:50 PM permalink
Quote: Dieter

This strikes me as unusual. I would expect the host to rake the entire penny as breakage in the case of a fractional cent.

Either way is fine for the thought experiment, but after 100+ rejected compromise offers, he's earned it.



I realized shortly after posting that it comes into play at far fewer rejected offers, and feel appropriately feebleminded.
May the cards fall in your favor.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3044
Joined: Nov 26, 2018
July 8th, 2021 at 9:26:59 AM permalink
Like the Wizard's previous problem, I don't know the answer to this one. The users at the math puzzle site where I came across it never reached a consensus for solving. It's an interesting problem involving a card game most people have played. I quote it exactly to see if consensus can be reached here...



In the game of Memory, there are many different cards, each having one matching card to make its pair. To start the game, all the cards are spread out face down. On each turn, a player chooses a card and turns it over, then chooses a second card and turns it over. If the cards match, they are removed from the play area. If the cards do not match, they are returned to their face-down positions.

Assuming you have perfect memory (you can remember where all previously seen cards are), what is the expected number of turns needed to clear the play area for N pairs?

How does this result change if two cards must first be selected, then turned over simultaneously?

How does the first result change if there are multiple identical pairs, such as in a standard deck of cards (any Queen could be paired with any other Queen)?


In all cases, assume you play to minimize the number of turns.
Have you tried 22 tonight? I said 22.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
July 8th, 2021 at 12:32:26 PM permalink
Quote: Gialmere

In the game of Memory, there are many different cards, each having one matching card to make its pair. To start the game, all the cards are spread out face down. On each turn, a player chooses a card and turns it over, then chooses a second card and turns it over. If the cards match, they are removed from the play area. If the cards do not match, they are returned to their face-down positions.

Assuming you have perfect memory (you can remember where all previously seen cards are), what is the expected number of turns needed to clear the play area for N pairs?


I have a feeling I'm going to regret this the minute I post it, but my numbers appear to be correct for 1 and 2 pairs...


E(n) is the expected number of turns starting with n pairs

E(1) = 1
E(2) = 8 / 3
E(3) = 199 / 45
E(4) = 9,556 / 1,575
E(5) = 786,227 / 99,225
E(6) = 94,036,576 / 9,823,275
E(7) = 3,219,603,572 / 280,945,665
E(8) = 17,964,806,816,248 / 1,369,610,116,875
E(9) = 5,244,142,302,537,988 / 349,250,579,803,125
E(10) = 1,197,405,952,584,220,562 / 71,786,869,175,896,875
E(11) = 23,420,230,525,515,820,899,299 / 1,260,290,275,252,045,537,500
E(12) = 1,849,433,417,098,530,134,834,771 / 91,308,030,442,010,699,191,875
E(13) = 116,341,686,404,284,568,353,640,366,753 / 5,250,211,750,415,615,203,532,812,500
E(14) = 464,625,053,499,588,757,386,024,329,118,739 / 19,491,411,123,417,971,443,115,566,406,250
E(15) = 1,571,462,235,083,358,151,475,317,163,097,678,737 / 61,047,099,638,545,086,559,837,953,984,375,000
E(16) = 2,445,858,396,189,803,074,022,490,793,281,058,154,971 / 89,182,181,684,459,553,328,103,271,026,923,828,125
E(17) = 856,246,260,751,723,619,649,577,491,266,529,944,091,817 / 29,194,678,996,224,679,377,487,886,803,373,784,375,000
E(18) = 65,369,036,717,836,848,555,054,164,570,348,117,457,561,106,219 / 2,107,490,890,039,969,042,562,406,828,618,545,059,570,312,500
E(19) = 1,437,505,462,224,141,765,319,683,046,425,447,630,110,336,927,272,279 / 43,667,211,241,628,158,561,893,069,488,976,253,634,296,875,000,000
E(20) = 10,310,653,070,695,057,740,633,755,272,380,500,522,403,004,373,859,041 / 297,886,640,425,022,346,407,619,267,973,881,111,763,886,718,750,000
E(21) = 187,624,995,670,444,822,761,102,760,795,505,677,506,365,650,106,369,786,860,009 / 5,138,548,121,971,320,575,799,589,263,980,664,864,500,387,065,078,125,000,000
E(22) = 50,592,299,927,532,945,252,436,026,478,265,788,089,433,539,553,647,978,381,421,123 / 1,324,045,741,859,025,579,442,760,319,812,002,545,893,611,273,222,476,562,500,000
E(23) = 133,589,616,167,475,641,370,900,261,774,634,214,899,298,766,597,156,639,802,988,694,899,579 / 3,330,637,063,646,378,845,088,263,584,487,092,404,195,379,157,791,139,792,968,750,000,000
E(24) = 128,853,864,436,997,375,220,430,317,002,564,689,920,778,943,592,415,883,972,086,015,579,536,013 / 3,081,880,107,955,289,925,095,733,898,020,712,690,257,036,776,943,614,039,681,396,484,375,000
E(25) = 410,512,353,054,960,488,444,975,685,589,029,270,251,940,073,462,813,937,125,465,066,511,797,934,447 / 9,392,272,935,318,058,306,460,177,664,789,018,295,612,813,554,323,317,229,142,714,843,750,000,000
E(26) = 232,892,409,664,096,187,950,738,679,941,658,818,172,913,536,412,245,920,476,876,384,899,053,693,789,540,201 / 5,128,476,879,281,122,354,163,910,500,571,244,843,480,908,004,287,492,391,604,640,300,205,078,125,000,000

GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
July 8th, 2021 at 3:59:04 PM permalink
The denominators seem to be related to the sequence https://oeis.org/A079484.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
July 9th, 2021 at 6:31:10 AM permalink
Quote: GM

The denominators seem to be related to the sequence https://oeis.org/A079484.

Your link does not work (for me). It takes me to OEIS 404
Climate Casino: https://climatecasino.net/climate-casino/
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
July 9th, 2021 at 6:51:32 AM permalink
Quote: teliot

Your link does not work (for me). It takes me to OEIS 404


Try this one (the other one left a period in at the end of it)
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
July 9th, 2021 at 8:13:52 AM permalink
Quote: ThatDonGuy

Try this one (the other one left a period in at the end of it)

Thanks. A fast growing sequence, but not really that fast. This is my favorite definition of this sequence from OEIS: "a(n) is the number of rooted, binary, leaf-labeled topologies with 2n+2 leaves that have n+1 cherry nodes."

I am a fan of big integers and fast growing integer sequences.
Climate Casino: https://climatecasino.net/climate-casino/
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
July 9th, 2021 at 9:58:21 AM permalink
Quote: Gialmere

How does this result change if two cards must first be selected, then turned over simultaneously?



The strategy is to always choose two unrevealed cards.

If there are N pairs initially, the expected number of turns is N (4N - 3) / (2N - 1).

charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3014
Joined: Jun 17, 2011
July 9th, 2021 at 4:15:56 PM permalink
Sorry I've only looked at two pairs.
Quote: ThatDonGuy


The strategy is to always choose two unrevealed cards.

If there are N pairs initially, the expected number of turns is N (4N - 3) / (2N - 1).

Taking the simple two pairs...let's assume the cards are AABB shuffled in boxes 1 thru 4. For argument' sake assume A is in Box 1. Then there are three scenarios, the other A is in Box 2, 3 or 4.

The basic method is to pick boxes 1 and 2. If both are A, then next turn is 3 and 4, for a total of two turns (AABB). If boxes 1 and 2 are A and B, then then next turn is to open box 3 (which will determine the order: ABAB or ABBA) and then the box which matches it, for a total of three turns.

So the average is (2 + 3 + 3)/3.


If you have to choose at the same time, with AABB you've done it in two moves. However with AB??, there is no point going for boxes 3 and 4 as you know they're AB or BA. So your second turn is boxes 1 and 3.

So with AABB it takes two turns; with ABAB it takes three turns (as your second turn is correct, and your third turn finds the two Bs); with ABBA it takes four turns.

So the average is (2+3+4)/3.


In your method if you miss on the first turn the second turn determines the order but you then need two further turns to find them. Your average is (2+4+4)/3.

In essence it's best to pick Boxes 1 and 2, 3 and 4, etc. But towards the end there's no point picking the last two boxes if you know they're wrong.

I'm guessing you're along the right lines as you will sometimes know the last N are all different, you can get rid of all the other pairs, and so change tack.
GM
GM
  • Threads: 0
  • Posts: 49
Joined: Jun 16, 2021
July 9th, 2021 at 5:20:50 PM permalink
Quote: ThatDonGuy

Quote: Gialmere

In the game of Memory, there are many different cards, each having one matching card to make its pair. To start the game, all the cards are spread out face down. On each turn, a player chooses a card and turns it over, then chooses a second card and turns it over. If the cards match, they are removed from the play area. If the cards do not match, they are returned to their face-down positions.

Assuming you have perfect memory (you can remember where all previously seen cards are), what is the expected number of turns needed to clear the play area for N pairs?


I have a feeling I'm going to regret this the minute I post it, but my numbers appear to be correct for 1 and 2 pairs...


E(n) is the expected number of turns starting with n pairs

E(1) = 1
E(2) = 8 / 3
E(3) = 199 / 45
E(4) = 9,556 / 1,575
E(5) = 786,227 / 99,225
E(6) = 94,036,576 / 9,823,275
E(7) = 3,219,603,572 / 280,945,665
E(8) = 17,964,806,816,248 / 1,369,610,116,875
E(9) = 5,244,142,302,537,988 / 349,250,579,803,125
E(10) = 1,197,405,952,584,220,562 / 71,786,869,175,896,875
E(11) = 23,420,230,525,515,820,899,299 / 1,260,290,275,252,045,537,500
E(12) = 1,849,433,417,098,530,134,834,771 / 91,308,030,442,010,699,191,875
E(13) = 116,341,686,404,284,568,353,640,366,753 / 5,250,211,750,415,615,203,532,812,500
E(14) = 464,625,053,499,588,757,386,024,329,118,739 / 19,491,411,123,417,971,443,115,566,406,250
E(15) = 1,571,462,235,083,358,151,475,317,163,097,678,737 / 61,047,099,638,545,086,559,837,953,984,375,000
E(16) = 2,445,858,396,189,803,074,022,490,793,281,058,154,971 / 89,182,181,684,459,553,328,103,271,026,923,828,125
E(17) = 856,246,260,751,723,619,649,577,491,266,529,944,091,817 / 29,194,678,996,224,679,377,487,886,803,373,784,375,000
E(18) = 65,369,036,717,836,848,555,054,164,570,348,117,457,561,106,219 / 2,107,490,890,039,969,042,562,406,828,618,545,059,570,312,500
E(19) = 1,437,505,462,224,141,765,319,683,046,425,447,630,110,336,927,272,279 / 43,667,211,241,628,158,561,893,069,488,976,253,634,296,875,000,000
E(20) = 10,310,653,070,695,057,740,633,755,272,380,500,522,403,004,373,859,041 / 297,886,640,425,022,346,407,619,267,973,881,111,763,886,718,750,000
E(21) = 187,624,995,670,444,822,761,102,760,795,505,677,506,365,650,106,369,786,860,009 / 5,138,548,121,971,320,575,799,589,263,980,664,864,500,387,065,078,125,000,000
E(22) = 50,592,299,927,532,945,252,436,026,478,265,788,089,433,539,553,647,978,381,421,123 / 1,324,045,741,859,025,579,442,760,319,812,002,545,893,611,273,222,476,562,500,000
E(23) = 133,589,616,167,475,641,370,900,261,774,634,214,899,298,766,597,156,639,802,988,694,899,579 / 3,330,637,063,646,378,845,088,263,584,487,092,404,195,379,157,791,139,792,968,750,000,000
E(24) = 128,853,864,436,997,375,220,430,317,002,564,689,920,778,943,592,415,883,972,086,015,579,536,013 / 3,081,880,107,955,289,925,095,733,898,020,712,690,257,036,776,943,614,039,681,396,484,375,000
E(25) = 410,512,353,054,960,488,444,975,685,589,029,270,251,940,073,462,813,937,125,465,066,511,797,934,447 / 9,392,272,935,318,058,306,460,177,664,789,018,295,612,813,554,323,317,229,142,714,843,750,000,000
E(26) = 232,892,409,664,096,187,950,738,679,941,658,818,172,913,536,412,245,920,476,876,384,899,053,693,789,540,201 / 5,128,476,879,281,122,354,163,910,500,571,244,843,480,908,004,287,492,391,604,640,300,205,078,125,000,000


I agree, but I don't have a formula either.

I have calculated E(n) numerically for n up to 5000 to try to see the asymptotic behaviour of E(n). It looks like E(n)/n may converge to a value around 1.81. (E(n)+2)/n is almost constant. Can anyone think of a good constant which is about 1.81?
Last edited by: GM on Jul 9, 2021
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3014
Joined: Jun 17, 2011
July 10th, 2021 at 2:07:19 AM permalink
Quote: GM

...I have calculated E(n) numerically for n up to 5000 to try to see the asymptotic behaviour of E(n). It looks like E(n)/n may converge to a value around 1.81. (E(n)+2)/n is almost constant. Can anyone think of a good constant which is about 1.81?

Try this idea.

As N gets large you look at pairs {1,2}, {3,4}...{2n-1,2n} (for large N it doesn't matter that you look at the last pairing, but this may be why you have the +2.).
At that stage you've used up N goes. Some of those will, by luck, have been pairs, but the rest you just match them up.
So the total number if (first run) N + (second run) N-pN (where p is the expected ratio of lucky matches) = 2N - pN = (2-p)/N.

So (E(n)/n) = (2-p).

I don't know the formula for having a random order of 1 to N and seeing how many are in the correct position, but if in this puzzle you consider N pairs (1st,2nd), (3rd,4th) and put the pairs in some order (say based on the value of the first entry and where they were in the first place). The rearrangement doesn't change the number of correct pairings but now can be considered as whether the second entry matches up with the reordered number.

Someone will know the formula for this, but my guess is p=1/2e as 1.816... is about 2 - 1/2e.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
July 27th, 2021 at 9:12:03 PM permalink
If there was a “Fire-Repeater” bet, meaning you must hit all ten repeater bets before rolling a seven to win, what would be the probability of winning?
It’s all about making that GTA
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6696
Joined: Jun 22, 2011
July 28th, 2021 at 10:37:25 AM permalink
Quote: Ace2

If there was a “Fire-Repeater” bet, meaning you must hit all ten repeater bets before rolling a seven to win, what would be the probability of winning?


Assuming the bet is "roll each number from 2-6 and 8-12 N times before rolling a 7", the probability of winning for various values of N are:

2: 1 / 7350
3: 1 / 223,592
4: 1 / 6,122,965

Yes, this was done by number-crunching a Markov chain. I'll see if I can figure out the calculus-based method this time...
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
July 28th, 2021 at 12:05:07 PM permalink
I’ve never played repeater, but I’m asking what is the chance of rolling (at least) two 2s, three 3s, four 4s etc before rolling a 7.
It’s all about making that GTA
  • Jump to: