Let's discuss Mathematics

No, I meant Scrabble tournaments, not computers...

I wanted to organise a round robin tournament of CFC scrabble players but there are only 4 players (me, Truronian, dutchfire and holy king) who have played the 11 games required to match anyone they want to (you need to play 11 games before you can play someone more than twice) :(

EDIT: An interesting thing I remembered from combinatorics was that if you have a tournament set up so that everyone plays everyone else once (no ties allowed), then it is always possible to arrange the matches afterwards so that they for a chain of A beat B who beat C who beat D, etc.

I can't remember the proof though.

EDIT2: Here's the proof, will the link work? (yes it does, it's theorem 9.5)

http://books.google.co.uk/books?id=...&resnum=4&ved=0CBUQ6AEwAw#v=onepage&q=&f=true
 
No, I meant Scrabble tournaments, not computers...

pn = 1/(n-1) + (1/2)2 pn-1
to begin with.

I think you mean pn = 1/(2n-1) + (1/2)2 pn-1
First, ParadigmShifter is placed at a table randomly. Then there are only 2^n - 1 places left, the chance that dutchfire is placed exactly on the one spot left at ParadigmShifters table is 1/(2n-1).

If they don't get placed at the same table, there is a 1/4 chance they both win their first match and go to the next round, with 2n-1 players, and there's a pn-1 chance they'll meet in such a tournament.
With induction, you can prove that the chance is indeed (1/2)^(n-1).

LulThyme's explanation seems correct too. And even easier perhaps :blush:

A third one:
The entire tournament schedule can be split into two parts, with players from each part only able to go against someone from the other part in the final.
ParadigmShifter is placed in one half. Now, there's a (2n-1-1)/(2n-1) chance that dutchfire is placed in the same part. If that's the case, they'll have to meet in max n-1 round of a tournament with 2n-1 players, chance pn-1.
There's a 2n-1/(2n-1) chance that they're placed in different parts of the tournament, then they both have to win all matches to the final chance 22n-2.
Again, use induction to prove the pn= (1/2)^(n-1)
 
Interesting little maths problem I encountered in class recently:

ParadigmShifter and dutchfire enter in a big scrabble tournament. There are 2^n players, and it's a knock-out tournament. However, since everyone got so drunk before the tournament started, they all lost their ability to play scrabble, and in every match, each player just has a 1/2 chance of winning and going through to the next round. Assuming the draw for each round is fair, what's the chance p_n ParadigmShifter and dutchfire will have to play each other eventually?

Hint 1: You may want to express p_n as a function of p_(n-1) first.
Hint 2: You may then want to use Excel to formulate an induction hypothesis.
Easy ass solution:

I REDEFINE THE TOTAL NUMBER OF PLAYERS TO BE m

Note that:
Every possible pairing is equally likely to occur sometime during the tournament
No pairing will occur twice.

So all we gotta do is find the total number of games and divide by the total number of possible pairs.

Total number of games:
each game we eliminate 1 player, and we keep playing until one player is left...
so m-1 games.

Total number of pairs:
m choose 2=m!/(2!*(m-2)!)=m*(m-1)/2

Division
(m-1)/(m*(m-1)/2)= 2/m

we plug in 2^n and we get 2^(1-n)

Note that 2/m is more general and applies to any single elimination tournament regardless of structure (provided random initial assignment).
 
You have sets Ai, where i is in I, and I is some index set which can be uncountable.

If you read LaTex, the notation would be
\cap_{i\in I} A_i

If you don't read, here's what the union of them would look like:

Ui€I Ai

Here the euro-sign € represents "is in set"-sign.
The intersection is similar, just turn the U over.
 
gif.latex


Online LaTeX-rendering ftw.
 
According to Bayesian statistics what is the optimal solution to the prisoners dilemma?
 
That link seems to explain fairly well:

One off, defect.

Iterated, use tit-for-tat (cooperate first, then play same as opponent) is the best static option, assuming no collusion.
 
That link seems to explain fairly well:

One off, defect.

Iterated, use tit-for-tat (cooperate first, then play same as opponent) is the best static option, assuming no collusion.

Actually the best method is surprisingly simply something of that type so yes indeed.

Try a more complicated example where every day one prisoner is taken into a cell from the main cells. There are 100 prisoners and the only thing in the room is a light bulb and obviously a switch of some sort.

You can ask at any time to be released, but only when you are 100% sure all prisoners have been in the central area, which is not visible from the cells but can only be reached via them.

Spoiler :
I'll do some spoilers for sites that solve this problem later. Here's the problem as it is stated to avoid any confusion:

There are 100 prisoners in solitary cells. There's a central living room with one light bulb; this bulb is initially off. No prisoner can see the light bulb from his or her own cell. Everyday, the warden picks a prisoner equally at random, and that prisoner visits the living room. While there, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting that all 100 prisoners have been to the living room by now. If this assertion is false, all 100 prisoners are shot. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world could always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity. The prisoners are allowed to get together one night in the courtyard, to discuss a plan. What plan should they agree on, so that eventually, someone will make a correct assertion?


It's called the 100 prisoners dilemma and using probability or otherwise cunning you have to figure out the optimal amount of time that passes before you can ask for release.

On the one hand you can work out a system which probably wont be optimal but it will get you out in reasonable time, but there are more interesting possibilities with a little reason and a little maths knowledge.

Obviously waiting until everyone but you is dead is not optimal but it is a solution. :D

If you can't get it yourself, and you probably wont find the optimal solution without knowing a good deal about Bayesian mathematics, please spoiler answers that are from web sites.
 
Your choice of words is little confusing: Is it possible to the prisoners at some time be certain that everyone has been in the center?
 
Your choice of words is little confusing: Is it possible to the prisoners at some time be certain that everyone has been in the center?

Click on the spoiler that is the problem as given by the author.

That's pretty much it yes.
 
And leaving light bulb on is the only bit of information they can give to each others? I mean, the solution isn't "clever", like turning the light bulb in it's socket or things like that to be able to tell anything more?

It seems impossible to me. Perhaps you could try to code it into the number of days gone by, but I don't think even that is possible. I'm even more puzzled how this thing could require Bayesian statistics.

They could agree that the first person in the room leaves the light on. Then on 100th day the person could tell, if there's somebody who hasn't been there yet. They could also agree that if he's for the second time there, he'll turn it off. But if the guy is there for the first time, the person in there on 101th day can't know if there's been two persons twice there.

So they of course would need some more sophisticated system, but that system would require that the second person who's for the second time in the room turns the light off, and then no one after him can know whether there has been two or none persons twice in the room.

I'm not going to try to explain why I don't think it's possible to code the information to the days gone by, because it isn't easy, and because everybody understands it anyway. If it were possible we would have much more efficient computers anyway.
 
It's an old "riddle" type problem. You basically have one person who turns the light on (if on, leave on), and everyone else turns the light off exactly once (if off, leave off). Then, when the first person notes that he has turned the light off 100 times, he knows that everyone has gone into the room at least once. Of course, it takes a very, very long time. It would probably be better for them to simply serve their sentences.
 
And leaving light bulb on is the only bit of information they can give to each others? I mean, the solution isn't "clever", like turning the light bulb in it's socket or things like that to be able to tell anything more?

It seems impossible to me. Perhaps you could try to code it into the number of days gone by, but I don't think even that is possible. I'm even more puzzled how this thing could require Bayesian statistics.

They could agree that the first person in the room leaves the light on. Then on 100th day the person could tell, if there's somebody who hasn't been there yet. They could also agree that if he's for the second time there, he'll turn it off. But if the guy is there for the first time, the person in there on 101th day can't know if there's been two persons twice there.

So they of course would need some more sophisticated system, but that system would require that the second person who's for the second time in the room turns the light off, and then no one after him can know whether there has been two or none persons twice in the room.

I'm not going to try to explain why I don't think it's possible to code the information to the days gone by, because it isn't easy, and because everybody understands it anyway. If it were possible we would have much more efficient computers anyway.

No the clever solution is though, you can figure that the switch will tip people off but it may take as much as 40 or more years.

However if you use Bayesian maths then you can work out an optimal time when the odds are remote that no one has been in the centre room, of course you will never be 100% sure because freakilly there's always a remote chance 1 person is never selected. But you can be sure enough to risk it at some point.

Spoiler :
http://www.cut-the-knot.org/Probability/LightBulbs.shtml

Some time ago, Ilia Denotkine has posted the following problem on the CTK Exchange
There are 100 prisoners in solitary cells. There's a central living room with one light bulb; this bulb is initially off. No prisoner can see the light bulb from his or her own cell. Everyday, the warden picks a prisoner equally at random, and that prisoner visits the living room. While there, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting that all 100 prisoners have been to the living room by now. If this assertion is false, all 100 prisoners are shot. However, if it is indeed true, all prisoners are set free and inducted into MENSA, since the world could always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity. The prisoners are allowed to get together one night in the courtyard, to discuss a plan. What plan should they agree on, so that eventually, someone will make a correct assertion?

He then added a background to his question:


I have seen this problem on the forums, and here are some of the best solutions (in my opinion):

1.

At the beginning, the prisoners select a leader. Whenever a person (with the exception of the leader) comes into a room, he turns the lights on (but he does this only once). If the lights are already on, he does nothing. When the leader goes into the room, he turns off the lights. When he will have turned off the lights 99 times, he is 100% sure that everyone has been in the room.
2.

wait 3 years, and with a great probability say that everyone has been in the room.

Does anyone know The optimal solution???

I have taken this problem from the www.ocf.berkeley.edu site, but I believe that you can find it on many others.

As I had a recollection of seeing this problem in [Winkler], I replied


The problem is indeed popular. It's even included in P. Winkler's Mathematical Puzzles, which is a recommended book in any event. Winkler also lists a slew of sources where the problem appeared, including ibm.com and a newsletter of the MSRI.

The solution is this:

The prisons select a fellow, say Alice, who will have a special responsibility. All other prisoners behave according to the same protocol: each turns the light off twice, i.e. they turn it off the first two times they find it on. They leave it untouched thereafter. Alice turns the light on if it was off and, additionally, counts the number of times she entered the room with the light off. When her count reaches 2n - 3 she may claim with certainty that all n prisoners have been to the room.

As it happened, I was wrong. This may be immediately surmised from Stuart Anderson's response. In my wonderment I contacted Peter Winkler who kindly set things straight for me. The formulation in his book is somewhat different, but this difference proves to be of major significance:


Each of n prisoners will be sent alone into a certain room, infinitely often, but in some arbitrary order determined by their jailer. The prisoners have a chance to confer in advance, but once the visits begin, their only means of communication will be via a light in the room which they can turn on or off. Help them design a protocol which will ensure that some prisoner will eventually be able to deduce that everyone has visited the room.

(There is another approach.)
References

1. P. Winkler, Mathematical Puzzles: A Connoisseur's Collection, A K Peters, 2004, pp. 109-111

Copyright © 1996-2009 Alexander Bogomolny

Solution by Stuart Anderson


This would work of course, but is it optimal? For instance, this would also work, I think:

Alice counts the times she finds the light on, and ensures that it is always off when she leaves the room. Everyone else turns on the light the first time they find it off, and then never touches it again. This way, between visits of Alice, at most one prisoner will turn on the light, and no prisoner turns it on more than once. Therefore the number of times Alice finds the light on is no more than the number of different prisoners that have entered the room. Each prisoner knows he has been counted once he has turned the light on, since he is the only one who touched the switch since Alice last visited. When Alice counts to n-1, she knows everyone has visited the room.

What does optimal mean here? It could only reasonably mean that the prisoners are freed in the shortest time. So what is the expected time they must wait until Alice has counted to n-1? This is a rather elaborate calculation in probability, so the prisoners turn to the actuary (who is in prison for embezzlement) for some answers.

He explains that using Bayes theorem,
P(X|Y)·P(Y) = P(X&Y) = P(Y|X)·P(X)

and the linearity of expected value,
E(X|Y)·P(Y) + E(X|~Y)·P(~Y) = E(X)

you can calculate the expected time in prison like this:

Suppose Alice has just visited the room, and let K be the number of days that pass before her next visit (so she visits again K+1 days from now), let n be the number of prisoners, let c be the number of times she has found the light on so far, and let P(ON) and P(OFF) be the probabilities that she finds the light on or off on her next visit. Then E(K) = n - 1, P(K=k) = 1/n·((n-1)/n)k, P(K = k & OFF) = 1/n·(c/n)k, which are fairly obvious.

Summing the last formula over all k gives P(OFF) = 1/(n-c). Bayes theorem then gives P(K = k|OFF) = (1-c/n)·(c/n)k, and from this you can calculate E(K|OFF) = c/(n-c) and linearity gives

E(K|ON) = ((n-1)(n-c)-c/(n-c))/(n-c-1).

Now let m be the number of times Alice visits and L be the number of days that pass before she next finds it on. Each time she finds it is off, c does not change, so all the calculations regarding the time until her next visit also do not change.

Therefore, the expected number of days until she next finds the light on is found by summing over all possible m to get the expected total time wasted on visits where the light is off, plus the expected time for the one visit where it was on. This gives

E(L) = (1+E(K|ON))P(ON) + sum(m(1+E(K|OFF))P(OFF)m
= n(1/(n-c-1) - 1/(n-c) + 1 - 1/(n-c)2).

Now we know how long we expect to wait from count = c to count = c+1. Therefore, we must sum this up from c=0 to c=n-2 to find the total expected time E(T). The result is E(T) = n2 - n/(n-1) - a, where a = S(1/c2) from 2 to n. Putting n=100 into this gives 9935.5 days, which is 26.2 years.

But (continues the actuary) this is absurdly long to wait. Simple probability shows that we can be almost certain much sooner than this. The probability that on day d the count is c is P(c, d), which is obviously equal to P(c-1,d-1)·(1-(c-1)/n) + P(c, d-1)·(c/n). Of course, P(0, 0) = P(1, 1) = 1 and P(1,0) = 0, so we can recursively calculate the probability P(n, d). It turns out that P(100,1146) = 0.999, and P(100,1375) = 0.9999, P(100,1604) = 0.99999, and P(1833) = 0.999999. That means that in 3.14 years, we have a less than 1/1000 chance of failing, and in exactly 5 years and a week, we have less than one in a million chances of failing. I say we should wait 5 years and then say "let us out, we've all seen the light."

As they are about to kill Alice (who was already a member of Mensa) for coming up with a crazy plan to keep them in prison for 26 years, the game theorist (who is in prison for insider trading on the stock market) steps in to point out that this is a losing move. If they kill her now she will never go into the room, and the warden will keep them here forever.

In the happy ending, they let Alice live, and they all get out of prison in 5 years. Strangely, they all decline to join Mensa, preferring to enter actuarial training.


This is the answer from the author of the question and a Mathematician.
 
I'm not sure if I've asked this here before, but if I have two groups of uneven sample size and I want the standard deviation of the difference between them, how do I calculate it?

I think I need to weight the variances by dividing by the sample size, add them and subtract 2*(deviation1*deviation2/total sample size) but I'm not sure how to weight the deviations/variances.
 
Back
Top Bottom