Random Card Shuffling

Size: px
Start display at page:

Download "Random Card Shuffling"

Transcription

1 STAT 3011: Workshop on Data Analysis and Statistical Computing Random Card Shuffling Year 2011/12: Fall Semester By Phillip Yam Department of Statistics The Chinese University of Hong Kong

2 Course Information (1) Instructor: Phillip Yam Office: LSB G19 Office Hours: Monday 4:30 to 6:30 pm (2) Tutor: Peng-Fei Liu Office: LSB (3) Presentation: Date: Nov (Thursday) Time: from 3:30pm on at LSB C1 Duration: 15 to 20 mins each (4) Final Report Length: 10 to 15 pages. Deadline: 6 pm at Dec (Thursday)

3 Card Shuffling

4 Card Shuffling 1. How to design effective shuffles? 2. How many times of shuffles (a mixture those as suggested in (1)) does it take to randomize a deck of cards? 3. How to quantitatively test that the newly proposed shuffling ((1) and (2)) is likely to result in a randomized deck?

5 Permutations is a permutation as a way of rearranging the deck; e.g. 5 card deck: A composition of two consecutive permutations is still a permutation; Statistically, a shuffle Q is just a probability density on the space S n of all permutations of a deck of n cards; Notion of rising sequences in a permutation. 3 in ( )

6 After A Few Shuffling Convolution Q*Q on S n In general after k times of (different) shuffling, Q 1 * Q 2 * * Q k.

7 Top-In Shuffle Taking the top card off the deck; Reinserting the first card in any of the n positions between the n-1 cards in the remainder of the deck; Doing so randomly according to a uniform choice.

8 Perfect Shuffle: A Fake? ( Divide 52 cards into 2 equal piles; Shuffle by interlacing cards; Keep top card fixed (Out Shuffle); Problem (Magic trick): 8 shuffles => original order; For illustration: 4 cards, (12 34) (13 24) (12 34).

9 Perfect Shuffle: A Dynamical System Model Label the positions 0-51 Then 0->0 and 26 ->1 1->2 and 27 ->3 2->4 and 28 ->5 in general? 2x 0 x 25 f( x) 2 x 0 x 25 f ( x ) 2 x x 51 2 x x 51 Ignoring card 51: f(x) = 2x mod 51 Recall Congruences: 2x mod 51 = remainder upon division by 51

10 Perfect Shuffle: Its Order Minimum integer k such that 2 k x = x mod 51 for all x in {0,1,,51} True for 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(21) k= 7, 2 k - 1 = 127 k= 8, 2 k - 1 = 255 = 5(51)

11 Discrete Dynamical Systems First Order System: x n+1 = f (x n ) Orbits: {x 0, x 1, } Fixed Points Periodic Orbits Stability and Bifurcation Chaos! Most relevant! How can we implement this in card shuffling?

12 Riffle Shuffle Cut the deck into two packets (k, n-k) Choose k according to a binomial density (this is plausible in practice, approximately normal for large enough, say n > 30 ): Interleave the cards from each packet in any possible way, so that the cards of each packet maintain their own relative order, even if there are other cards in-between from another one.

13 Riffle Shuffle

14 Riffle Shuffle: Practical Implementation ( ) As before, cutting the deck according to the binomial density into two packets of size k and n-k. Drop a card from the bottom of one of the two packets onto a table, face down. Choose between the packets with probability proportional to packet size, i.e. if the two packets are of size p 1 and p 2, then the probability of the card dropping from the first is p 1 /(p 1 + p 2 ), and p 2 /(p 1 + p 2 ) from the second. For the first round, the probabilities would be k/n and (n-k) /n respectively. Next, with the numbers p 1 and p 2 being updated to reflect the actual packet sizes by subtracting one from the size of whichever packet had the card dropped last time. Example: from the 1st packet, and then from the 1st, 2nd, 2nd, 2nd, 1st, and so on. The probability of the drops occurring:

15 Riffle Shuffle: Calculations Probability of a cut with size k is Probability of an interleaving is Probability of a particular cut and interleaving is Remark: no information about the cut or the interleaving is indicated by this probability!

16 -Shuffles As a generalization of riffle shuffle; Cut the deck into packets of respective sizes p 1, p 2,, p with a probability given by the multinomial density; Interleave the cards from each packet in any way so long as the cards from each packet maintain their original relative order among themselves.

17 *Properties of -Shuffles A combination of an -shuffle and a -shuffle is equivalent to an - shuffle. k times riffle shuffle R (k) is the same as 2 k -shuffle The density of R (k) is For a permutation with r rising sequences Let A n,r be the number of permutations of n cards that have r rising sequences, called Eulerian numbers, the measure of closeness to uniform distribution is given by

18 Project Objectives Objective 1: Find a good shuffling method with minimum number of times. A mixture of previously mentioned? New style of shuffling? Etc. Not using Random Number Generator! You can use computing program to illustrate? Bring a deck of cards in to demonstrate by group-mates? Objective 2: Supporting arguments Theoretical study? Any probabilistic analysis, e.g. Combinatorics? Dynamical systems? Empirical investigations (using R?): empirical distributions? Monte- Carlo simulations? Objective 3: Justification Propose 2 different statistical testings of randomness; Comparative study.

19 Project Evaluation Same grade for everyone in the same group unless a table of division of labor force Presentation (40%) 15 to 20 mins for each group; Organization; Clearness; Time management; Critical thinking; Fluency in presentation, spoken English, Report (60%) 10 to 15 pages (excluding codes and data); MOST IMPORTANT: Creativity more than those commonly found in INTERNET; Innovation of new proposed method(s); Rigorous approach Proper use of statistical method of testing Submission: Send both PPT and Report to scpyam@sta.cuhk.edu.hk before 5pm on Dec Name Alice Bob Cathy Contribution 45% 45% 10%

20 References [1] Aldous, D. & Diaconis, P. (1987). Strong Uniform Times and Finite Random Walks. Advances in Applied Mathematics, 8, [2] Assaf, S., Diaconis, P. & Soundararajan, K. (2011). A rule of thumb for riffle shuffling. Ann. Appl. Probab. 21 (3), [3] Bayer, D. & Diaconis, P. (1992). Trailing the Dovetail Shuffle to its Liar. Ann. Appl. Probability, 2(2), [4] Kolata, G. (1990). In Shuffling Cards, Seven is Winning Number. New York Times, Jan. 9. [5] Scully, D. J. (2004). Perfect Shuffles Through Dynamical Systems. Mathematics Magazine, 77.

21 ~ END ~

COMBINATORICS AND CARD SHUFFLING

COMBINATORICS AND CARD SHUFFLING COMBINATORICS AND CARD SHUFFLING Sami Assaf University of Southern California in collaboration with Persi Diaconis K. Soundararajan Stanford University Stanford University University of Cape Town 11 May

More information

Riffle shuffles of a deck with repeated cards

Riffle shuffles of a deck with repeated cards FPSAC 2009 DMTCS proc. subm., by the authors, 1 12 Riffle shuffles of a deck with repeated cards Sami Assaf 1 and Persi Diaconis 2 and K. Soundararajan 3 1 Department of Mathematics, Massachusetts Institute

More information

The mathematics of the flip and horseshoe shuffles

The mathematics of the flip and horseshoe shuffles The mathematics of the flip and horseshoe shuffles Steve Butler Persi Diaconis Ron Graham Abstract We consider new types of perfect shuffles wherein a deck is split in half, one half of the deck is reversed,

More information

The mathematics of the flip and horseshoe shuffles

The mathematics of the flip and horseshoe shuffles The mathematics of the flip and horseshoe shuffles Steve Butler Persi Diaconis Ron Graham Abstract We consider new types of perfect shuffles wherein a deck is split in half, one half of the deck is reversed,

More information

EE 126 Fall 2006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO

EE 126 Fall 2006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO EE 16 Fall 006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO You have 90 minutes to complete the quiz. Write your solutions in the exam booklet. We will

More information

Week 6: Advance applications of the PIE. 17 and 19 of October, 2018

Week 6: Advance applications of the PIE. 17 and 19 of October, 2018 (1/22) MA284 : Discrete Mathematics Week 6: Advance applications of the PIE http://www.maths.nuigalway.ie/ niall/ma284 17 and 19 of October, 2018 1 Stars and bars 2 Non-negative integer inequalities 3

More information

MSI: Anatomy (of integers and permutations)

MSI: Anatomy (of integers and permutations) MSI: Anatomy (of integers and permutations) Andrew Granville (Université de Montréal) There have been two homicides An integer: There have been two homicides And a permutation anatomy [a-nat-o-my] noun

More information

STAT Statistics I Midterm Exam One. Good Luck!

STAT Statistics I Midterm Exam One. Good Luck! STAT 515 - Statistics I Midterm Exam One Name: Instruction: You can use a calculator that has no connection to the Internet. Books, notes, cellphones, and computers are NOT allowed in the test. There are

More information

Assignment 2. Due: Monday Oct. 15, :59pm

Assignment 2. Due: Monday Oct. 15, :59pm Introduction To Discrete Math Due: Monday Oct. 15, 2012. 11:59pm Assignment 2 Instructor: Mohamed Omar Math 6a For all problems on assignments, you are allowed to use the textbook, class notes, and other

More information

Lecture 13: Physical Randomness and the Local Uniformity Principle

Lecture 13: Physical Randomness and the Local Uniformity Principle Lecture 13: Physical Randomness and the Local Uniformity Principle David Aldous October 17, 2017 Where does chance comes from? In many of our lectures it s just uncertainty about the future. Of course

More information

Notes On Card Shuffling

Notes On Card Shuffling Notes On Card Shuffling Nathanaël Berestycki March 1, 2007 Take a deck of n = 52 cards and shuffle it. It is intuitive that if you shuffle your deck sufficiently many times, the deck will be in an approximately

More information

November 6, Chapter 8: Probability: The Mathematics of Chance

November 6, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 6, 2013 Last Time Crystallographic notation Groups Crystallographic notation The first symbol is always a p, which indicates that the pattern

More information

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC)

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC) 2. Combinatorics: the systematic study of counting The Basic Principle of Counting (BPC) Suppose r experiments will be performed. The 1st has n 1 possible outcomes, for each of these outcomes there are

More information

Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236 Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet

More information

Mathematics Competition Practice Session 6. Hagerstown Community College: STEM Club November 20, :00 pm - 1:00 pm STC-170

Mathematics Competition Practice Session 6. Hagerstown Community College: STEM Club November 20, :00 pm - 1:00 pm STC-170 2015-2016 Mathematics Competition Practice Session 6 Hagerstown Community College: STEM Club November 20, 2015 12:00 pm - 1:00 pm STC-170 1 Warm-Up (2006 AMC 10B No. 17): Bob and Alice each have a bag

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 ECS 20 (Spring 2013) Phillip Rogaway Lecture 1 Today: Introductory comments Some example problems Announcements course information sheet online (from my personal homepage: Rogaway ) first HW due Wednesday

More information

An Analytical Study in Connectivity of Neighborhoods for Single Round Robin Tournaments

An Analytical Study in Connectivity of Neighborhoods for Single Round Robin Tournaments http://dx.doi.org/10.187/ics.01.001 Creative Commons License Computing Society 1th INFORMS Computing Society Conference Richmond, Virginia, January 11 1, 01 pp. 188 199 This work is licensed under a Creative

More information

Think Of A Number. Page 1 of 10

Think Of A Number. Page 1 of 10 Think Of A Number Tell your audience to think of a number (and remember it) Then tell them to double it. Next tell them to add 6. Then tell them to double this answer. Next tell them to add 4. Then tell

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following: CS 70 Discrete Mathematics for CS Fall 2004 Rao Lecture 14 Introduction to Probability The next several lectures will be concerned with probability theory. We will aim to make sense of statements such

More information

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13 CS 70 Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13 Introduction to Discrete Probability In the last note we considered the probabilistic experiment where we flipped a

More information

PHYSICS 140A : STATISTICAL PHYSICS HW ASSIGNMENT #1 SOLUTIONS

PHYSICS 140A : STATISTICAL PHYSICS HW ASSIGNMENT #1 SOLUTIONS PHYSICS 40A : STATISTICAL PHYSICS HW ASSIGNMENT # SOLUTIONS () The information entropy of a distribution {p n } is defined as S n p n log 2 p n, where n ranges over all possible configurations of a given

More information

BMT 2018 Combinatorics Test Solutions March 18, 2018

BMT 2018 Combinatorics Test Solutions March 18, 2018 . Bob has 3 different fountain pens and different ink colors. How many ways can he fill his fountain pens with ink if he can only put one ink in each pen? Answer: 0 Solution: He has options to fill his

More information

6.041/6.431 Spring 2009 Quiz 1 Wednesday, March 11, 7:30-9:30 PM.

6.041/6.431 Spring 2009 Quiz 1 Wednesday, March 11, 7:30-9:30 PM. 6.04/6.43 Spring 09 Quiz Wednesday, March, 7:30-9:30 PM. Name: Recitation Instructor: TA: Question Part Score Out of 0 3 all 40 2 a 5 b 5 c 6 d 6 3 a 5 b 6 c 6 d 6 e 6 f 6 g 0 6.04 Total 00 6.43 Total

More information

Solutions for the Practice Final

Solutions for the Practice Final Solutions for the Practice Final 1. Ian and Nai play the game of todo, where at each stage one of them flips a coin and then rolls a die. The person who played gets as many points as the number rolled

More information

50 Counting Questions

50 Counting Questions 50 Counting Questions Prob-Stats (Math 3350) Fall 2012 Formulas and Notation Permutations: P (n, k) = n!, the number of ordered ways to permute n objects into (n k)! k bins. Combinations: ( ) n k = n!,

More information

Combinatorics. Chapter Permutations. Counting Problems

Combinatorics. Chapter Permutations. Counting Problems Chapter 3 Combinatorics 3.1 Permutations Many problems in probability theory require that we count the number of ways that a particular event can occur. For this, we study the topics of permutations and

More information

Problem Set 2. Counting

Problem Set 2. Counting Problem Set 2. Counting 1. (Blitzstein: 1, Q3 Fred is planning to go out to dinner each night of a certain week, Monday through Friday, with each dinner being at one of his favorite ten restaurants. i

More information

Week 3 Classical Probability, Part I

Week 3 Classical Probability, Part I Week 3 Classical Probability, Part I Week 3 Objectives Proper understanding of common statistical practices such as confidence intervals and hypothesis testing requires some familiarity with probability

More information

Chapter 1 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal.

Chapter 1 out of 37 from Discrete Mathematics for Neophytes: Number Theory, Probability, Algorithms, and Other Stuff by J. M. Cargal. 1 Relations This book starts with one of its most abstract topics, so don't let the abstract nature deter you. Relations are quite simple but like virtually all simple mathematical concepts they have their

More information

Chapter 2 Integers. Math 20 Activity Packet Page 1

Chapter 2 Integers. Math 20 Activity Packet Page 1 Chapter 2 Integers Contents Chapter 2 Integers... 1 Introduction to Integers... 3 Adding Integers with Context... 5 Adding Integers Practice Game... 7 Subtracting Integers with Context... 9 Mixed Addition

More information

Mathematical Magic Tricks

Mathematical Magic Tricks Mathematical Magic Tricks T. Christine Stevens, American Mathematical Society Project NExT workshop, Chicago, Illinois, 7/25/17 Here are some magic tricks that I have used with students

More information

CIS 2033 Lecture 6, Spring 2017

CIS 2033 Lecture 6, Spring 2017 CIS 2033 Lecture 6, Spring 2017 Instructor: David Dobor February 2, 2017 In this lecture, we introduce the basic principle of counting, use it to count subsets, permutations, combinations, and partitions,

More information

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count 18.440: Lecture 1 Permutations and combinations, Pascal s triangle, learning to count Scott Sheffield MIT 1 Outline Remark, just for fun Permutations Counting tricks Binomial coefficients Problems 2 Outline

More information

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Honors Precalculus Chapter 9 Summary Basic Combinatorics Honors Precalculus Chapter 9 Summary Basic Combinatorics A. Factorial: n! means 0! = Why? B. Counting principle: 1. How many different ways can a license plate be formed a) if 7 letters are used and each

More information

Lecture 18 - Counting

Lecture 18 - Counting Lecture 18 - Counting 6.0 - April, 003 One of the most common mathematical problems in computer science is counting the number of elements in a set. This is often the core difficulty in determining a program

More information

Heads Up! A c t i v i t y 5. The Problem. Name Date

Heads Up! A c t i v i t y 5. The Problem. Name Date . Name Date A c t i v i t y 5 Heads Up! In this activity, you will study some important concepts in a branch of mathematics known as probability. You are using probability when you say things like: It

More information

Today s Topics. Next week: Conditional Probability

Today s Topics. Next week: Conditional Probability Today s Topics 2 Last time: Combinations Permutations Group Assignment TODAY: Probability! Sample Spaces and Event Spaces Axioms of Probability Lots of Examples Next week: Conditional Probability Sets

More information

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability Preliminary Concepts, Formulas, and Terminology Meanings of Basic Arithmetic Operations in Mathematics Addition: Generally

More information

1 of 5 7/16/2009 6:57 AM Virtual Laboratories > 13. Games of Chance > 1 2 3 4 5 6 7 8 9 10 11 3. Simple Dice Games In this section, we will analyze several simple games played with dice--poker dice, chuck-a-luck,

More information

The Mathematics of the Flip and Horseshoe Shuffles

The Mathematics of the Flip and Horseshoe Shuffles The Mathematics of the Flip and Horseshoe Shuffles Steve Butler, Persi Diaconis, and Ron Graham Abstract. We consider new types of perfect shuffles wherein a deck is split in half, one half of the deck

More information

Mark Kozek. December 7, 2010

Mark Kozek. December 7, 2010 : in : Whittier College December 7, 2010 About. : in Hungarian mathematician, 1913-1996. Interested in combinatorics, graph theory, number theory, classical analysis, approximation theory, set theory,

More information

The Kruskal Principle

The Kruskal Principle The Kruskal Principle Yutaka Nishiyama Department of Business Information, Faculty of Information Management, Osaka University of Economics, 2, Osumi Higashiyodogawa Osaka, 533-8533, Japan nishiyama@osaka-ue.ac.jp

More information

Modular Arithmetic. Kieran Cooney - February 18, 2016

Modular Arithmetic. Kieran Cooney - February 18, 2016 Modular Arithmetic Kieran Cooney - kieran.cooney@hotmail.com February 18, 2016 Sums and products in modular arithmetic Almost all of elementary number theory follows from one very basic theorem: Theorem.

More information

1. The chance of getting a flush in a 5-card poker hand is about 2 in 1000.

1. The chance of getting a flush in a 5-card poker hand is about 2 in 1000. CS 70 Discrete Mathematics for CS Spring 2008 David Wagner Note 15 Introduction to Discrete Probability Probability theory has its origins in gambling analyzing card games, dice, roulette wheels. Today

More information

Combinatorics and probability

Combinatorics and probability Department of Mathematics Ma 3/03 KC Border Introduction to Probability and Statistics Winter 209 Lecture 3: Combinatorics and probability Relevant textbook passages: Pitman [8]: Sections.5.6, pp. 7 77;

More information

Combinatorics. PIE and Binomial Coefficients. Misha Lavrov. ARML Practice 10/20/2013

Combinatorics. PIE and Binomial Coefficients. Misha Lavrov. ARML Practice 10/20/2013 Combinatorics PIE and Binomial Coefficients Misha Lavrov ARML Practice 10/20/2013 Warm-up Po-Shen Loh, 2013. If the letters of the word DOCUMENT are randomly rearranged, what is the probability that all

More information

23 Applications of Probability to Combinatorics

23 Applications of Probability to Combinatorics November 17, 2017 23 Applications of Probability to Combinatorics William T. Trotter trotter@math.gatech.edu Foreword Disclaimer Many of our examples will deal with games of chance and the notion of gambling.

More information

Week 1: Probability models and counting

Week 1: Probability models and counting Week 1: Probability models and counting Part 1: Probability model Probability theory is the mathematical toolbox to describe phenomena or experiments where randomness occur. To have a probability model

More information

Problem A: Ordering supermarket queues

Problem A: Ordering supermarket queues Problem A: Ordering supermarket queues UCL Algorithm Contest Round 2-2014 A big supermarket chain has received several complaints from their customers saying that the waiting time in queues is too long.

More information

Shuffling with ordered cards

Shuffling with ordered cards Shuffling with ordered cards Steve Butler (joint work with Ron Graham) Department of Mathematics University of California Los Angeles www.math.ucla.edu/~butler Combinatorics, Groups, Algorithms and Complexity

More information

Discrete probability and the laws of chance

Discrete probability and the laws of chance Chapter 8 Discrete probability and the laws of chance 8.1 Multiple Events and Combined Probabilities 1 Determine the probability of each of the following events assuming that the die has equal probability

More information

Grade: 3 Lesson Title: Equivalent Fractions

Grade: 3 Lesson Title: Equivalent Fractions Targeted Content Standard(s): Grade: 3 Lesson Title: Equivalent Fractions 3.NF.3 Explain equivalence of fractions in special cases and compare fractions by reasoning about their size. a. Understand two

More information

FALL 2015 STA 2023 INTRODUCTORY STATISTICS-1 PROJECT INSTRUCTOR: VENKATESWARA RAO MUDUNURU

FALL 2015 STA 2023 INTRODUCTORY STATISTICS-1 PROJECT INSTRUCTOR: VENKATESWARA RAO MUDUNURU 1 IMPORTANT: FALL 2015 STA 2023 INTRODUCTORY STATISTICS-1 PROJECT INSTRUCTOR: VENKATESWARA RAO MUDUNURU EMAIL: VMUDUNUR@MAIL.USF.EDU You should submit the answers for this project in the link provided

More information

CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID:

CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID: CS Discrete Mathematical Structure Midterm Exam Solution Tuesday, April 17, 007 1:0 1:4 pm Last Name: First Name: Student ID: Problem No. Points Score 1 10 10 10 4 1 10 6 10 7 1 Total 80 1 This is a closed

More information

Fermat s little theorem. RSA.

Fermat s little theorem. RSA. .. Computing large numbers modulo n (a) In modulo arithmetic, you can always reduce a large number to its remainder a a rem n (mod n). (b) Addition, subtraction, and multiplication preserve congruence:

More information

CS 237 Fall 2018, Homework SOLUTION

CS 237 Fall 2018, Homework SOLUTION 0//08 hw03.solution.lenka CS 37 Fall 08, Homework 03 -- SOLUTION Due date: PDF file due Thursday September 7th @ :59PM (0% off if up to 4 hours late) in GradeScope General Instructions Please complete

More information

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall CMath 55 PROFESSOR KENNETH A. RIBET Final Examination May 11, 015 11:30AM :30PM, 100 Lewis Hall Please put away all books, calculators, cell phones and other devices. You may consult a single two-sided

More information

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following: CS 70 Discrete Mathematics for CS Spring 2006 Vazirani Lecture 17 Introduction to Probability The topic for the third and final major portion of the course is Probability. We will aim to make sense of

More information

Sample pages. Multiples, factors and divisibility. Recall 2. Student Book

Sample pages. Multiples, factors and divisibility. Recall 2. Student Book 52 Recall 2 Prepare for this chapter by attempting the following questions. If you have difficulty with a question, go to Pearson Places and download the Recall from Pearson Reader. Copy and complete these

More information

Combinatorics in the group of parity alternating permutations

Combinatorics in the group of parity alternating permutations Combinatorics in the group of parity alternating permutations Shinji Tanimoto (tanimoto@cc.kochi-wu.ac.jp) arxiv:081.1839v1 [math.co] 10 Dec 008 Department of Mathematics, Kochi Joshi University, Kochi

More information

Principle of Inclusion-Exclusion Notes

Principle of Inclusion-Exclusion Notes Principle of Inclusion-Exclusion Notes The Principle of Inclusion-Exclusion (often abbreviated PIE is the following general formula used for finding the cardinality of a union of finite sets. Theorem 0.1.

More information

COUNTING TECHNIQUES. Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen

COUNTING TECHNIQUES. Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen COUNTING TECHNIQUES Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen COMBINATORICS the study of arrangements of objects, is an important part of discrete mathematics. Counting Introduction

More information

Introductory Probability

Introductory Probability Introductory Probability Combinations Nicholas Nguyen nicholas.nguyen@uky.edu Department of Mathematics UK Agenda Assigning Objects to Identical Positions Denitions Committee Card Hands Coin Toss Counts

More information

Grade 6/7/8 Math Circles April 1/2, Modular Arithmetic

Grade 6/7/8 Math Circles April 1/2, Modular Arithmetic Faculty of Mathematics Waterloo, Ontario N2L 3G1 Modular Arithmetic Centre for Education in Mathematics and Computing Grade 6/7/8 Math Circles April 1/2, 2014 Modular Arithmetic Modular arithmetic deals

More information

November 8, Chapter 8: Probability: The Mathematics of Chance

November 8, Chapter 8: Probability: The Mathematics of Chance Chapter 8: Probability: The Mathematics of Chance November 8, 2013 Last Time Probability Models and Rules Discrete Probability Models Equally Likely Outcomes Crystallographic notation The first symbol

More information

Teaching the TERNARY BASE

Teaching the TERNARY BASE Features Teaching the TERNARY BASE Using a Card Trick SUHAS SAHA Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke, Profiles of the Future: An Inquiry Into the Limits

More information

MATH 135 Algebra, Solutions to Assignment 7

MATH 135 Algebra, Solutions to Assignment 7 MATH 135 Algebra, Solutions to Assignment 7 1: (a Find the smallest non-negative integer x such that x 41 (mod 9. Solution: The smallest such x is the remainder when 41 is divided by 9. We have 41 = 9

More information

Name Class Date. Introducing Probability Distributions

Name Class Date. Introducing Probability Distributions Name Class Date Binomial Distributions Extension: Distributions Essential question: What is a probability distribution and how is it displayed? 8-6 CC.9 2.S.MD.5(+) ENGAGE Introducing Distributions Video

More information

arxiv: v1 [math.co] 8 Oct 2012

arxiv: v1 [math.co] 8 Oct 2012 Flashcard games Joel Brewster Lewis and Nan Li November 9, 2018 arxiv:1210.2419v1 [math.co] 8 Oct 2012 Abstract We study a certain family of discrete dynamical processes introduced by Novikoff, Kleinberg

More information

The number theory behind cryptography

The number theory behind cryptography The University of Vermont May 16, 2017 What is cryptography? Cryptography is the practice and study of techniques for secure communication in the presence of adverse third parties. What is cryptography?

More information

I.M.O. Winter Training Camp 2008: Invariants and Monovariants

I.M.O. Winter Training Camp 2008: Invariants and Monovariants I.M.. Winter Training Camp 2008: Invariants and Monovariants n math contests, you will often find yourself trying to analyze a process of some sort. For example, consider the following two problems. Sample

More information

Counting & Basic probabilities. Stat 430 Heike Hofmann

Counting & Basic probabilities. Stat 430 Heike Hofmann Counting & Basic probabilities Stat 430 Heike Hofmann 1 Outline Combinatorics (Counting rules) Conditional probability Bayes rule 2 Combinatorics 3 Summation Principle Alternative Choices Start n1 ways

More information

Compound Probability. Set Theory. Basic Definitions

Compound Probability. Set Theory. Basic Definitions Compound Probability Set Theory A probability measure P is a function that maps subsets of the state space Ω to numbers in the interval [0, 1]. In order to study these functions, we need to know some basic

More information

Grade 7/8 Math Circles February 9-10, Modular Arithmetic

Grade 7/8 Math Circles February 9-10, Modular Arithmetic Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing Grade 7/8 Math Circles February 9-, 26 Modular Arithmetic Introduction: The 2-hour Clock Question: If it

More information

ABE/ASE Standards Mathematics

ABE/ASE Standards Mathematics [Lesson Title] TEACHER NAME PROGRAM NAME Program Information Playing the Odds [Unit Title] Data Analysis and Probability NRS EFL(s) 3 4 TIME FRAME 240 minutes (double lesson) ABE/ASE Standards Mathematics

More information

Combinatorics and Intuitive Probability

Combinatorics and Intuitive Probability Chapter Combinatorics and Intuitive Probability The simplest probabilistic scenario is perhaps one where the set of possible outcomes is finite and these outcomes are all equally likely. A subset of the

More information

CPCS 222 Discrete Structures I Counting

CPCS 222 Discrete Structures I Counting King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222 Discrete Structures I Counting Dr. Eng. Farag Elnagahy farahelnagahy@hotmail.com Office Phone: 67967 The Basics of counting

More information

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6 CS100: DISCRETE STRUCTURES Lecture 8 Counting - CH6 Lecture Overview 2 6.1 The Basics of Counting: THE PRODUCT RULE THE SUM RULE THE SUBTRACTION RULE THE DIVISION RULE 6.2 The Pigeonhole Principle. 6.3

More information

Riffle shuffles with biased cuts

Riffle shuffles with biased cuts FPSAC 2012, Nagoya, Japan DMTCS proc. (subm.), by the authors, 1 12 Riffle shuffles with biased cuts Sami Assaf 1 and Persi Diaconis 2 and Kannan Soundararajan 3 1 Berkeley Quantitative, 140 Sherman St,

More information

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman: Math 22 Fall 2017 Homework 2 Drew Armstrong Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman: Section 1.2, Exercises 5, 7, 13, 16. Section 1.3, Exercises,

More information

Lecture 4: Wireless Physical Layer: Channel Coding. Mythili Vutukuru CS 653 Spring 2014 Jan 16, Thursday

Lecture 4: Wireless Physical Layer: Channel Coding. Mythili Vutukuru CS 653 Spring 2014 Jan 16, Thursday Lecture 4: Wireless Physical Layer: Channel Coding Mythili Vutukuru CS 653 Spring 2014 Jan 16, Thursday Channel Coding Modulated waveforms disrupted by signal propagation through wireless channel leads

More information

Chapter 1. Mathematics in the Air

Chapter 1. Mathematics in the Air Chapter 1 Mathematics in the Air Most mathematical tricks make for poor magic and in fact have very little mathematics in them. The phrase mathematical card trick conjures up visions of endless dealing

More information

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability The study of probability is concerned with the likelihood of events occurring Like combinatorics, the origins of probability theory can be traced back to the study of gambling games Still a popular branch

More information

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

EECS 203 Spring 2016 Lecture 15 Page 1 of 6 EECS 203 Spring 2016 Lecture 15 Page 1 of 6 Counting We ve been working on counting for the last two lectures. We re going to continue on counting and probability for about 1.5 more lectures (including

More information

Probability. March 06, J. Boulton MDM 4U1. P(A) = n(a) n(s) Introductory Probability

Probability. March 06, J. Boulton MDM 4U1. P(A) = n(a) n(s) Introductory Probability Most people think they understand odds and probability. Do you? Decision 1: Pick a card Decision 2: Switch or don't Outcomes: Make a tree diagram Do you think you understand probability? Probability Write

More information

18.204: CHIP FIRING GAMES

18.204: CHIP FIRING GAMES 18.204: CHIP FIRING GAMES ANNE KELLEY Abstract. Chip firing is a one-player game where piles start with an initial number of chips and any pile with at least two chips can send one chip to the piles on

More information

ANALYSIS OF CASINO SHELF SHUFFLING MACHINES

ANALYSIS OF CASINO SHELF SHUFFLING MACHINES ANALYSIS OF CASINO SHELF SHUFFLING MACHINES PERSI DIACONIS, JASON FULMAN, AND SUSAN HOLMES Abstract Many casinos routinely use mechanical card shuffling machines We were asked to evaluate a new product,

More information

Discrete Structures for Computer Science

Discrete Structures for Computer Science Discrete Structures for Computer Science William Garrison bill@cs.pitt.edu 6311 Sennott Square Lecture #23: Discrete Probability Based on materials developed by Dr. Adam Lee The study of probability is

More information

Turbo coding (CH 16)

Turbo coding (CH 16) Turbo coding (CH 16) Parallel concatenated codes Distance properties Not exceptionally high minimum distance But few codewords of low weight Trellis complexity Usually extremely high trellis complexity

More information

With Question/Answer Animations. Chapter 6

With Question/Answer Animations. Chapter 6 With Question/Answer Animations Chapter 6 Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients and Identities Generalized Permutations and

More information

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions)

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions) CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions Review: Main Theorems and Concepts Combinations (number of ways to choose k objects out of n distinct objects,

More information

How to Become a Mathemagician: Mental Calculations and Math Magic

How to Become a Mathemagician: Mental Calculations and Math Magic How to Become a Mathemagician: Mental Calculations and Math Magic Adam Gleitman (amgleit@mit.edu) Splash 2012 A mathematician is a conjurer who gives away his secrets. John H. Conway This document describes

More information

ORDER AND CHAOS. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA

ORDER AND CHAOS. Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA ORDER AND CHAOS Carl Pomerance, Dartmouth College Hanover, New Hampshire, USA Perfect shuffles Suppose you take a deck of 52 cards, cut it in half, and perfectly shuffle it (with the bottom card staying

More information

Mind Explorer. -Community Resources for Science

Mind Explorer. -Community Resources for Science Thank you for downloading the science and mathematics activity packet! Below you will find a list of contents with a brief description of each of the items. This activity packet contains all the information

More information

Cards. There are many possibilities that arise with a deck of cards. S. Brent Morris

Cards. There are many possibilities that arise with a deck of cards. S. Brent Morris Cripe 1 Aaron Cripe Professor Rich Discrete Math 25 April 2005 Cards There are many possibilities that arise with a deck of cards. S. Brent Morris emphasizes a few of those possibilities in his book Magic

More information

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand. Midterm #: practice MATH Intro to Number Theory midterm: Thursday, Nov 7 Please print your name: Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating

More information

AN INTRODUCTION TO ERROR CORRECTING CODES Part 2

AN INTRODUCTION TO ERROR CORRECTING CODES Part 2 AN INTRODUCTION TO ERROR CORRECTING CODES Part Jack Keil Wolf ECE 54 C Spring BINARY CONVOLUTIONAL CODES A binary convolutional code is a set of infinite length binary sequences which satisfy a certain

More information

relates to Racko and the rules of the game.

relates to Racko and the rules of the game. Racko! Carrie Franks, Amanda Geddes, Chris Carter, and Ruby Garza Our group project is the modeling of the card game Racko. The members in the group are: Carrie Franks, Amanda Geddes, Chris Carter, and

More information