Search:

Type: Posts; User: pbrockway2

Search: Search took 0.10 seconds.

  1. Replies
    9
    Views
    2,736

    Re: shuffling help

    Double post removed
  2. Replies
    9
    Views
    2,736

    Re: shuffling help

    The "seven times" requirement actually applies to riffle-type shuffles where you divide the pack then interleave the two halves. It comes about because the original order is largely preserved by...
  3. Replies
    9
    Views
    2,736

    Re: shuffling help

    A correction: from the OP's code (selecting 1/2 of the pack) I leapt - maybe too fast - to the conclusion he or she was after a riffle shuffle. Anyway the illustration I gave was wrong. It should...
  4. Replies
    9
    Views
    2,736

    Re: shuffling help

    A riffle shuffle doesn't doesn't involve swaps (in any obvious and straight forward sense).

    Starting with a pack labelled

    0-1-2-3-4-5-6-7-8-9- ... -49-50-51-52

    You are attempting to form
    ...
  5. Replies
    9
    Views
    2,736

    Re: shuffling help

    Norm is right about doing the shuffle "in place" - ie figure out which indices have to swap and use a temporary variable. But what you posted doesn't seem to have anything to do with swapping...
Results 1 to 5 of 5