Pretty sure I first heard about avalanching from Bob Jenkins' hash functions. (http://burtleburtle.net/bob/hash/doobs.html)
The Kruskal Count Card Trick
31–40 of 43 posts
Re: The Kruskal Count Card Trick
#32Earlier quoted context omitted.
the fact that they must merge is really dependent on the distribution of cards within the deck, though. For example, imagine if your deck was filled with 9s. You would get 2 paths merging but not much else. Of course with the standard 52-pack you'll end up with a high degree of merging. I just think it's important to say that the necessity of merging is really dependent on the instruction set, so to speak.
I think the fact the deck doesn't have many repeats of 9s. It has lots of repeats of 5s which causes merges and the other numbers will eventually merge. You have 4 each of 6,7,8,9. If you repeat 9 4 times there will be no more 9's and it will merge.
Re: The Kruskal Count Card Trick
#33I wonder if this is related -- the description immediately made me think of the "avalanche" effect in hash functions. A hash function avalanches if a single bit change in the input produces a wildly different output. So avalanche would be the exact opposite of the funneling effect of this card counting trick. In hash functions, the funneling effect or "trap card" would be a sign that your counting function isn't good…
Re: The Kruskal Count Card Trick
#34Re: The Kruskal Count Card Trick
#35Since all face cards count as a 5, does the probability increase or decrease if you remove all face cards?
Re: The Kruskal Count Card Trick
#36Re: The Kruskal Count Card Trick
#37When I was a graduate student, in the late 80s, I was waiting for a flight to Los Alamos in Albuquerque. There was only one other person in the lounge, obviously also going to Los Alamos. I started chatting and he introduced himself as Martin Kruskal. Idiot me had no idea whom I was speaking to. I said “The only Kruskal I know invented this amazing card trick having to do with dynamical systems.” He stared at me, obv…
Re: The Kruskal Count Card Trick
#38Since all face cards count as a 5, does the probability increase or decrease if you remove all face cards?
I put together a small simulation and I think you have an 82% chance of winning with the setup described (though I welcome repeats). Replacing the J/Q/K with a score of 10 and the win rate drops to ~68%. Intuitively anything that makes you take shorter steps should increase the chance of merging with another path.
Re: The Kruskal Count Card Trick
#39Is this related to the 100 prisoners problem discussed yesterday? https://news.ycombinator.com/item?id=16984815
Re: The Kruskal Count Card Trick
#40Earlier quoted context omitted.
I put together a small simulation and I think you have an 82% chance of winning with the setup described (though I welcome repeats). Replacing the J/Q/K with a score of 10 and the win rate drops to ~68%. Intuitively anything that makes you take shorter steps should increase the chance of merging with another path.
Try running it again with them set to 2. My bet would be that's also less good than 5 (but not as bad as set to 10). I'd be very interested to know if that's right or not.