TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Kruskal Count Card Trick

201 pointsby jessupabout 7 years ago

10 comments

rxmabout 7 years ago
When 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, obviously pleased. “Not many people know my brother and I are into magic.” He did not want to take credit for the trick and attributed it to his brother. He would come often to Los Alamos and I miss chatting with him (got lots of advice on bringing up girls).
评论 #16997305 未加载
rtpgabout 7 years ago
this is super interesting! The deeper explanation[0] really gets to the essence of what&#x27;s happening here.<p>An interesting corrolary: the deeper down the deck you go, the less number of paths are actually available. For example, if you have 10 cards on the first row, then there are at most 10 paths to the end, but those can merge. So if you have many cards, paths will merge and you might just end up with one path.<p>So most cards towards the end of the deck are totally unreachable! For example the next to last card is most likely not reachable through this walking algorithm in most distributions.<p>I&#x27;m not sure of the implications but it sure feels important for things like randomly generated worlds or whatnot.<p>[0]: <a href="http:&#x2F;&#x2F;faculty.uml.edu&#x2F;rmontenegro&#x2F;research&#x2F;kruskal_count&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;faculty.uml.edu&#x2F;rmontenegro&#x2F;research&#x2F;kruskal_count&#x2F;in...</a>
评论 #16993443 未加载
评论 #16993358 未加载
lifeformedabout 7 years ago
Is this related to the 100 prisoners problem discussed yesterday? <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16984815" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16984815</a>
评论 #16997611 未加载
dahartabout 7 years ago
I wonder if this is related -- the description immediately made me think of the &quot;avalanche&quot; 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 &quot;trap card&quot; would be a sign that your counting function isn&#x27;t good enough. (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Avalanche_effect" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Avalanche_effect</a>)<p>Pretty sure I first heard about avalanching from Bob Jenkins&#x27; hash functions. (<a href="http:&#x2F;&#x2F;burtleburtle.net&#x2F;bob&#x2F;hash&#x2F;doobs.html" rel="nofollow">http:&#x2F;&#x2F;burtleburtle.net&#x2F;bob&#x2F;hash&#x2F;doobs.html</a>)
评论 #16996386 未加载
seanalltogetherabout 7 years ago
Since all face cards count as a 5, does the probability increase or decrease if you remove all face cards?
评论 #16993773 未加载
评论 #16996538 未加载
epsabout 7 years ago
Sounds suspiciously similar to rainbow tables used for hash reversals... or am I off here?
评论 #16993887 未加载
lazyantabout 7 years ago
I learned about this from the &quot;metamagical&quot; section in a Scientific American magazine from the 80s, good times. Apparently Uri Geller did it on tv and didn&#x27;t work.
joostersabout 7 years ago
The page says that a two deck version of this has a 95% chance of working - does anyone know what % chance the single deck version has?
评论 #16993501 未加载
timmybabout 7 years ago
On my only two attempts, it never landed on the target card. Weird.
评论 #16994819 未加载
评论 #16994907 未加载
hsljekskfhabout 7 years ago
i couldn’t find how the “trap card” was determined
评论 #16994876 未加载
评论 #16994938 未加载