The Magic Café
Username:
Password:
[ Lost Password ]
  [ Forgot Username ]
The Magic Cafe Forum Index » » Magical equations » » E and shuffled deck randomness (0 Likes) Printer Friendly Version

Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
I have a friend who informed me there is a way to 'check' the randomness of a deck of cards by adding them in such a way as they converge towards the decimal expansion of e. We both delighted in the idea over coffee but have been unable to find the place he read it again. I am particularly curious to find out if this is:

A. true
B. How this is done specifically.

Can anyone shed any light on this, or is it an mathematicians fairy tale?

M


Posted: Dec 13, 2004 4:40am
--------------------------------------
I have found more information on this. It wouldn't form much of a 'trick' except at a mathematicians party...but perhaps in time I can do something with it.

M
tiberius magus
View Profile
New user
70 Posts

Profile of tiberius magus
Metalepsis-
I am intrigued. Could you email me further info? Thanks!

Sincerely,
tiberius magus
Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
I will do, but be patient with me (although feel free to remind me). I am in the middle of a dissertation (nothing to do with this subject). How technical do you want it? Specifically are you a mathematician allied subject? Just a card-guy? I do my best to speak to the audience in their own words, so tell me how you want it.

Are you familiar with Euler's equation?

e^i*pi = -1

...to remind you...

Metalepsis
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
I think he liked it better as e^i*pi+1=0 so he also got the important constant 0 represented in that beautiful identity.

Also curious about the randomness check of a deck. Sounds intriguing.

Thanks in advance,

/Tomas
tiberius magus
View Profile
New user
70 Posts

Profile of tiberius magus
I did one year's worth of a bachelor of mathematics, so you can throw a fair bit at me, but on the other hand I did quit(though not for academic reasons). Let's just say I have a firm basis in classical and linear algebra and basic calculus but that's about it. There's no rush, though: just whenever you find the time.

sincerely,
tiberius magus
Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
A good starting point for monte-carlo methods for calculating pi is :

http://www.eveandersson.com/pi/monte-carlo-circle

The problem can be restated in terms of sticks thrown at a floor

http://filebox.vt.edu/users/rboehrin/Buf......mula.htm

and also for a deck of cards (but I can't find a link for that)


As for calculating e from a deck of cards, the trick (sic) is to look
for a Poisson distribution. The classic example is calculting e from the number of
Prussian soldiers who died from a horse kick.

Basically determine a problem with Poisson stats and look for the solution (perhaps
reverse from http://www.ucl.ac.uk/~ucbhtoc/L5notes.html)

sorry I'm so busy I can't collate this for you...I'll come back in a week or so to help with futher explanations.

M
TomasB
View Profile
Inner circle
Sweden
1143 Posts

Profile of TomasB
I'm a bit lost as how to apply the Poisson Distribution to a deck of cards. As I understand the Poisson Dist is used when you have a huge amount of samples (not just 52) and two occurences where one is much less probable than the other. No idea how to apply that to a deck of cards. Any further info on the algorithm would be nice.

Also I didn't understand if this was a way to calculate "e" or a way to see if the deck is well shuffled.

Happy holidays!

/Tomas
Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
Tomas,

Sorry I haven't been round lately. I forgot about this while going through some life problems. I still only have these uncollated notes myself, so I'll arrange a coffee with the person who told us about it and get back to you. To be honest I am a bit confused and suspicious myself.

I'll keep you posted.
rgranville
View Profile
Elite user
Boston area
462 Posts

Profile of rgranville
There's a little confusion going on here. If you take two shuffled decks of cards and turn the cards of the decks simultaneously, the probability that you WON'T find a match at LEAST once is 1/e, or close enough. It actually approaches 1/e as the size of the decks increases, but gets remarkably close with surprisingly few cards (much less than 52).

For the math geeks among us, a permutation where none of the elements is in its original position (which is what we're talking about here) is called a derangement.

:pepper:
Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
Thank You, rgranville.

I was chasing this up through friend of a friend scenarios, and it was getting irritating. Without the mention of a second deck I would never have figured this out (despite not being afraid of the maths).

So to clarify, 1/e (well close to it anyway...with a finite deck) is the probability that we encounter a derangement between two decks?

Fantastic. The Frequent Miracle trick somewhere here the Café discusses using this principle. I may have the name wrong on that trick since I can't find it anymore, but the principle of encountering the same card is used and expanded upon to increase the chance of finding one.

Thanks again,

M
Muddy
View Profile
Elite user
449 Posts

Profile of Muddy
Regarding checking the randomness of a shuffled deck some have suggested using rising sequence counts as a check:
http://weber.math.washington.edu/~charti......ion.html
here is a neat simulation that shows rising sequences after x riffle shuffles:
http://weber.math.washington.edu/~charti......ion.html
Heinz Weber
View Profile
New user
Austria
83 Posts

Profile of Heinz Weber
I think it is -like rgranville wrote- a matter of derangement. Compare the shuffeld deck to new deck order and count the number of cards "back at their places". The probability of finding at least one is 1-1/e, like stated.

But I don't think this is a good indication for randomness, you just have to switch one card from top to bottom and there is no match anymore, but not really a well shuffeld deck...

Regards
Heinz
Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
Quote:
But I don't think this is a good indication for randomness, you just have to switch one card from top to bottom and there is no match anymore, but not really a well shuffeld deck...


True. The rising sequence information looks much better in that respect. Once I knew it was a matter of derangement, the thoughts of using it to check entropy went out the window, although it does represent computational distinguishability of a set or string.

M
Heinz Weber
View Profile
New user
Austria
83 Posts

Profile of Heinz Weber
Maybe some sort of measurment of the variation of distances between the cards in the shuffeld deck and new deck order can be utilised to check randomness?

Heinz
Metalepsis
View Profile
Loyal user
232 Posts

Profile of Metalepsis
That's essentially the thinking of Persi Diaconis, if you haven't seen his papers already they are worth a look. A quick google will find them. He's a magician as well, although better known in the maths community methinks (perhaps I'm wrong...).
hokie
View Profile
New user
2 Posts

Profile of hokie
I saw that my website was listed here. I am pleased to see that my work is of interest outside of the scientific research community.

One of the interesting facts I declined to mention in the section I wrote on history of Buffon and his needle problem is how poorly the method converges to pi. It is simply abyssmal. One of the references I list at the end of my write up has taken the time and effort to calculate how many times a needle must be thrown on average to get pi to 6 decimal places. The scary result is something like 134 trillion times. This is loads of work for not many decimal places.

So random methods are interesting, but they may not be efficient. Sometimes random methods are the only known method to solve a problem. When that is the case there is often a great effort made to understand how well these methods perform. A few solutions have been worked out.
hokie
View Profile
New user
2 Posts

Profile of hokie
Andrei
View Profile
Veteran user
Romania
353 Posts

Profile of Andrei
The page is still unavailable.

Andrei
The Magic Cafe Forum Index » » Magical equations » » E and shuffled deck randomness (0 Likes)
[ Top of Page ]
All content & postings Copyright © 2001-2021 Steve Brooks. All Rights Reserved.
This page was created in 0.11 seconds requiring 5 database queries.
The views and comments expressed on The Magic Café
are not necessarily those of The Magic Café, Steve Brooks, or Steve Brooks Magic.
> Privacy Statement <

ROTFL Billions and billions served! ROTFL