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

You are not logged in.

- Topics: Active | Unanswered

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Hi;

Matt Conroy's dice.pdf is out and problem #10 belongs to me! Seems that computational math is spreading!

http://www.madandmoonly.com/doctormatt/ … /dice1.pdf

The pdf is filled with interesting solutions and if you are a lover of generating functions, recurrences, Markov chains and computation, all the things I babble about in Computer Math then you will love the way a real artist uses them.

Thanks Matt!

Now, about that solution to #10...

Rumpole once sarcastically said that he always found that any knowledge of the law is a severe disadvantage. Likewise, knowledge of mathematics can ruin you when you come across a problem like that. Two things hindered me in solving that problem, lack of courage, I could not bring myself to state it as a 730 state Markov chain and a stubborn reliance on using the notation and tools of linear algebra to deal with it!

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

Hi bobbym

My answer to the last question in problem #10 regarding the case in which we want a number to appear 3 times before stopping:

First, we need to find the probability P(X=i) that the first number that appears 3 times is in the i-th postition:

For the first number that appears 3 times to be in the i-th position, it must also appear exactly twice in the previous i-1 places, and all other number can appear at most 2 time. This means, also, that, by the Pigeon hole principle, i can take values between 3 and 13, only.

Now, the number of ways we can choose two numbers from the first i-1 is

, and the probability that they are the same as the i-th number is .The rest of the numbers can appear at most 2 times, so we can use the GF

to model them. Because the total number of other numbers in the first i-1 is i-3, and because there are only 5 possible choices for those i-3 numbers, we will model this with the GF , whose x^(i-3) term's coefficient is equal to the number of ways of distributing the i-3 numbers among the five possibilities. But this only gives us the possible distribution of those i-3 numbers, without caring for theor order in the throw sequence. To account for that we need a factor of (i-3)!. So, finally, the number of ways the i-3 numbers can be distributed is . Also, the probability that those numbers will have the values assigned to them isCombining this with the previous results gives us the probability of

.To get the expected value, we use the standar formula E(X)=∑ i*P(X=i):

Now we can use a CAS to find the value of this sum, or to get a closed form.

The following code in Maxima does that:

```
sum(i*(i-3)!/(6^(i-1))*binomial(i-1,2)*coeff(ratexpand((1+x+x^2/2)^5),x^(i-3)),i,3,13);
4084571/559872
```

Which gives us the final answer of

.The result can be generalized from 3 to k appearances before stopping as follows:

In Maxima, we could implement this as:

`f(k):=sum(i*(i-k)!/(6^(i-1))*binomial(i-1,k-1)*coeff(ratexpand((sum(x^j/j!,j,0,k-1))^5),x^(i-k)),i,k,6*k-5);`

*Last edited by anonimnystefy (2013-03-20 08:45:50)*

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Hi anonimnystefy;

A very fine result, well done.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

Thanks!

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

I have a little better understanding of it now and it has worked for all the examples given and for a few simulations of numbers that are bigger than 2 and 3.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

That is great! I will wait for him to answer my email now.

In the meantime, we can work on a better form for that, or an asymptotic form.

*Last edited by anonimnystefy (2013-02-16 10:25:44)*

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

There are one or two spots that might be simplified or maybe not. I do not yet know about an asymptotic form. It would interesting to be able to answer at least approximately for say 1000000 in a row.

*Last edited by bobbym (2013-02-17 01:06:48)*

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

It seems that the inner sum has a closed form in terms of the Gamma and the upper incomplete Gamma function.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Yes, there is a closed form for much of that.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

That sum is troubling me. Is there anyway to get rid of it?

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Which sum are we talking about?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

The inner sum.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

That is for the gf, you do not have to use that approach.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

I don't understand you.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

There was another way to generate T[n,k], it used a series.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

Yes, but it cannot be used for the generalized case.

By the way, Matt answere asking what my method was. I answered him and told him I could send him the full proof and that I have found a generalization.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Hi;

Why not send him what you posted?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

I will if he says he's interested.in seeing it.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Hmmm, he did ask for your method.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

Yes. He asked for the method, but not the whole solution.

By the way, you really should not lie.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Hi;

About what? Under "Thanks" you did not find my name? One of them is me!

*Last edited by bobbym (2013-02-17 00:14:32)*

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

Lie about this:

bobbym wrote:

Hi gAr;

I am sorry, but on this one Mr anonimnystefy has left me dumber than a burned out stump. Apparently his method has fried my brain. I am so confused I can not solve 3 + x = 9. Can you show me what you want done? You can use codecogs for the latexing.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

Could be that I have just got up or your solution or both but I am not particularly sharp right now.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline

**anonimnystefy****Real Member**- From: Harlan's World
- Registered: 2011-05-23
- Posts: 15,954

Maybe it's because of your back.

Have you got an idea for clearing up the formula up there.

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

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,920

I have been working hard on it but unfortunately no.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.** **Thinking is cheating.**

Offline