You are an expert at summarizing long articles. Proceed to summarize the following text: 
any respectable list of desert island card games must include war to pass the time ( the expected length of a game is infinite , after all  @xcite ) . but to maintain your remembrance of things past , it s hard to beat the game of memory . memory is played with a deck of @xmath5 cards . the cards are numbered from @xmath6 up to @xmath0 , with each number appearing twice . the deck is shuffled and then the cards are laid face down in a tableau . a _ move _ consists of flipping first one card and then a second . if the cards match , both are removed from play and the current player moves again . otherwise , they are flipped back over and play passes to the next player . play ends when all pairs have been removed ; the player who has removed the most pairs is the winner . the _ length _ of a game is the total number of moves . perhaps surprisingly , strategy plays a role in the two - player version of the game  @xcite . in some situations it may not be to a player s advantage to acquire new information by flipping over a card that has not been flipped before . the reason is that her opponent also acquires the same information . in this exploration we consider the solitaire version of memory , in which strategy plays no part . many games , such as poker and go fish , do not fair well as one - person games . memory does , as long as one shifts the goal from collecting the largest number of pairs to collecting all pairs in the fewest moves . as an additional simplification , we assume that the player has perfect memory .    you may find it helpful to play a few games of solitaire memory on your own . you can use some subset of an ordinary deck of cards ; play online at a number of websites , such as @xcite or @xcite ; or , as of this writing , find a computer version on the wall at the airport ( at least in houston or minneapolis ) .    in the solitaire version of memory , acquiring information by flipping over an unknown card is always helpful . it is therefore not hard to show that an optimal strategy is to proceed as described in algorithm  [ alg : strategy ] . throughout this paper , we assume that the player is using this optimal strategy . we consider three questions regarding this one - person game of memory . +    flip them over and remove them flip over an unknown card flip the mate and remove both flip over another unknown card ( and remove the pair if you are lucky enough to find the mate )    * 1 . what is the expected length of a game ( i.e. , how many moves are required ) ? * + each card must be flipped over at least once . if it is not matched the first time it is flipped over , then it is flipped again , and removed , once the location of its mate is known . thus , each card is flipped either once or twice , and therefore the total number of card flips is between @xmath5 and @xmath7 . since two cards are flipped over on each move , this means that the number of moves in any game will be between @xmath0 and @xmath5 . analysis of the possibilities for the end of the game shows that the last card to be flipped over will only be flipped once , and therefore the length of the game can not be @xmath5 . therefore , the length lies between @xmath0 and @xmath8 . example  [ ex : extremal ] ( in section  [ sec : setup ] ) illustrates that both of these lengths are possible . , with logarithmic @xmath9-scale . on the right we use a linear @xmath9-scale and a restricted domain to highlight the fact that over @xmath10 of games for @xmath11 will have a length lying between @xmath12 and @xmath13.,title="fig : " ] , with logarithmic @xmath9-scale . on the right we use a linear @xmath9-scale and a restricted domain to highlight the fact that over @xmath10 of games for @xmath11 will have a length lying between @xmath12 and @xmath13.,title="fig : " ]    computer investigations indicate that the expected length of a game is roughly @xmath14 . in sections  [ sec : explen ] and [ sec : limsums ] we will determine the exact length , and show that it is approximately @xmath15 , with the error in this approximation approaching 0 as @xmath16 . figure  [ fig : dist - percentage ] shows the distribution of game lengths for @xmath11 . the expected length in this case is about 160.8589 , and our approximation gives about 160.8593 . a _ lucky _ move is one in which the player flips two cards that have not been flipped before and they happen to match . note that a game of length @xmath0 is one in which every move is lucky . the second question , to be addressed in section  [ sec : sumdleven ] , is : + * 2 . what is the expected number of lucky moves in a game ? * + early in the game , the player has little information about the locations of the various cards . in all likelihood , each card flipped over will be the first of its pair to be seen . but certainly by the @xmath17th flip , the player will begin encountering the mates of cards she has already seen . this brings us to our third and final question , to be addressed in section  [ sec : repeat ] : + * 3 . how many flips are required before the player should expect to have seen both cards of a pair ? * a game of memory is not affected by how the cards are physically laid out . in light of this , it will be convenient to assume that the cards are arranged in a single row . and since the cards are shuffled before they are laid out , when our strategy calls for the player to flip an unknown card , there is no advantage to flipping one particular unknown card in preference to another . we may therefore assume that unknown cards are simply flipped from left to right . with this convention , game play depends only on the order in which the cards are laid out . [ ex : n=6ex ] suppose that @xmath18 and the cards are laid out in the order @xmath19 play will proceed as follows :    1 . the player flips over the first two cards , which are a 1 and a 2 . since they do nt match , they are flipped back over . the player flips over the next card , which is another 1 . remembering that the first card was also a 1 , the player flips the first card to get the match and removes the two 1s . the player flips the next two cards , which are a 6 and a 2 . they do nt match , so they are flipped back . the player now knows the locations of both 2s . she therefore flips them and removes them . the player flips the next two cards , which are both 3s . they match , so she removes them . since these cards had not been flipped before , this is an example of a lucky move . the player flips the next two cards : a 5 and a 4 . they do nt match , so they are flipped back . the player flips the next card , which is the second 4 . remembering that the previous card was also a 4 , she flips it and removes the two 4s . the player flips the second 5 , flips the first 5 again , and removes the two 5s . the player flips the second 6 , flips the first 6 again , and removes the two 6s .    [ ex : extremal ] we can now give examples of the shortest and longest possible games . if the cards are laid out in the order @xmath20 then the game will consist of @xmath0 lucky moves ; this is the shortest possible game . it is only slightly harder to illustrate the longest possible game . we will let you verify that if the cards are laid out in the order @xmath21 then it will take @xmath8 moves to complete the game . although we have presented all of our examples by specifying the order in which the cards are laid out , in fact game play depends on only the relative positions of the pairs . these relative positions can be visualized using the notion of an _ interconnection network_. an interconnection network  @xcite consists of @xmath5 points along with @xmath0 endpoint - disjoint arcs that connect pairs of points . ( equivalently , such a network encodes an involution without fixed points . ) figure  [ fig : icnetwork ] illustrates two deals for @xmath18 along with the associated interconnection network , in which points labeled with the same number are connected by an arc . ( the first of these deals is the one in example  [ ex : n=6ex ] above . ) the two deals in figure [ fig : icnetwork ] differ only in the labels we have assigned to each pair of cards , and therefore the first deal leads to essentially the same game as the second . we wish to identify those games with the same underlying interconnection network . in general , there is an @xmath22-to-@xmath6 map from size-@xmath5 deals to size-@xmath5 interconnection networks . this map for @xmath23 is illustrated in figure  [ fig : icn - n2 ] . we prefer to remain in the realm of card games , so we designate a representative for each class of deals . we call a deal _ standard _ if , when the game is played , the pairs are removed in order from 1 to @xmath0 . put another way , a deal is standard if the second occurrence of @xmath24 occurs to the left of the second occurrence of @xmath25 for each @xmath24 between 1 and @xmath0 . the deals in examples  [ ex : n=6ex ] and  [ ex : extremal ] are all standard . let @xmath26 denote the set of standard permutations of the multiset @xmath27 . at this point , we have reduced a game of memory to an element of some @xmath26 . we write these elements in one - line notation ( reminiscent of an actual row of cards ) . for example , define @xmath28 by @xmath29 and @xmath30 . the element @xmath31 represents the game @xmath32 , in which the first and fourth cards are 2s and the second and third are 1s .    for completeness , we include a proof of the following formula for the number of inequivalent games of memory  that is , the cardinality of @xmath26 .    for @xmath33 , the number of standard games of memory on a deck of @xmath5 cards is @xmath34    the first equality involving the _ double factorial _ function is true by definition . the second equality can be checked by simple algebra . we prove by induction that the number of games is given by the above product of odd integers . for @xmath35 the formula is trivially true . now suppose that @xmath36 . any standard deal of a deck of size @xmath5 can be constructed by adding two copies of @xmath0 to a standard deal of a deck of size @xmath37 . in order for the augmented deal to be standard , the second occurrence of @xmath0 must be at the end of the row . thus , there are @xmath38 possible locations for the first occurrence of @xmath0 . the lemma therefore follows by the principle of mathematical induction . fix @xmath39 . for any @xmath40 , let @xmath41 denote the smallest index @xmath42 such that @xmath43 for some @xmath44 . in other words , @xmath41 is the position of the first card in @xmath31 that matches a previous card . since we are assuming that the deal is standard , this first matching card will be a 1 . let @xmath45 count the number of permutations @xmath46 for which @xmath47 . notice that @xmath41 is always between 2 and @xmath48 , so @xmath49 if @xmath50 or @xmath51 . then for a randomly chosen @xmath52 , the probability that @xmath53 is @xmath54 and therefore the expected value of @xmath41 is @xmath55    it turns out that there is a simple formula for the numerator of the last fraction :    [ lem : expnum ] for every positive integer @xmath0 , @xmath56    we proceed by induction on @xmath0 . the equation is easily seen to be correct when @xmath35 . now suppose that @xmath57 , and the equation holds for @xmath58 . a permutation @xmath40 with @xmath59 can be constructed from a permutation in @xmath60 in one of two ways . the first way is to start with a permutation @xmath61 with @xmath62 , insert an @xmath0 into @xmath63 somewhere after position @xmath42 , and then add a second @xmath0 at the end . the number of permutations that can be constructed in this way is @xmath64 . the second way is to start with a permutation @xmath65 with @xmath66 , insert an @xmath0 before position @xmath67 , and then add another @xmath0 at the end . this can be done in @xmath68 ways . thus , we have the recurrence @xmath69    we can now compute : @xmath70\\ & = \sum_{j=2}^{n+1 } j \cdot ( 2n-1-j ) \cdot a(n-1,j ) + \sum_{j=2}^{n+1 } j \cdot ( j-1 ) \cdot a(n-1,j-1)\\ & = \sum_{j=2}^{n+1 } j \cdot ( 2n-1-j ) \cdot a(n-1,j ) + \sum_{j=1}^n ( j+1 ) \cdot j \cdot a(n-1,j)\\ & = \sum_{j=2}^n 2nj \cdot a(n-1,j ) = 2n \cdot \sum_{j=2}^n j \cdot a(n-1,j)\\ & = 2n \cdot 2^{n-1 } ( n-1 ) ! \qquad\qquad \text{(by the inductive hypothesis)}\\ & = 2^n n!. \qedhere\end{aligned}\ ] ]    for @xmath33 , the expected position of the first match is @xmath71    using equation   and lemma  [ lem : expnum ] , we find that the expected position of the first match is @xmath72    the expected position of the first match grows as @xmath73 . straightforward applications of stirling s approximation @xmath74 ( see , for example ,  @xcite ) yield @xmath75 our main goal in this section is to prove the following theorem :    [ thm : main ] the expected length of a game with @xmath5 cards is @xmath76 , where @xmath77 . consider any standard deal @xmath40 . in the game based on @xmath31 , the player will turn over unknown cards two at a time until she comes to the first matching card at position @xmath41 . what happens at that point depends on whether @xmath41 is even or odd . if @xmath41 is odd , then the card at position @xmath41 , which is the second 1 , will be flipped over at the beginning of a move . since we are assuming that the player has perfect memory , she will then flip the first 1 and remove both 1s . the number of moves required to flip all the cards up to position @xmath41 and then remove the matching 1s is therefore @xmath78 . on the other hand , if @xmath41 is even then the card at position @xmath41 will be the second card flipped in a move . if the first card flipped in that move was also a 1 then the move is lucky and the two 1s are removed right away . if not , then it will take an additional move to flip the two 1s and remove them . thus , if @xmath41 is even then the number of moves to flip the first @xmath41 cards and remove the two 1s is either @xmath79 , if the first 1 is at position @xmath80 , or @xmath81 , if not . once the two 1s have been removed , the player continues by flipping the unknown card at position @xmath82 , and she again flips unknown cards two at a time until she reaches the next matching card , the second 2 . if the second 2 is at position @xmath83 , then as above the number of moves required to flip all of the cards from position @xmath82 to @xmath83 and remove the matching 2s is @xmath84 if @xmath85 is odd , @xmath86 if @xmath85 is even and the first 2 is at position @xmath87 , and @xmath88 otherwise . once the 2s have been removed , the player flips unknown cards two at a time until she finds the second 3 , and she continues in this way until all the pairs have been matched and removed . thus , we see that the second occurrences of each of the numbers from 1 to @xmath0 can be thought of as breaking the deal @xmath31 into @xmath0 blocks , with each block ending with a second occurrence . the function @xmath41 that we studied in the last section is the length of the first block , but we will have to consider the lengths of all of the blocks to determine the number of moves in the game . let the lengths of the blocks be @xmath89 , @xmath90 , , @xmath91 , and notice that since the entire deck contains @xmath5 cards , @xmath92 . we will call a block _ lucky _ if the block has length at least 2 and the last two cards in the block match . the analysis above shows that the number of moves required to flip all of the cards in the @xmath24th block and then remove the two cards labeled @xmath24 is @xmath93 , where @xmath94 is 1/2 if @xmath95 is odd , 0 if @xmath95 is even and the @xmath24th block is lucky , and 1 if @xmath95 is even and the @xmath24th block is not lucky . thus , if @xmath96 is the number of blocks in @xmath31 of even length and @xmath97 is the number of these even - length blocks that are lucky , then the length of the game is @xmath98    for example , if @xmath18 and @xmath31 is the deal given in example  [ ex : n=6ex ] , then the lengths of the blocks are 3 , 2 , 2 , 3 , 1 , 1 , and the third and fourth blocks are lucky . therefore @xmath99 and @xmath100 , and the length of the game is @xmath101 which is in agreement with our analysis of this game in example  [ ex : n=6ex ] .    to prove theorem  [ thm : main ] we will need to find the expected values of @xmath96 and @xmath97 : the expected number of even blocks and the expected number of lucky even blocks . to compute these , we will keep track of the number of blocks of each kind and each length among all of the @xmath102 standard deals . for any positive integer @xmath42 , let @xmath103 be the total number of blocks of length @xmath42 in all standard deals of a deck of @xmath5 cards , and for @xmath104 let @xmath105 be the total number of lucky blocks of length @xmath42 . the greatest possible length for a block is @xmath48 , so @xmath106 for @xmath107 . the expected number of blocks of length @xmath42 is then @xmath108 and similarly the expected number of lucky blocks of length @xmath42 is @xmath109 using this notation , we can write the expected value of @xmath96 as @xmath110 , and the expected value of @xmath97 is @xmath111 . notice that , although we have written these expected values as infinite sums , in fact the sums are finite , since all but finitely many terms in each sum are 0 . thus the expected length of a game is @xmath112    there are several steps required to pass from equation  ( [ eq : lengthform ] ) to theorem  [ thm : main ] . the first is to replace the @xmath113 and @xmath114 in  ( [ eq : lengthform ] ) with ( what turn out to be ) their asymptotic limits . we will show that , for large @xmath0 , @xmath115 we therefore define @xmath116 equivalently , @xmath117    we wish to rewrite using the asymptotic limits of the @xmath113 and @xmath114 . to this end , we first compute @xmath118 although the sum on the left - hand side is finite , the two sums on the right - hand side are infinite . however , it is not hard to see that these two infinite sums converge . indeed , we can evaluate the first one by using the partial fractions decomposition @xmath119 this gives us @xmath120 since the alternating harmonic series converges to @xmath3 . therefore @xmath121    next , we compute @xmath122 for the first part we again use a partial fractions decomposition : @xmath123 this gives us @xmath124 so @xmath125    combining , , and , we see that the expected length of the game is @xmath126    in the next section , we will show that @xmath127 substituting these values in will complete the proof of theorem  [ thm : main ] . in order to determine the limits required to complete the proof of theorem  [ thm : main ] , we need to establish some facts about the @xmath128 and @xmath129 . to establish these facts , we begin by finding effective recurrences that can be used to compute @xmath128 and @xmath129 . first we determine recurrences for the @xmath103 . if @xmath35 , then the only standard deal is @xmath131 , which has a single block of length 2 . so @xmath132 and @xmath133 for @xmath134 . for @xmath135 , as we saw before , any standard deal @xmath40 can be constructed from a standard deal @xmath61 by inserting an @xmath0 in one of the @xmath8 possible positions in @xmath63 and then adding a second @xmath0 at the end . now , what happens to the blocks of @xmath63 when this is done ? a block of length @xmath42 in @xmath63 either becomes a block of length @xmath136 ( if the first @xmath0 is inserted into that block ) or length @xmath42 ( if the first @xmath0 is inserted somewhere else ) . also , there is a new block at the end of length either 2 ( if both copies of @xmath0 are at the end ) or 1 ( if not ) . so , for @xmath137 : @xmath138 dividing by @xmath139 , we get corresponding recurrences for @xmath140 : @xmath141 , @xmath142 for @xmath134 , and for @xmath135 , @xmath143 finally , we use the definition of @xmath128 ( equation ) to convert these recurrences into recurrences for @xmath144 . [ lem : dbrec ] the numbers @xmath128 satisfy the following equations : @xmath145    the derivation of these equations involves only routine algebra . we illustrate by deriving the formula for @xmath146 : @xmath147    using these recurrences , we can now study the numbers @xmath128 . we begin by determining these numbers for small values of @xmath42 . [ lem : dbvalues ]    1 .   for @xmath33 , @xmath148 2 . for @xmath33 , @xmath149 3 .   for @xmath137 , @xmath150 all three statements are proven by induction using lemma  [ lem : dbrec ] , with the proof of each statement after the first also making use of the previous statement .    for all @xmath0 and @xmath151 , @xmath152    by induction on @xmath0 . for @xmath35 , we interpret the products in the numerator and denominator of the last fraction in as empty products , which are equal to 1 . so the inequality to be proven is @xmath153 , which follows easily from the formulas in lemma  [ lem : dbrec ] . now suppose that @xmath135 , and the lemma holds for @xmath58 . let @xmath154 then the inductive hypothesis is that for all @xmath151 , @xmath155 . we now consider three cases :    case 1 : @xmath156 . then by lemma  [ lem : dbvalues ] , @xmath157    case 2 : @xmath158 . then @xmath159    case 3 : @xmath160 . since @xmath135 , this implies that @xmath107 . therefore @xmath161 , so @xmath162 thus @xmath163    to get a better idea of the size of the bound in the last lemma , note that @xmath164 now , it is not hard to see that the product @xmath165 increases as @xmath0 increases , and it is well known that as @xmath166 it converges to @xmath167 ( see , for example , @xcite ) . therefore for @xmath104 we have @xmath168 in particular , it follows that @xmath169 as @xmath170 , which justifies our claim that gives the asymptotic limits for the @xmath113 .    to prove theorem  [ thm : main ] , for fixed @xmath0 , we need to find the sum of the numbers @xmath128 , for @xmath42 even . as a start on this , we compute the sum of all of the @xmath128 : @xmath171 the first sum on the right - hand side of equation is the expected number of blocks ( of all lengths ) . but for every standard deal the number of blocks is @xmath0 , so this expected number is @xmath0 . we can evaluate the second sum on the right - hand side of by using the partial fractions decomposition : @xmath172 thus , @xmath173 according to lemma  [ lem : dbvalues ] , @xmath174 , so @xmath175    to separate out the contributions of the even- and odd - numbered terms in we will use the following fact . [ lem : dbshape ] for @xmath39 , there exist numbers @xmath176 and @xmath177 such that @xmath178 and @xmath179    we use induction on @xmath0 . it is easy to verify that the lemma holds for @xmath35 and @xmath23 ( with @xmath180 , @xmath181 , @xmath182 , and @xmath183 ) . now suppose that @xmath184 , and the lemma holds for @xmath58 . to prove that the lemma holds for @xmath0 , we will show that @xmath185 we can therefore set @xmath176 to be one of @xmath186 or @xmath187 , and set @xmath177 to be one of @xmath188 or @xmath189 .    to prove , suppose that @xmath190 ; we must verify that @xmath191 . if @xmath156 , this follows immediately from lemma  [ lem : dbvalues ] . now suppose @xmath192 , and note that @xmath193 . then by the inductive hypothesis we have @xmath194 and therefore @xmath195    similar reasoning can be used to prove . to prove , suppose @xmath196 . if @xmath197 then we can repeat the reasoning in to show that @xmath191 . if @xmath198 then @xmath107 , so @xmath199 , and therefore @xmath200    lemma  [ lem : dbshape ] will be useful to us because of the following fact . [ lem : evenodddiff ] let @xmath201 be a monotonic sequence with the absolute value of each term bounded by some constant @xmath202 . write @xmath203 for the sum of the odd - indexed terms , i.e. , @xmath204 if @xmath85 is odd and @xmath205 if @xmath85 is even . write @xmath206 , so that @xmath207 is the sum of the even - indexed terms . then @xmath208    suppose the sequence is monotonically increasing . if @xmath85 is even , then @xmath209 and @xmath210 this implies that @xmath211 , so @xmath212 . if @xmath85 is odd , then we obtain the inequality @xmath213 , which leads to the stronger bound of @xmath214 . the argument is similar if the sequence is monotonically decreasing . we are finally ready to evaluate the first limit needed to complete our proof of theorem  [ thm : main ] :    [ lem : dbsumeven ] @xmath215    by lemma  [ lem : dbshape ] , for any positive integer @xmath216 the sequence @xmath217 consists of at most three monotonic subsequences . we can therefore apply lemma  [ lem : evenodddiff ] to each subsequence with the bound @xmath218 from to show that @xmath219 adding @xmath220 , we can rewrite this as @xmath221 letting @xmath222 and applying equation , we conclude that @xmath223 or in other words @xmath224 the lemma follows now by letting @xmath170 . we now do similar calculations for the lucky blocks . since the steps are similar to those in the last subsection , we skip many of the details . if @xmath35 , then the only block in the standard deal @xmath226 is lucky , so @xmath227 and @xmath228 for @xmath192 . for @xmath135 , the numbers @xmath105 satisfy the recurrences @xmath229 therefore @xmath230 , @xmath231 for @xmath192 , and for @xmath135 , @xmath232 finally , applying the definition of @xmath129 we get @xmath233    [ lem : dlbound ] for all @xmath0 and @xmath151 , @xmath234 also , for @xmath135 , @xmath235    by induction on @xmath0 . [ lem : lsum ] for all @xmath0 , @xmath236    note that the first equation in lemma  [ lem : lsum ] indicates that the expected number of adjacent matching pairs in a random deal is @xmath6 . the first equation can be proven by induction on @xmath0 . for the second , we begin with the definition of @xmath129 : @xmath237 now we use partial fractions to evaluate the last sum : @xmath238 thus @xmath239    [ lem : dlshape ] for @xmath240 , there exists a number @xmath241 such that @xmath242 and @xmath243    by induction on @xmath0 . it is easy to check that @xmath244 and @xmath245 . to establish the lemma for @xmath184 , we show that @xmath246 the proofs are similar to those in the proof of lemma  [ lem : dbshape ] . [ lem : dlsumeven ] @xmath247    by lemma  [ lem : dlshape ] , for any positive integer @xmath216 the sequence @xmath248 consists of at most two monotonic subsequences . as in the proof of lemma  [ lem : dbsumeven ] , we apply lemma  [ lem : evenodddiff ] with @xmath249 to show that @xmath250 adding @xmath251 , letting @xmath222 , and dividing by 2 , we conclude that @xmath252 and the lemma follows . this completes the proof of theorem  [ thm : main ] . observe that the proofs of lemma  [ lem : dbsumeven ] and  [ lem : dlsumeven ] indicate that @xmath253 in theorem  [ thm : main ] is @xmath254 . as a bonus , our last lemma also gives us the answer to question 2 :    the expected number of lucky moves in a game tends to @xmath3 as @xmath170 . there is a lucky move for each lucky block whose length is even , so the expected number of lucky moves is @xmath111 . the lemma now follows from equation   and lemma  [ lem : dlsumeven ] . the authors would like to thank dan archdeacon for useful conversations leading to this paper .    9 e. alfthan , optimal strategy in the childrens [ sic ] game memory ( 2007 ) , available at http://www.math.kth.se/xcomb/x1.pdf . classic memory game ( 2012 ) , available at http://classicmemorygame.com/. concentration memory game ( 2012 ) , available at http://www.mathsisfun.com/games/memory/index.html . p. flajolet , r. sedgewick , _ analytic combinatorics _ , cambridge university press , cambridge , 2009 r.  l. graham , d.  e. knuth , o. patashnik , _ concrete mathematics _ , second edition , addison - wesley , reading , ma , 1994 . j.  c. lagarias , a.  m. odlyzko , d.  b. zagier , on the capacity of disjointly shared networks , _ comput . networks isdn systems _ * 10 * no . 5 ( 1985 ) 275285 . e. lakshtanov , v. roshchina , on finiteness in the card game of war , _ amer . monthly _ * 119 * ( 2012 ) 318323 . j. wstlund , an elementary proof of the wallis product formula for pi , _ amer . monthly _ * 114 * ( 2007 ) 914917 .
the game of memory is played with a deck of @xmath0 pairs of cards . 
 the cards in each pair are identical . the deck is shuffled and the cards laid face down . a move consists of flipping over first one card then another . 
 the cards are removed from play if they match . otherwise , they are flipped back over and the next move commences . 
 a game ends when all pairs have been matched . 
 we determine that , when the game is played optimally , as @xmath1 :    * the expected number of moves is @xmath2 . 
 * the expected number of times two matching cards are unwittingly flipped over is @xmath3 . * 
 the expected number of flips until two matching cards have been seen is @xmath4 .