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.

Cryptographers, teach me how to shuffle cards

2 pointsby andrei-akopianabout 1 year ago
Shuffling cards is hard, some methods need skill or are to hard for children to do, others don&#x27;t shuffle the cards well, sometimes the same cards easily stick together.<p>A solution I found is to shuffle cards by distributing them into 4 piles one by one, and then putting the piles on top of each other. It usually does the job of splitting cards that were together previously, and even a child can do the procedure producing a relatively well shuffled deck. But for some card games that doesn&#x27;t work: like Skip-bo where the cards end up in sets of 12 making this method terrible. I tried adding some randomness by randomly picking the piles to place the cards into, but I don&#x27;t feel like it is a good solution.<p>So, Cryptographers, use your hashing and encryption knowledge to come up with an algorithm that could be taught to a child, doesn&#x27;t take more than 2 passes through the deck, but that best eliminates any kind of patterns out of cards.<p>As criteria I will set &quot;being able to shuffle a deck of cards that is sorted or has a repeating pattern&quot; while &quot;requiring the minimal amount of logic and movements from the shuffler.&quot;<p>Maybe, I phrased my entire question badly, but I hope it can be understood.

1 comment

derbOacabout 1 year ago
I think smooshing might work with kids:<p><a href="https:&#x2F;&#x2F;phys.org&#x2F;news&#x2F;2023-04-expert-reveals-fascinating-link-math.html" rel="nofollow">https:&#x2F;&#x2F;phys.org&#x2F;news&#x2F;2023-04-expert-reveals-fascinating-lin...</a>