• CodexArcanum@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I’ve always found this factoid pretty dubious. First off it’s statistical so there are no absolute truths or facts, only tendencies.

    But do this experiment for yourself, I just did a few times: take all the kings and aces out. Order them (I used Spade, Club, Heart, Diamond, Aces first then kings) and put them on top of the deck. Now do 7 riffles and look through the deck.

    What I found is that the 8 chosen cards are still weighted towards the top of the deck (a little less than half moved to the bottom half, but none to the bottom 1/3rd). The suits got shuffled a little but all the spades and most clubs were still in the top 1/3rd of the deck. Most of the aces and kings stayed together in close pairs or triplets, within 5 cards of each other.

    So no, 7 riffles isn’t realistically good enough for fair play at actual tables. You need to mix in some cuts and pool shuffles to break up the structure of the deck and properly distribute the cards.

    • Melatonin@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      I do think cuts are necessary, and I use them each time. If each riffle includes a cut I feel this factoid is undoubtedly true, period.

      Therefore, I think the definition of riffle must include a cut.

  • CountVon@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    21
    ·
    27 days ago

    After thoroughly shuffling, the exact order of the deck is one of 52! (52 factorial, or 52 * 51 * 50 * … * 2 * 1) possible combinations. That is such a large number that it’s possible, even likely, that the exact ordering of your deck has never existed before and will never exist again.

  • henfredemars@infosec.pub
    link
    fedilink
    English
    arrow-up
    9
    ·
    27 days ago

    It’s also not sufficient to randomize a deck of cards using a 32-bit seed as was once common in software.

    Indeed, even with a 64 bit seed, it is not sufficient.

        • derekabutton@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          Yeah looks like I did something wrong. Must have just been looking at the numbers raised by powers of 2. Good find! Thank you

          • CodexArcanum@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 days ago

            No problem! It only stood out to me because it’d be an amazing coincidence if 52! fit snuggly into 2^8. Being a nerd, I have many powers of 2 memorized!

            With a little playing around, it seems like 57! is the last whole number that fits (254.5 bits needed) so you could add a couple of jokers in or even use a tarot deck’s minor arcana (56 cards) and have room with a 256-bit wide BigInt, with a few bits to spare!

  • SubArcticTundra@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    27 days ago

    I always thought riffle shuffles were super ineffective. Most of the cards remain in each others vicinity. What is a better way?

    • moody@lemmings.world
      link
      fedilink
      English
      arrow-up
      24
      ·
      27 days ago

      You’re essentially splitting the deck and recombining the two halves imperfectly multiple times in a row. Like if a riffle was perfect, you would get the cards from both halves equally distributed, but nobody can do it perfectly, so they actually end up properly randomized. After 7 imperfect riffles, the entire deck is unpredictable.

      After 4 perfect ABAB riffle shuffles, you would end up with the same order as you started with. If your shuffles are imperfect, your deck becomes more random every time.

    • Melatonin@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      2
      ·
      27 days ago

      It’s the best way, period. Even as inefficient as it may seem, inexpertly done, seven shuffles and you’re good.

  • MelodiousFunk@slrpnk.net
    link
    fedilink
    arrow-up
    3
    ·
    26 days ago

    I never learned how to properly shuffle cards that way. My hands just fail at the basic mechanics. Perhaps coincidentally, I would be mortified if something like that were done to the vast majority of the games in my collection. That ain’t no $2 Bicycle deck, mi amigo.