Card Shuffling How many perfect shuffles will return a full deck

Slides:



Advertisements
Similar presentations
Mod arithmetic.
Advertisements

Binary Relations Binary Relations on Real Numbers.
Shuffle an Array Shuffle a deck of cards. n In i th iteration, choose a random element from remainder of deck and put at index i. – choose random integer.
Prime Numbers and Prime Factorization Developed by Kira Shank, M.Ed.
Using factors to find the prime factorization of a number
Basic properties of the integers
Economics 214 Lecture 8 Introduction to Functions Cont.
Cyclic Groups. Definition G is a cyclic group if G = for some a in G.
You Too Can be a Mathematician Magician John Bonomo Westminster College ////////////////////////
DRUG & ALCOHOL AWARENESS The Board Game. Rules: Each player has a stack of blue and green cards. If they land on a PINK or GREEN square they must read.
Number Theory Factors & Divisibility LCM and GCF BASE number
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
Algebra points Algebra points The numbers 1, 2, 3, … 10 are written on ten index cards, one.
Factors and Multiples. Definition of Factors and Multiples If one number is a factor of a second number or divides the second (as 3 is a factor of 12),
GCF What does it stand for? What is it?. What do these have in common??
Multiplying and Dividing Integers When you MULTIPLY: Two positives equal a positive Two negatives equal a positive One positive & one negative equal.
Sequencing Shuffle the cards and place in a pile with the numbers facing down. Order the cards from 0 to 11. How fast can you do this?
Suci Cahyati ( ) Prime number. What is prime number?? an integer that has no integral factors but itself and 1.
Chinese Remainder Theorem. How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder.
Bell Ringers Solve the following equations and write the commutative property equation and solve: (-74) + 54 (-87) + (-32) Solve the following equations.
Prime Numbers and Factoring. Which expression is equal to 4x6? (a) 2 × 2 x 2 (b) 2 × 3 × 4 (c) 4 × 5 × 3 (d) 6 × 6.
Programming games in Visual Basic Review programming & VB topics Insertion sort. Best times. Generate questions & answer patterns for quiz Lab/Homework:
The theory of partitions. n = n 1 + n 2 + … + n i 7 = =
FactorsRangeMaximumNumeratorX AxisPolygon MultiplesMedianMinimum Denominator Y AxisDiameter Prime Numbers PerimeterMean Mixed Numbers/ Fractions OriginCongruent.
I Have…Who Has? for Algebra Classes J. Hill Card #1 I have 8 Who has the slope of the line whose equation is: y = 14x - 17?
All standards and examples can be found at atics/2014-ias-mathematics-resources-grade_7_7-1-
Prime Numbers and composite numbers
Copyright © Cengage Learning. All rights reserved. Functions 1 Basic Concepts.
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-5 Mathematical Background:
Solving Quadratic Equations by Graphing Chapter 9.2.
How to do a card trick.
Review of Factoring Unit R Lesson 2.
INTRODUCTION TO FRACTIONS
Venn Diagrams For each Venn diagram insert the numbers 1 to 10 into the correct sections. 1. Multiples of 2 Multiples of or less Factors of 12 2.
6.NS.5 Integer War You will need: deck of cards
By Christine Mac, Tanya de Nobrega, Paula Hulse, Keith Kennison
The Pigeonhole Principle
The Derivative Chapter 3.1 Continued.
Binomial Distribution
Applied Discrete Mathematics Week 4: Number Theory
GROUPS & THEIR REPRESENTATIONS: a card shuffling approach
Direct Proof and Counterexample IV
Functions can be written in different ways y = 2x + 3 f(x) 2x + 3
9 x 14 9 x 12 Calculate the value of the following: 1 4 × 12 =
A function f is increasing on an open interval I if, for any choice of x1 and x2 in I, with x1 < x2, we have f(x1) < f(x2). A function f is decreasing.
Pedro Freitas MathsJam 2017
Label Name Label Name Label Name Label Name Label Name Label Name
a + 2 = 6 What does this represent? 2 a
The Pigeonhole Principle
CSE 321 Discrete Structures
Assignment #1 Solutions
Cube Root-Least number
Operations With Integers
You Too Can be a Mathematician Magician
Square root Least number Multiply & Divide.
Direct Proof and Counterexample IV
Every number has its place!
Median Statement problems.
Primitive Recursive Predicates
Applied Discrete Mathematics Week 10: Introduction to Counting
Counting Elements of Disjoint Sets: The Addition Rule
Randomized Algorithms
I have… I have… Who has 3:40? Who has 12:20? I have… I have…
Randomized Algorithms
Greatest Common Factor
Divide 9 × by 3 ×
Mathematical Background: Extension Finite Fields
Oracle Academy Lead Adjunct
Presentation transcript:

Card Shuffling How many perfect shuffles will return a full deck of cards to their original order?

Perfect Shuffle Divide 52 cards into 2 equal piles Shuffle by interlacing cards Keep top card fixed (Out Shuffle) 8 shuffles => original order

For example

A Model for Card Shuffling Label the positions 0-51 Then 0->0 and 26 ->1 1->2 and 27 ->3 2->4 and 28 ->5 … in general? f(x) = 2x mod 51

The Order of a Shuffle Minimum integer k such that 2 k x = x mod 51 for all x in {0,1,…,51} In particular, this has to hold when x = 1 Minimum integer k such that 2 k - 1= 0 mod 51 Thus, 51 divides 2 k - 1 k= 6, 2 k - 1 = 63 = (3)(3)(7) k= 7, 2 k - 1 = 127 (prime) k= 8, 2 k - 1 = 255 = (5)(51) = 0 mod 51

The Out Shuffle

The In Shuffle

Model for shuffling n Cards p = position In Shuffles Out Shuffles

Order of a Shuffle 8 Out Shuffles for 52 Cards In General? o (O,2n-1) = o (O,2n) o (I,2n-1) = o (O,2n) => o (O,2n-1) = o (I,2n-1) o (I,2n-2) = o (O,2n) Therefore, only need o (O,2n)

o (O,2n) = Order for 2n Cards 1 shuffle: O(p) = 2p mod (2n-1), 0<p<N-1 2 shuffles: O2(p) = 2 O(p) mod (2n-1) = 22 p mod (2n-1) k shuffles: Ok(p) = 2kp mod (2n-1) Order: o (O,2n) = smallest k such that Ok(p) = p mod (2n-1) for all p between 0 and 2n Which means 2k = 1 mod (2n-1) => (2n – 1) | (2k – 1)

The Orders of Perfect Shuffles n o(O,n) o(I,n) n o(O,n) o(I,n) 2 1 2 13 12 12 3 2 2 14 12 4 4 2 4 15 4 4 5 4 4 16 4 8 6 4 3 17 8 8 7 3 3 18 8 18 8 3 6 50 21 8 9 6 6 51 8 8 10 6 10 52 8 52 11 10 10 53 52 52 12 10 12 54 52 20