Live data from Hacker News

52 Factorial

czep.net

61–65 of 65 posts

Re: 52 Factorial

#62
post #32

Earlier quoted context omitted.

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.

And once you get there, it is likely that further shuffles will stay there.

Agreed. Except I suspect most shuffles are people playing cards, and many (most?) games put a lot of order back into the deck, again returning to well trodden decks.

Re: 52 Factorial

#63

In terms of actually playing games with cards, the effective number of permutations can be much smaller (though still large enough to be going on with). In many card games, the suits are distinct but functionally identical; you could swap spades rank-for-rank with hearts and get a functionally equivalent deck. In Klondike solitaire, the tableau is concerned with red cards and black cards, not all four suits. I imagin…

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…

When playing draw poker, you only need to select 10 cards from the deck, because the other cards will never be played. So that's 52⋅51⋅…⋅43 = 57,407,703,889,536,000, which needs 56 bits.

Re: 52 Factorial

#64

Earlier quoted context omitted.

The jokers are indistinguishable, so it's only 55 factorial divided by two.

Sometimes they are distinct, usually one is black & white and the other is color.. the solitaire cipher makes use of this distinction.

Solitaire: https://en.wikipedia.org/wiki/Solitaire_(cipher)

Re: 52 Factorial

#65
post #35
post #20

Earlier quoted context omitted.

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

If the RNG has < 226 bits of state, such as most non cryptographic PRNGs, you cannot reach all shuffles even if you use multiple numbers.

Hey, sorry to contact you via this method. I meant to reply to your comment under the thread on SCALE but it's locked. I'm expecting an offer from that company and would like to ask you about your experience there. If you don't mind, could you accept my connection request on LinkedIn and we could chat there? Thank you :)
Post reply on HN