mass of the Milky Way is 6x10^42 kg
mass of the visible Universe is 1.5×10^53 kg
Quality deck of cards weighs 0.3 kg. All deck combinations would weigh 2.4×10^67 kg.
= 10^14 times the mass of the visible Universe.
You need many multiverses to store all those cards.
Some sort of auto-shuffling machine with some computer vision to match the shuffling in real time... still a magic trick, a different kind of impressive. But that guy who makes robots at home and does videos would love a project like this. I seriously doubt it would work.
Even if all compute on earth was focused on shuffling as many decks as fast as possible, we still wouldn't ever get two identical decks. Even after hundreds of millions of trillions of years.
The odds of getting two identical shuffles is somewhere around the odds of picking the correct sand grain sized piece of matter, out of all matter in the Milky Way.
The likelihood that more than one person used a poor or lazy shuffling technique on a brand new deck of cards seems significant.
I imagine somebody has done research on this: for a given card game, how many functionally distinct shuffles there are.
However if you combine the outputs of two, but don't step them at the same time, you can have more outputs.
Imagine you had one that outputs just 0 and 1 and then loops. You could have two of these updating at a different frequency and have four distinct outputs.
I think that makes sense.
Something you may find interesting is formal methods - what we're talking about here are "equivalence classes". In formal methods you want to analyze the totality of a system and understand every outcome based on every possible state within the rules of the system. Clearly this is a combinatoric nightmare in anything interesting (even a simple system like a card game and 52 cards, as we can see). Equivalence classes are a way of knowing distinct, but not actually different, states, and grouping them together so that they can all be considered just once.
That's going in my next spy novel. Spy 1 gets together with Spy 2, for cracking game of Cribbage, and at the end, Spy 2 walks out with a deck of cards, but it's actually a 256 bit encryption key.
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).
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?
With enough shuffles then you'll likely hit never before seen territory.
52! ~ 10^67 is far many orders of magnitude than the number of particles in the universe, which is exactly an astronomical number.
> What must it be, then, to bear the manifold tortures of hell forever? Forever! For all eternity! Not for a year or an age but forever. Try to imagine the awful meaning of this. You have often seen the sand on the seashore. How fine are its tiny grains! And how many of those tiny grains go to make up the small handful which a child grasps in its play. Now imagine a mountain of that sand, a million miles high, reaching from the earth to the farthest heavens, and a million miles broad, extending to remotest space, and a million miles in thickness, and imagine such an enormous mass of countless particles of sand multiplied as often as there are leaves in the forest, drops of water in the mighty ocean, feathers on birds, scales on fish, hairs on animals, atoms in the vast expanse of air. And imagine that at the end of every million years a little bird came to that mountain and carried away in its beak a tiny grain of that sand. How many millions upon millions of centuries would pass before that bird had carried away even a square foot of that mountain, how many eons upon eons of ages before it had carried away all. Yet at the end of that immense stretch time not even one instant of eternity could be said to have ended. At the end of all those billions and trillions of years eternity would have scarcely begun. And if that mountain rose again after it had been carried all away again grain by grain, and if it so rose and sank as many times as there are stars in the sky, atoms in the air, drops of water in the sea, leaves on the trees, feathers upon birds, scales upon fish, hairs upon animals – at the end of all those innumerable risings and sinkings of that immeasurably vast mountain not even one single instant of eternity could be said to have ended; even then, at the end of such a period, after that eon of time, the mere thought of which makes our very brain reel dizzily, eternity would have scarcely begun.
(From Portrait of the Artist)
"The third question is, how many seconds of time are there in
eternity?" Then said the shepherd boy: "In Lower Pomerania is the Diamond
Mountain, which is two miles and a half high, two miles and a half wide,
and two miles and a half in depth; every hundred years a little bird
comes and sharpens its beak on it, and when the whole mountain is worn
away by this, then the first second of eternity will be over."
[1] https://www.grimmstories.com/en/grimm_fairy-tales/the_shephe...I think it is a somewhat common analogy in catechistic texts but I’m not positive. I don’t think anyone could write it quite like Joyce though!
There are 10 total numbers between 1 and 52 which include 5 as a factor (5 which also include 2 as a factor to make a factor of 10 and 5 more to be multiplied with a bunch of other 2-factor numbers) so intuitively I was thinking there should be 10 zeroes. The two I missed are additional factors of 5, one each in 25 and 50.
And from this (or by other arguably more elegant means) one can get the related cute theorem: the number of times p divides the binomial coefficient (n choose r) is the number of carries that occur when adding r to n-r in base p.
In particular, if n = p^k then unless r=0 or r=n there is always at least one carry because n is "longer" than r and n-r, so all the binomial coefficients (p^k choose r) are multiples of p apart from (p^k choose 0) and (p^k choose p^k).
(You can use this sort of idea to understand why, if you write out many many rows of Pascal's triangle mod 2, you get a sort of Sierpinski gasket thing.)
https://www.quora.com/What-is-the-fastest-growing-mathematic...