3

Given an ordered deck of cards (like those for poker), if you split evenly in 26 cards and riffle shuffle perfectly one card over another, how many riffle shuffles should you perform to have the deck ordered as in the beginning?

Comments
  • 4
  • 0
    @Fast-Nop justify your answer (pls?)
  • 0
    I think perfect shuffles as permutations are n-cycles. I have no idea how they decompose and I'm probably not going to research it, but this means that at worst the n-th power is identity.
  • 1
  • 1
  • 2
    It's 8 but the formal proof eludes me

    I think its enough to reset the second number. And the second number travels in an exponential way through the shuffled list. So the position offsrt of the second digit can be predicted as (2^n)-1 and for the number to do a perfect loop it has to have an offset that's divisible by the length of the array - 1.

    So if you solve:
    Arr = (52 cards)
    (2^n)-1 mod (len(arr)-1) == 0

    For the lowest N, you get
    (2^n)-1 mod 51 == 0
    And this is first true for N=8
    255 mod 51 == 0

    I tested this on several array lengths and it works for any array length I tested, but Im unable to figure out a formal proof to justify this... But yeah, its 8
Add Comment