Carries, Shuffling, and an Amazing Matrix Author(S): Persi Diaconis and Jason Fulman Source: the American Mathematical Monthly, Vol

Carries, Shuffling, and an Amazing Matrix Author(S): Persi Diaconis and Jason Fulman Source: the American Mathematical Monthly, Vol

Carries, Shuffling, and an Amazing Matrix Author(s): Persi Diaconis and Jason Fulman Source: The American Mathematical Monthly, Vol. 116, No. 9 (Nov., 2009), pp. 788-803 Published by: Mathematical Association of America Stable URL: http://www.jstor.org/stable/40391298 . Accessed: 19/10/2011 15:21 Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at . http://www.jstor.org/page/info/about/policies/terms.jsp JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about JSTOR, please contact [email protected]. Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to The American Mathematical Monthly. http://www.jstor.org Carries,Shuffling, and an AmazingMatrix PersiDiaconis and JasonFulman 1. INTRODUCTION. In a wonderfularticle in this Monthly, JohnHolte [22] foundfascinating mathematics in the usual process of "carries"when addinginte- gers.His articlereminded us of themathematics of shufflingcards. This connectionis developedbelow. Consideradding two 40-digit binary numbers (the top row,in italics,comprises the carries): i oiiio oiooo ooooi 00111win ooooo00111 ino 10111 00110 00000 10011 11011 10001 00011 11010 10011 10101 11110 10001 01000 11010 11001 01111 1 01010 11011 11111 00101 00100 01011 11101 01001 For thisexample, 19/40 = 47.5% of thecolumns have a carryof 1. Holte showsthat if thebinary digits are chosen at random,uniformly, in the limit50% of all thecar- ries are zero. This holds no matterwhat the base. More generally,if one adds n in- tegers(base b) thatare producedby choosingtheir digits uniformly at randomin {0, 1, . , b - 1}, the sequence of carriesk0 = 0, k', k2,. is a Markovchain tak- ing values in {0, 1, 2, . , n - 1}. The Markovproperty holds because to computethe amountcarried to thenext column, one onlyneeds to knowthe carry and numbersin thecurrent column: the past does notmatter. We let P(i, j) - F(k' - j | k = i) de- notean entryof thetransition matrix between successive carries k and k' . Holtefound thefollowing: (HI) ForO <i,j <n- 1, For example,for n = 2 and all b, (P(l'j)) = 2b{b-l b + l)' and forn = 3 and all b, . /b2 + 3b + 2 Ab2-A b2-2,b + 2' (P(i, j)) = -A b2-' Ab2+ 2 b2-' bb '. 'b2-3b + 2 Ab2-A b2 + 3b + 2j In the special case whenb - 2, forany n, Holte derivesthe simplerex- pression doi:10.4169/000298909X474864 788 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 116 The matricesof (HI) are the"amazing matrices" of Holte's title,and we also denote themby Pb. Amongmany things, Holte shows: (H2) The matrixPb has stationaryvector n (lefteigenvector with eigenvalue 1) independentof thebase b: whereA(n, j) is an Euleriannumber. The n' in thedenominator is to make theentries of theleft eigenvector sum to 1. The Euleriannumber A(n, j) maybe definedas thenumber of permutationsin the symmetricgroup Sn withj descents.Recall thato e Sn has a descentat positioni if a (i + 1) < cr(i). So 5 1 324 has two descents.Note thatwe writepermutations as sequences,where the fth number in thesequence denotes a(i). Whenn = 2, A(2, 0) = A(2, 1) = 1, and thustt(O) = tt(1) = 1/2 is the limiting frequencyof carrieswhen two long integersare added. When n = 3, A (3, 0) = 1, A(3, 1) = 4, and A(3, 2) = 1, givingtt(O) = 1/6,n(') = 2/3, and tt(2) = 1/6. We mentionthat Eulerian numbers make many mathematical appearances, e.g., in thetheory of sorting[26] and in jugglingsequences [10]. For furtherbackground on theirproperties, the reader can consult[12]. Holte furtherestablishes the remarkable: (H3) The matrixPb has eigenvalues1, l/b, l/è2, . , l/bn~{ withexplicitly com- putableleft and righteigenvectors independent of b. (H4) PaPb = Pabfor all reala and b. Whenwe saw properties(H2), (H3), and (H4), we hollered"Wait, this is all about shufflingcards!" Readerswho knowus may well think,"For thesetwo guys,every- thingis aboutshuffling cards." While thereis some truthto thesethoughts, we justify ourclaim in thenext section. Following this we showhow theconnection between car- ries and shufflingcontributes to each subject.The rateof convergenceof theMarkov chain(HI) to thestationary distribution n is givenin Section4: theargument shows thatthe matrix Pb is totallypositive of order2. Finally,we showhow thesame matrix occursin takingsections of generatingfunctions [9], discusscarries for multiplication, and describeanother "amazing matrix." Our developmentsdo notexhaust the material in Holte's article,which we enthu- siasticallyrecommend. A "highermath" perspective on arithmeticcarries as cocycles [23] suggestsmany further projects. We havetried to keepthe presentation elementary, and mentionthe (more technical)companion paper [15] whichanalyzes the carries chainusing symmetric function theory and givesanalogs of ourmain results for other Coxetergroups. 2. SHUFFLING CARDS. How manytimes should a deck of n cardsbe riffleshuf- fledto thoroughlymix it? For an introductionto thissubject, see [2, 27]. The main theoreticaldevelopments are in [5, 16] withfurther developments in [18, 19]. A survey of themany connections and developmentsis in [14]. The basic shufflingmechanism was suggestedby [20]. It givesa realisticmathematical model for the usual methodof riffleshuffling n cards: • Cut offC cardswith probability (nc)/2n, 0<C<n. • Shufflethe two partsof the deck accordingto the followingrule: if at some stage thereare A cardsin one partand B cardsin theother part, drop the next card from November2009] carries, shuffling,and an amazing matrix 789 thebottom of thefirst part with probability A/(A + B) and fromthe bottom of the secondpart with probability B/(A + B). • Continueuntil all cardsare dropped. Let Q(cr) be theprobability of generatingthe permutation a afterone shuffle,starting fromthe identity, and let Qh(a) denotethe corresponding quantity after h successive shuffles.Repeated shuffling is modeledby convolution: V ri Thus to be at a aftertwo shuffles,the first shuffle goes to some permutationr] and the second mustbe to arfx , The uniformdistribution is U (a) = '/n'. Standardtheory showsthat ßV) -> U(cr) as/*-*oo. (2) The reference[5] gives usefulrates for the convergence in (2), showingthat for h = (3/2) log2n + c withc fixed, 'Y lßV)-tf(oO|-> '-2<b(^±' withO(;t) = -L í éT'2/2dr 2y V 4V3 / v2tt J-oo as n -> oo. Roughlystated, it takes/* = (3/2) log2n + c shufflesto get 2~c close to random;when n = 52 and /z= 7, theabove distanceto uniformis about0.3 and tends to zero exponentiallythereafter. To explainthe connection with carries, it is usefulto have a geometricdescription of shuffling.Consider dropping n pointsuniformly at randominto [0, 1). Label these pointsin orderx(i) < x{2)• • • < x{n).The baker'stransformation x h> 2x mod 1 maps [0, 1) intoitself and permutesthe points. Let a be theinduced permutation. As shown in [5], the chance of o is exactly Q(cr). A naturalgeneralization of this shuffling schemeto "è-shuffles"is inducedfrom x h->bx mod 1 withb fixedin {1, 2, 3, . }. Thus ordinaryriffle shuffles are 2-shufflesand a 3-shuffleresults from dividing the deck into threepiles and droppingcards sequentiallyfrom the bottomof each pile withprobability proportional to packetsize. Let Qbip) be the probabilityof o aftera è-shuffle.Letting * be the convolution operatorused in equation(1), one can show [5] fromthe geometric description that Qa * Qb = Qab- (3) The keyis to checkthat the points ax{') mod 1, ax{2) mod 1, ... , ax{n)mod 1 have the same distributionas n uniformpoints in [0, 1), so the¿?-shuffle can be appliedto these pointswithout having to repositionthem at randomin [0, 1). Then (3) followssince b(aX(i) mod 1) mod 1 = abx^ mod 1. The physicalmodel of shufflingdescribed at the startof thissection is Q2 in this notationand we see thatQ' = Q2h. Thus to studyrepeated shuffles, we need only understanda singleè-shuffle. A mainresult of [5] is a simpleformula: in+b-r' Qb{°) = ^±r~- (4) Here r = r(a) = 1 + #{descentsin a"1}. 790 © THE MATHEMATICALASSOCIATION OF AMERICA [Monthly1 16 In additionto the similaritiesbetween (H4) and (3), [5] and [21] provedthat the eigenvaluesof the Markovchain inducedby Qb are also 1, l/b, l/è2, . , '/bn~x (thoughhere l/è* occurswith multiplicity equal to thenumber of permutationsin Sn withn - i cyclesinstead of withmultiplicity 1). This and theappearance of descents convincedus thatthere must be an intimateconnection between carries and shuffling. The mainresult of thisarticle (proved in Section3) makesthis precise. Theorem2.1. The numberof descentsin successive b-shufflesof n cards formsa Markovchain on {0,1, ... , n - 1} withtransition matrix (P(i, j)) of (HI). 3. BIJECTIVE METHODS. Firstwe describesome notation to be used throughout. The numberof descentsof a permutationr is denotedby d(r). Label the columns of the n numbersto be added base b by Cu C2, C3, . , whereC' is the rightmost column. The mainpurpose of thissection is to give a bijectiveproof of thefollowing theo- rem,which implies Theorem 2.1. Theorem3.1. Let Kj denotethe amount carried from column j to columnj + 1 when n m-digit base-b numbersare added, and thedigits are chosen uniformlyand inde- - pendentlyfrom {0, 1, • • -, b 1}. Let r7 be thepermutation obtained after the first j stepsof a sequenceof m b-shufflesofn cards,started at theidentity. Then P(/d =!!,... ,^M=Iw)=P(d(T1) = !!,... ,d(Tm) = im) for all values ofi', . , im. In preparationfor the proofof Theorem3.1, some definitionsand lemmas are - needed.To begin,note that Kj is determinedby the last j columnsCj- C'. Given a length-^list of j -digitbase-& numbers, one says thatthe list has a carryat positioni if theaddition of the (i + l)st numberon thelist to thesum of thefirst i numberson thelist increasesthe amountthat would be carriedto the (j + l)st column(it might seem morenatural to say thatthe carry is at position/ + 1, butour conventionwill be useful).For examplethe following list of 3-digitbase-3 numbers: 0 1 2 0 1 2 1 1 2 1 1 1 2 1 2 1 2 1 has a carryat positions3 and 4.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    17 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us