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

You are not logged in.

- Topics: Active | Unanswered

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Oh.

```
list = {300, 250, 175, 100, 75, 50, 25, 15, 7, 3, 1}
SecondPick[tickets_] := Sum[i/1001*tickets/(1001 - i), {i, Delete[list, Position[list, tickets]]}];
```

*Last edited by anonimnystefy (2013-05-02 07:11:41)*

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

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

Code, code, give me code! Okay, thank you.

Code, code, a thousand lines of code. I'd rather die then debug it. Sung to the tune of "No, no, a thousand times no. I'd rather die then say yes."

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

I am not sure what you want.

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

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

Nothing, just singing an old song with my improved lyrics.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Have you looked at the code?

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

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

I just copied it to my notebook that deals with this problem.

I must warn you that I am missing a couple of great abilities that God in his infinite wisdom decided not to bestow on me.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

What are those abilities?

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

The list appears endless but the one that applies is that I never could read code written by someone else.

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Give me a few minutes to eat. When I get back, I will explain it a bit.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

Very good, I will eat and continue to explore mythological creatures from Serbia.

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Mythological creatures? Like which?

To be honest, I never took much interest into Slavic mythology.

Now, for the code...

I am just summing P(second pick by n|first pick by i).

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

I see that. But my general approach to computing the exact numbers here would be to tree it.

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Tree it? How?

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

You aware that Markov chains and gf's can be compact representations of trees?

There is just one tiny little, itsy bitsy problem...

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

I do not know how useful Markov chains are here. The probabilities change for different previous picks.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

Exact a mundo! GF's will have the same problem. But if you had a big piece of paper you could do it...

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

I do not think it will be enough for picks higher than the second.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

Nope, if I had a big piece of paper, I could just enumerate the entire tree. From beginning to end.

What I am getting at is how to do this using M and whatever structure is available. How to draw it without drawing. Now it is obvious we could use 11 nested loops but we should strive to use something a bit more elegant than that.

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Well, Markov chains require the probabilities to stay the same, but maybe we can do something with GF's?

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

First, I am trying to work out the answer using programming.

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

That will be hard.

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

For instance:

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

How'd you get those?

Here lies the reader who will never open this book. He is forever dead.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 90,581

Wrote a little program to do it for me.

As you can see all answers are close to my simulation.

**In mathematics, you don't understand things. You just get used to them.**

**Online**

**anonimnystefy****Real Member**- From: The Foundation
- Registered: 2011-05-23
- Posts: 15,657

Can you post the program code?

Here lies the reader who will never open this book. He is forever dead.

Offline