This thought experiment gets even wilder if you like to live dangerously and leave two jokers and the rules card in the deck. 55 factorial is even larger
52 Factorial
31–40 of 65 posts
Re: 52 Factorial
#32I remember reading once that every time you shuffle a deck of cards, it's almost certainly the first time any deck of cards has ever been in that configuration. Seeing how outrageously large 52! is puts this into perspective.
Most likely not true, since many shuffles are from a sorted deck (original buy, result of playing out some game, etc...). The 52! possibilities are certainly not uniformly spread in real life. With enough shuffles then you'll likely hit never before seen territory.
Re: 52 Factorial
#33I sometimes wake up having an anxiety attack because my dream was attempting to play something like this out- always something to do with permutations of massive numbers. It was a little bit of a challenge to keep it together while reading this. No idea why that is, either. It's the only thing that has such an effect on me.
Re: 52 Factorial
#34https://www.quora.com/What-is-the-fastest-growing-mathematic...
Re: 52 Factorial
#35Earlier quoted context omitted.
I remember looking at some early Draw Poker machines in Las Vegas back in the late 80's/early 90's, and thinking about pseudo-random number generation (as it existed at that time). If it was using a standard linear-congruential RNG with a 16 bit value, there would be only 65536 possible seeds, and hence only that many distinct sequences of random numbers, and hence only that many possible shuffles. Even a 64-bit RNG…
ln(52!)/ln(2)≈226 bits. You don't have to depend on a single random 64-bit number: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
Re: 52 Factorial
#36You can use one deck to encode 225 bits of information.
Yeah, I actually implemented this some years ago here, for UTF-8 text: https://github.com/Michael-Zinn/cardfs Works for Poker, Skat, Tarot and Quartett decks.
Furthermore, if you can store bytes, then why should it need to be UTF-8? Not all data is text, and not all text is Unicode (and not all Unicode text is most efficient with UTF-8). As far as I can tell, the only part of the program that requires it to be UTF-8 is the "decode_array_to_string" function (although I think it will have to be a string without embedded null characters since that is how argv is working, and that could possibly allow you to store a few more bytes, if the data is required to not have null characters).
Re: 52 Factorial
#37This thought experiment gets even wilder if you like to live dangerously and leave two jokers and the rules card in the deck. 55 factorial is even larger
The jokers are indistinguishable, so it's only 55 factorial divided by two.
Re: 52 Factorial
#38I remember reading once that every time you shuffle a deck of cards, it's almost certainly the first time any deck of cards has ever been in that configuration. Seeing how outrageously large 52! is puts this into perspective.
Most likely not true, since many shuffles are from a sorted deck (original buy, result of playing out some game, etc...). The 52! possibilities are certainly not uniformly spread in real life. With enough shuffles then you'll likely hit never before seen territory.
Re: 52 Factorial
#39Earlier quoted context omitted.
Yeah, I actually implemented this some years ago here, for UTF-8 text: https://github.com/Michael-Zinn/cardfs Works for Poker, Skat, Tarot and Quartett decks.
A tarot deck has more than only trumps. It also has fourteen non-trumps in each of four suits (Latin-suited or French-suited depending on the deck), so the total number of cards (trumps and non-trumps) is 78. Furthermore, if you can store bytes, then why should it need to be UTF-8? Not all data is text, and not all text is Unicode (and not all Unicode text is most efficient with UTF-8). As far as I can tell, the only…
I originally had planned to store other data as well (that's why it's called "CardFS"): With the bytes, there is another multiplier 3 in there, which is unused. My plan was to do 0=UTF-8 text, 1=raw bytes, 2=bitmap graphic, but I stopped working on it after I got the UTF-8 text working.
Excluding NUL characters would only up the byte count to floor(log_255(52!)), which is still 28 bytes (though it increases the unused multiplier from 2.99 to 3.1, which makes it possible to use all bytes in all three file types), but how would you then store texts that use fewer than the maximum number of characters? Fill it with spaces?
Re: 52 Factorial
#40I sometimes wake up having an anxiety attack because my dream was attempting to play something like this out- always something to do with permutations of massive numbers. It was a little bit of a challenge to keep it together while reading this. No idea why that is, either. It's the only thing that has such an effect on me.