Mirror MLB Games

by Heath K-W Atomstramm, WhoWins.com

February 2002

In Major League Baseball (MLB), we might define "mirror" games as games whose inning-by-inning road/home team line scores are identical. The topic was recently examined by consultant Ron Visco, who works in the Education Department of the Baseball Hall of Fame in Cooperstown, New York. Visco wrote "Let Me Count The Ways: High-Scoring Games May Have Unique Line Scores" in the Baseball Research Journal, No. 30/01, pp. 129-130, 2001. At the end of the article, Visco lays down the question of whether 5-4 games (or any games in which a total of nine runs have been scored) have mirror games. He does so after spending his article asserting that the higher the scoring, the less the likelihood of the existence of a mirror game. This notebook seeks to complement Visco's paper, from a more quantitative perspective.

Relevant Formulæ

Half-Innings in which runs are scored

Visco limits his own analysis to games that are decided after 8.5 innings (by a home team win), after nine full innings (by a road team win), or between 8.5 and nine innings (by a home team walk-off win). In such games, the visiting team always bats in nine innings, while the home team bats in eight or nine innings (as discussed and will be discussed further). If nine innings are played, then a team can score its runs for the game in one, two, three, four, five, six, seven, eight, or nine innings. If the team scores all of its runs for the game in one single inning, those runs can occur in the 1st, 2nd, ..., 8th, or 9th inning -- nine possible combinations are offered. If the team scores all of its runs for the game in two innings, those runs can occur in innings 1&2 or 1&3 or ... or 7&8 or 7&9 or 8&9 -- 8+7+6+5+4+3+2+1 = 36 possible combinations are offered. As it happens, Binomial[9,1] represents the number of such combinations in the one-inning case, Binomial[9,2] represents the number of such combinations in the two-innings case, and, by extension, Binomial[9,n] represents the number in the n-innings case (1 ≤ n ≤ 9).

Runs scored in each half-inning in which scoring occurs

Likewise: If, say, the team tallies five runs in a game, and if all of the runs are scored in one single inning, then there is only one possibility for the run distribution: All five runs are scored in that one inning. If the runs are scored in only two innings, then there are four possible run distributions: 1&4, 2&3, 3&2, and 4&1. If the runs are scored in three innings, then there are six possible run distributions: 1,1,3; 1,2,2; 1,3,1; 2,1,2; 2,2,1; 3,1,1.  If the runs are scored in four innings, then there are four possible run distributions: 1,1,1,2; 1,1,2,1; 1,2,1,1; 2,1,1,1. And if the runs are scored in five innings, then there is but one possible run distribution: 1,1,1,1,1. This excruciating exposition suggests that Binomial[r-1,n-1] represents the number of possible run distributions when r runs are scored in n innings.

Combining Combinations

Thus, there are Binomial[9,n]*Binomial[r-1,n-1] total combinations of line scores for one team when that team scores r runs in n innings of a nine-inning game. And since those r runs can be scored in one, two, three, ..., eight, or nine innings, then the total combinations of line scores for one team when that team scores r runs in a nine-inning game is found via a summation over this product of binomial coefficients:

a[inns_, runs_]  :=  
      Sum[Binomial[inns, i]*Binomial[runs - 1, i - 1], {i, 1, 
          inns}]

Surely this formula (or a reasonable facsimile thereof) can be found in the classic texts by combinatorics superstars such as Florence Nightingale David, whose contributions to combinatorics are most noteworthy. Practically speaking, variable inns is 9 for a nine-inning game (always the case for the visiting team, and for losing home teams), or 8 for those home teams that win a game by over four runs, or 8 or 9 for those home teams that win a game by four runs or fewer. Visco presented the following table to "simply summarize the ways for one team to score a given number of runs (up to nine) in a nine inning game;" we repeat it here to illustrate the a[inns,runs] function in action:

TableForm[
      Table[{ii, a[9, ii]}, {ii, 0, 
          9}], 
TableAlignments -> 
        Right, 
TableHeadings -> {None, {"Runs", "\
Ways"}}]

Of course, we need not limit this table to nine-inning games, since the home team will bat in only eight innings if it leads after 8.5 innings. Thus, let's expand the table to include a nine-inning game, an eight-inning game, and the difference between the two -- for not just nine runs but fifteen. Comparing the difference column to the Ways[9] column yields an interesting result: a[k,j-1] = a[k,j]-a[k-1,j], and a[k,j] = Sum[a[k-1,ind],{ind,0,j}].

TableForm[
      Table[{ii, a[9, ii], a[8, ii], a[9, ii] - a[8, ii]}, {ii, 0, 
          15}], 
TableAlignments -> 
        Right, 
TableHeadings -> {None, {"Runs", "\
Ways[9]", "Ways[8]", "difference"}}]

Eight or Nine Innings?

We now address the issue that we've hinted at before. The visiting team always bats in nine innings. Given the Visco constraints and the final score of the game: For games in which the visiting team wins, we know that the home team batted in nine innings; for games in which the home team defeats the visiting team by more than four runs, we know that the home team batted in eight innings; for games in which the home team defeats the visiting team by four runs or less, we need to do a bit of thinking.

1) Consider a game in which the home team defeats the visitors by a 5-3 score. It is possible that all five of the home team's runs came in the first eight innings, in which case a[8,5] is the number of possible ways in which the home team scored those five runs in those eight innings. Here are other possibilities:
* Home team scores all five runs in ninth inning (and thus zero runs in first eight innings): a[8,0] possible ways.
* Home team scores four runs in ninth inning (and thus one run in first eight innings): a[8,1] possible ways.
* Home team scores three runs in ninth inning (and thus two runs in first eight innings): a[8,2] possible ways.
* Home team scores two runs in ninth inning (and thus three runs in first eight innings): a[8,3] possible ways.
* Home team scores one run in ninth inning (and thus four runs in first eight innings): Not possible -- four runs by the home team in its first eight innings would have given the home team a 4-3 win after 8.5 innings.
Thus, the number of possible line scores for a home team winning 5-3 is a[8,5]+a[8,0]+a[8,1]+a[8,2]+a[8,3]

2) Consider a game in which the home team defeats the visitors by a 4-2 score. It is possible that all four of the home team's runs came in the first eight innings, in which case a[8,4] is the number of possible ways in which the home team scored those four runs in those eight innings. Here are other possibilities:
* Home team scores all four runs in ninth inning (and thus zero runs in first eight innings): a[8,0] possible ways.
* Home team scores three runs in ninth inning (and thus one run in first eight innings): a[8,1] possible ways.
* Home team scores two runs in ninth inning (and thus two runs in first eight innings): a[8,2] possible ways.
* Home team scores one run in ninth inning (and thus three runs in first eight innings): Not possible -- three runs by the home team in its first eight innings would have given the home team a 3-2 win after 8.5 innings.
Thus, the number of possible line scores for a home team winning 4-2 is a[8,4]+a[8,0]+a[8,1]+a[8,2]

3) Consider a game in which the home team defeats the visitors by a 3-1 score. It is possible that all three of the home team's runs came in the first eight innings, in which case a[8,3] is the number of possible ways in which the home team scored those three runs in those eight innings. Here are other possibilities:
* Home team scores all three runs in ninth inning (and thus zero runs in first eight innings): a[8,0] possible ways.
* Home team scores two runs in ninth inning (and thus one run in first eight innings): a[8,1] possible ways.
* Home team scores one run in ninth inning (and thus two runs in first eight innings): Not possible -- two runs by the home team in its first eight innings would have given the home team a 2-1 win after 8.5 innings.
Thus, the number of possible line scores for a home team winning 3-1 is a[8,3]+a[8,0]+a[8,1]

4) Consider a game in which the home team defeats the visitors by a 2-0 score. It is possible that both of the home team's runs came in the first eight innings, in which case a[8,2] is the number of possible ways in which the home team scored those two runs in those eight innings. Here are other possibilities:
* Home team scores both runs in ninth inning (and thus zero runs in first eight innings): a[8,0] possible ways.
* Home team scores one run in ninth inning (and thus one run in first eight innings): Not possible -- one run by the home team in its first eight innings would have given the home team a 1-0 win after 8.5 innings.
Thus, the number of possible line scores for a home team winning 2-0 is a[8,2]+a[8,0]

5) Having grappled with four situations involving a two-run margin of victory, let us now consider a game in which the home team defeats the visitors by a 4-1 score. It is possible that all four of the home team's runs came in the first eight innings, in which case a[8,4] is the number of possible ways in which the home team scored those four runs in those eight innings. Here are other possibilities:
* Home team scores all four runs in ninth inning (and thus zero runs in first eight innings): a[8,0] possible ways.
* Home team scores three runs in ninth inning (and thus one run in first eight innings): a[8,1] possible ways.
* Home team scores two runs in ninth inning (and thus two runs in first eight innings): Not possible -- two runs by the home team in its first eight innings would have given the home team a 2-1 win after 8.5 innings.
* Home team scores one run in ninth inning (and thus three runs in first eight innings): Not possible -- three runs by the home team in its first eight innings would have given the home team a 3-1 win after 8.5 innings.
Thus, the number of possible line scores for a home team winning 4-1 is a[8,4]+a[8,0]+a[8,1]

6) Having just examined a situation involving a three-run margin of victory, let us now consider a game in which the home team defeats the visitors by a 4-3 score. Yet again, it is surely possible that all four of the home team's runs came in the first eight innings, in which case a[8,4] is yet again the number of possible ways in which the home team scored those four runs in those eight innings. Here are other possibilities:
* Home team scores all four runs in ninth inning (and thus zero runs in first eight innings): a[8,0] possible ways.
* Home team scores three runs in ninth inning (and thus one run in first eight innings): a[8,1] possible ways.
* Home team scores two runs in ninth inning (and thus two runs in first eight innings): a[8,2] possible ways.
* Home team scores one run in ninth inning (and thus three runs in first eight innings): a[8,3] possible ways.
Thus, the number of possible line scores for a home team winning 4-3 is a[8,4]+a[8,0]+a[8,1]+a[8,2]+a[8,3]

Through examining these six situations, notice that a trend is inherent in them. With apologies to those readers who spotted it long before the sixth situation, the number of possible line scores for a home team winning by four runs or less is a[8,home]+Sum[a[8,jj], {jj,0,road}], where home is the total number of runs tallied by the home team, and road is the total number of runs scored by the visiting team. When a one-run final score differential is involved, note that Sum[a[8,jj], {jj,0,home}] could be used. So: When given the final score, here is the formula for determining the number of possible line scores (home and road) corresponding to that final score:

\(linescoresFinalscore[road_, \ home_]\  := \ 
Which[
        road == home, 0, \  (*\ no\ tie\ games\ *) 
	
        road > home, \ a[9, road]*a[9, home], 
	
        road + 4 < home, a[9, road]*a[8, home], 
	
        road + 4 ≥ home, 
        a[9, road]*\((a[8, home] + Sum[a[8, j], {j, 0, road}])\)]\)

Because of a[k,j] = Sum[a[k-1,ind],{ind,0,j}] from above, we note in linescoresFinalscore that when the home team wins by one run, the a[8,home]+Sum[a[8,j],{j,0,road}] term collapses to a[9,home]. Thus, linescoresFinalscore[home-1, home] = linescoresFinalscore[home, home-1]. In his paper, Visco judiciously presents examples of numbers of possible line scores (home and road) corresponding to final scores of 2-1, 5-4, and 9-8. Using values taken directly from the Ways[9] column of the table above, Visco reports 2 x 45 x 9 = 810 possibilities for 2-1, 2 x 1287 x 495 = 1,274,130 for 5-4, and 2 x 24310 x 12870 = 625,739,400 for 9-8.  Using our new function, we can quickly corroborate Visco's calculations:

linescoresFinalscore[2, 1] + linescoresFinalscore[1, 2]

linescoresFinalscore[5, 4] + linescoresFinalscore[4, 5]

linescoresFinalscore[9, 8] + linescoresFinalscore[8, 9]

Of course, the simple doubling employed by Visco does not work when the margin of victory exceeds one run. Visco acknowledges as much, noting that when the home team has won by more than four runs, it cannot have batted in the ninth inning. Nevertheless, his paper really does not address home team victories by margins of two through four runs. Let us now look at a table of possible road/home team line scores corresponding to the game total of runs by the home team (rows) and the game total of runs by the road team (columns). You will have to scroll right to see the entire table, since the table entries grow large as the total number of game runs by both teams increases.

TableForm[
      Transpose[
        Table[linescoresFinalscore[r, h], {r, 0, 26}, {h, 0, 
            26}]], 
TableAlignments -> 
        Right, 
TableHeadings -> {Map["home=", 
            Table[i, {i, 0, 26}]], 
          Map["road=", Table[i, {i, 0, 26}]]}]

Perspective of Total Game Runs

Given a specific final score, our linescoresFinalscore function suffices for determining the number of possible road/home team line scores that can correspond to that final score. But what of the number of possible road/home team line scores for a specific total of runs in a game? That number of possibilities is surely the larger number, since a specific total of game runs comprises a number of specific final scores (e.g. for 6 total game runs: 0-6, 1-5, 2-4, 4-2, 5-1, 6-0). The following function, given a specific total of game runs, produces the corresponding total number of possible road/home team line scores:

linescoresTotalruns[totr_]  :=  
      Sum[linescoresFinalscore[indx, totr - indx], {indx, 0, 
          totr}]

Here is a table of output from this function:

TableForm[
      Table[{totalruns, linescoresTotalruns[totalruns]}, {totalruns, 1, 
          30}], 
TableAlignments -> 
        Right, 
TableHeadings -> {None, {"Runs", "\
Ways"}}]

Relevant MLB Scores

Data from Retrosheet

The "Relevant Formulæ" section of this notebook offers a pleasant stroll through the combinatorics realm, but its value is confined to the theoretical unless it can be applied to real-world data. Fortunately, meticulous researchers who contribute to the stellar Retrosheet (www.retrosheet.org) have compiled a database that is of great use in this regard. This database comprises -- amongst much else of sharp interest to the baseballer -- a text file for every season of Major League Baseball, from calendar year 2000 (as of this writing) all the way back to calendar year 1900; each text file contains a wealth of information on most (if not all) of the MLB games played that year. From 1978 through 2000, inclusive, the game information in these text files includes regular-season MLB line scores for the visiting and home teams, covering (by our best count) 43,883 games that lasted 8.5 through 9 full innings and ended in a decision (i.e., no tie games). [Of these 43,883 games, 37,313 (.8503) had unduplicated road/home team line scores, while the remaining 6570 (.1497) were mirror games.] Tapping into these twenty-three specific text files allows one to tabulate the frequency of occurrence for these line scores. Let us now present -- in both raw input and tabular formats -- the multi-dimensional list results19782000:

results19782000 =   
\({{{{x}}, 	{{42, 1}, {40, 1}, {39, 2}, {35, 1}, {34, 
                  1}, {32, 2}, {30, 1}, {0, 0}}, 	{{23, 2}, {22, 1}, {18, 
                  1}, {17, 1}, {15, 1}, {14, 1}, {13, 1}, {12, 2}, {11, 
                  2}, {10, 5}, {9, 5}, {8, 4}, {7, 4}, {6, 6}, {5, 1}, {4, 
                  2}, {3, 4}, {2, 2}, {0, 0}}, 	{{10, 1}, {9, 2}, {8, 
                  1}, {7, 1}, {6, 2}, {5, 13}, {4, 20}, {3, 20}, {2, 30}, {1, 
                  45}, {0, 30}}, 	{{6, 1}, {5, 2}, {4, 6}, {3, 20}, {2, 
                  38}, {1, 161}, {0, 267}}, 	{{4, 2}, {2, 31}, {1, 205}, {0, 
                  1049}}, 	{{2, 9}, {1, 183}, {0, 2811}}, 	{{2, 3}, {1, 
                  147}, {0, 6285}}, 	{{2, 3}, {1, 114}, {0, 12753}}, 	{{1, 
                  68}, {0, 24242}}, 	{{1, 59}, {0, 43699}}, 	{{1, 39}, {0, 
                  75543}}, 	{{1, 18}, {0, 125952}}, 	{{1, 12}, {0, 
                  203478}}, 	{{1, 10}, {0, 319760}}, 	{{1, 6}, {0, 
                  490308}}, 	{{1, 3}, {0, 735468}}, 	{{1, 5}, {0, 
                  1081570}}, 	{{1, 1}, {0, 1562274}}, 	{{1, 1}, {0, 
                  2220074}}, 	{{0, 3108105}}, 	{{0, 4292145}}, 	{{0, 
                  5852925}}, 	{{0, 7888725}}, 	{{0, 10518300}}, 	{{0, 
                  13884156}}, 	{{0, 18156204}}}, 
{{{67, 1}, {60, 1}, {58, 
                  1}, {56, 1}, {48, 1}, {47, 1}, {44, 1}, {42, 1}, {40, 
                  1}, {0, 0}}, 	{{x}}, 	{{8, 1}, {7, 4}, {6, 2}, {5, 
                  17}, {4, 23}, {3, 55}, {2, 106}, {1, 119}, {0, 78}}, 	{{6, 
                  1}, {4, 4}, {3, 15}, {2, 94}, {1, 392}, {0, 979}}, 	{{3, 
                  5}, {2, 53}, {1, 528}, {0, 3869}}, 	{{3, 2}, {2, 12}, {1, 
                  465}, {0, 11104}}, 	{{2, 3}, {1, 369}, {0, 26655}}, 	{{2, 
                  2}, {1, 295}, {0, 57618}}, 	{{1, 211}, {0, 
                  115619}}, 	{{1, 137}, {0, 218653}}, 	{{1, 92}, {0, 
                  393730}}, 	{{1, 79}, {0, 680159}}, 	{{1, 43}, {0, 
                  1133687}}, 	{{1, 23}, {0, 1831387}}, 	{{1, 15}, {0, 
                  2877915}}, 	{{1, 7}, {0, 4412819}}, 	{{1, 2}, {0, 
                  6619237}}, 	{{1, 6}, {0, 9734169}}, 	{{1, 1}, {0, 
                  14060474}}, 	{{1, 1}, {0, 19980674}}, 	{{0, 
                  27972945}}, 	{{0, 38629305}}, 	{{1, 2}, {0, 
                  52676323}}, 	{{0, 70998525}}, 	{{0, 94664700}}, 	{{0, 
                  124957404}}, 	{{0, 163405836}}}, 
{{{31, 1}, {27, 
                  1}, {23, 3}, {18, 2}, {17, 1}, {16, 1}, {14, 2}, {13, 
                  4}, {12, 2}, {11, 3}, {10, 3}, {9, 4}, {8, 1}, {7, 2}, {6, 
                  2}, {5, 2}, {4, 1}, {3, 2}, {0, 0}}, 	{{9, 2}, {8, 2}, {7, 
                  7}, {6, 19}, {5, 24}, {4, 32}, {3, 79}, {2, 111}, {1, 
                  95}, {0, 34}}, 	{{x}}, 	{{3, 6}, {2, 57}, {1, 734}, {0, 
                  6628}}, 	{{2, 23}, {1, 732}, {0, 21520}}, 	{{2, 10}, {1, 
                  668}, {0, 57237}}, 	{{1, 502}, {0, 134633}}, 	{{1, 
                  411}, {0, 289164}}, 	{{1, 265}, {0, 578885}}, 	{{1, 
                  206}, {0, 1093744}}, 	{{1, 124}, {0, 1968986}}, 	{{1, 
                  67}, {0, 3401123}}, 	{{1, 53}, {0, 5668597}}, 	{{1, 
                  31}, {0, 9157019}}, 	{{1, 24}, {0, 14389626}}, 	{{1, 
                  14}, {0, 22064116}}, 	{{1, 7}, {0, 33096188}}, 	{{1, 
                  2}, {0, 48670873}}, 	{{1, 5}, {0, 70302370}}, 	{{1, 
                  2}, {0, 99903373}}, 	{{1, 1}, {0, 139864724}}, 	{{0, 
                  193146525}}, 	{{1, 1}, {0, 263381624}}, 	{{0, 
                  354992625}}, 	{{1, 1}, {0, 473323499}}, 	{{0, 
                  624787020}}, 	{{0, 817029180}}}, 
{{{14, 1}, {12, 
                  1}, {10, 4}, {9, 4}, {8, 1}, {7, 10}, {6, 8}, {5, 12}, {4, 
                  20}, {3, 15}, {2, 26}, {1, 15}, {0, 4}}, 	{{5, 2}, {4, 
                  12}, {3, 40}, {2, 147}, {1, 346}, {0, 614}}, 	{{5, 1}, {4, 
                  2}, {3, 15}, {2, 115}, {1, 1029}, {0, 
                  6263}}, 	{{x}}, 	{{2, 8}, {1, 804}, {0, 80863}}, 	{{2, 
                  4}, {1, 751}, {0, 211600}}, 	{{2, 2}, {1, 549}, {0, 
                  494944}}, 	{{1, 456}, {0, 1061319}}, 	{{1, 313}, {0, 
                  2123237}}, 	{{1, 203}, {0, 4010947}}, 	{{1, 157}, {0, 
                  7219913}}, 	{{1, 106}, {0, 12470924}}, 	{{1, 85}, {0, 
                  20784965}}, 	{{1, 54}, {0, 33575796}}, 	{{1, 28}, {0, 
                  52762022}}, 	{{1, 15}, {0, 80901795}}, 	{{1, 6}, {0, 
                  121352709}}, 	{{1, 6}, {0, 178459869}}, 	{{1, 1}, {0, 
                  257775374}}, 	{{1, 4}, {0, 366312371}}, 	{{0, 
                  512837325}}, 	{{1, 2}, {0, 708203923}}, 	{{1, 1}, {0, 
                  965732624}}, 	{{0, 1301639625}}, 	{{0, 
                  1735519500}}, 	{{0, 2290885740}}, 	{{0, 
                  2995773660}}}, 
{{{8, 1}, {6, 2}, {5, 4}, {4, 6}, {3, 
                  28}, {2, 55}, {1, 109}, {0, 126}}, 	{{4, 2}, {3, 10}, {2, 
                  85}, {1, 540}, {0, 2414}}, 	{{3, 2}, {2, 37}, {1, 
                  825}, {0, 16011}}, 	{{3, 1}, {2, 19}, {1, 1167}, {0, 
                  80488}}, 	{{x}}, 	{{1, 639}, {0, 636426}}, 	{{1, 
                  548}, {0, 1485937}}, 	{{1, 398}, {0, 3184927}}, 	{{2, 
                  1}, {1, 286}, {0, 6370363}}, 	{{1, 195}, {0, 
                  12033255}}, 	{{1, 158}, {0, 21660052}}, 	{{1, 84}, {0, 
                  37413006}}, 	{{1, 62}, {0, 62355088}}, 	{{1, 38}, {0, 
                  100727512}}, 	{{1, 30}, {0, 158286120}}, 	{{1, 18}, {0, 
                  242705412}}, 	{{1, 13}, {0, 364058132}}, 	{{1, 6}, {0, 
                  535379619}}, 	{{1, 4}, {0, 773326121}}, 	{{1, 2}, {0, 
                  1098937123}}, 	{{1, 1}, {0, 1538511974}}, 	{{0, 
                  2124611775}}, 	{{0, 2897197875}}, 	{{0, 
                  3904918875}}, 	{{0, 5206558500}}, 	{{0, 
                  6872657220}}, 	{{0, 8987320980}}}, 
{{{4, 3}, {3, 
                  10}, {2, 45}, {1, 184}, {0, 550}}, 	{{3, 1}, {2, 31}, {1, 
                  528}, {0, 6649}}, 	{{2, 5}, {1, 773}, {0, 36887}}, 	{{2, 
                  6}, {1, 781}, {0, 157118}}, 	{{2, 1}, {1, 1000}, {0, 
                  636064}}, 	{{x}}, 	{{1, 439}, {0, 3864422}}, 	{{1, 
                  349}, {0, 8281496}}, 	{{1, 261}, {0, 16563429}}, 	{{1, 
                  222}, {0, 31286748}}, 	{{1, 126}, {0, 56316420}}, 	{{1, 
                  79}, {0, 97273955}}, 	{{1, 57}, {0, 162123333}}, 	{{1, 
                  42}, {0, 261891588}}, 	{{1, 23}, {0, 411543967}}, 	{{1, 
                  17}, {0, 631034101}}, 	{{1, 11}, {0, 946551166}}, 	{{1, 
                  6}, {0, 1391987019}}, 	{{1, 4}, {0, 2010647921}}, 	{{1, 
                  4}, {0, 2857236521}}, 	{{1, 1}, {0, 4000131134}}, 	{{0, 
                  5523990615}}, 	{{0, 7532714475}}, 	{{0, 
                  10152789075}}, 	{{1, 1}, {0, 13537052099}}, 	{{0, 
                  17868908772}}, 	{{0, 23367034548}}}, 
{{{3, 3}, {2, 
                  25}, {1, 204}, {0, 1484}}, 	{{3, 1}, {2, 10}, {1, 
                  450}, {0, 14983}}, 	{{2, 2}, {1, 587}, {0, 78656}}, 	{{2, 
                  1}, {1, 583}, {0, 309781}}, 	{{1, 588}, {0, 
                  1093857}}, 	{{1, 719}, {0, 3864142}}, 	{{x}}, 	{{1, 
                  308}, {0, 19323997}}, 	{{1, 207}, {0, 38648403}}, 	{{1, 
                  166}, {0, 73002764}}, 	{{1, 113}, {0, 131405161}}, 	{{1, 
                  79}, {0, 226972667}}, 	{{1, 46}, {0, 378287864}}, 	{{1, 
                  35}, {0, 611080435}}, 	{{1, 25}, {0, 960269285}}, 	{{1, 
                  12}, {0, 1472412930}}, 	{{1, 4}, {0, 2208619409}}, 	{{1, 
                  4}, {0, 3247969721}}, 	{{1, 4}, {0, 4691511821}}, 	{{1, 
                  1}, {0, 6666885224}}, 	{{1, 1}, {0, 9333639314}}, 	{{1, 
                  1}, {0, 12889311434}}, 	{{0, 17576333775}}, 	{{0, 
                  23689841175}}, 	{{0, 31586454900}}, 	{{0, 
                  41694120468}}, 	{{0, 54523080612}}}, 
{{{2, 11}, {1, 
                  191}, {0, 3230}}, 	{{2, 4}, {1, 317}, {0, 30567}}, 	{{2, 
                  3}, {1, 414}, {0, 154023}}, 	{{1, 471}, {0, 
                  593034}}, 	{{1, 402}, {0, 1943463}}, 	{{1, 361}, {0, 
                  6072992}}, 	{{1, 485}, {0, 19323820}}, 	{{x}}, 	{{1, 
                  166}, {0, 82818284}}, 	{{1, 116}, {0, 156434734}}, 	{{1, 
                  88}, {0, 281582642}}, 	{{1, 64}, {0, 486370106}}, 	{{1, 
                  45}, {0, 810616905}}, 	{{1, 24}, {0, 1309458126}}, 	{{1, 
                  19}, {0, 2057719931}}, 	{{1, 9}, {0, 3155170581}}, 	{{1, 
                  6}, {0, 4732755879}}, 	{{1, 2}, {0, 6959935123}}, 	{{1, 
                  4}, {0, 10053239621}}, 	{{1, 3}, {0, 14286182622}}, 	{{0, 
                  20000655675}}, 	{{1, 1}, {0, 27619953074}}, 	{{0, 
                  37663572375}}, 	{{0, 50763945375}}, 	{{0, 
                  67685260500}}, 	{{0, 89344543860}}, 	{{1, 1}, {0, 
                  116835172739}}}, 
{{{2, 6}, {1, 130}, {0, 6299}}, 	{{2, 
                  2}, {1, 210}, {0, 57703}}, 	{{1, 297}, {0, 
                  289278}}, 	{{1, 328}, {0, 1061447}}, 	{{1, 291}, {0, 
                  3430059}}, 	{{1, 247}, {0, 9937967}}, 	{{1, 224}, {0, 
                  28342090}}, 	{{1, 268}, {0, 82818182}}, 	{{x}}, 	{{1, 
                  84}, {0, 312869616}}, 	{{1, 75}, {0, 563165385}}, 	{{1, 
                  47}, {0, 972740293}}, 	{{1, 33}, {0, 1621233867}}, 	{{1, 
                  16}, {0, 2618916284}}, 	{{1, 13}, {0, 4115439887}}, 	{{1, 
                  6}, {0, 6310341174}}, 	{{1, 7}, {0, 9465511763}}, 	{{1, 
                  2}, {0, 13919870248}}, 	{{1, 2}, {0, 20106479248}}, 	{{1, 
                  2}, {0, 28572365248}}, 	{{1, 1}, {0, 40001311349}}, 	{{0, 
                  55239906150}}, 	{{0, 75327144750}}, 	{{1, 1}, {0, 
                  101527890749}}, 	{{0, 135370521000}}, 	{{0, 
                  178689087720}}, 	{{0, 233670345480}}}, 
{{{1, 87}, {0, 
                  11353}}, 	{{1, 177}, {0, 102783}}, 	{{2, 1}, {1, 
                  217}, {0, 514582}}, 	{{1, 227}, {0, 1887373}}, 	{{1, 
                  200}, {0, 5662600}}, 	{{1, 210}, {0, 16379439}}, 	{{1, 
                  135}, {0, 43372194}}, 	{{1, 119}, {0, 115025506}}, 	{{1, 
                  144}, {0, 312869556}}, 	{{x}}, 	{{1, 48}, {0, 
                  1063756932}}, 	{{1, 27}, {0, 1837398393}}, 	{{1, 31}, {0, 
                  3062330669}}, 	{{1, 13}, {0, 4946841887}}, 	{{1, 8}, {0, 
                  7773608692}}, 	{{1, 12}, {0, 11919533328}}, 	{{1, 5}, {0, 
                  17879300005}}, 	{{1, 3}, {0, 26293088247}}, 	{{1, 2}, {0, 
                  37978905248}}, 	{{1, 1}, {0, 53970023249}}, 	{{0, 
                  75558032550}}, 	{{1, 2}, {0, 104342044948}}, 	{{0, 
                  142284606750}}, 	{{0, 191774904750}}, 	{{0, 
                  255699873000}}, 	{{0, 337523832360}}, 	{{0, 
                  441377319240}}}, 
{{{1, 49}, {0, 19399}}, 	{{1, 113}, {0, 
                  174919}}, 	{{1, 137}, {0, 875023}}, 	{{1, 157}, {0, 
                  3208763}}, 	{{1, 144}, {0, 9626616}}, 	{{1, 122}, {0, 
                  25029454}}, 	{{1, 104}, {0, 67420249}}, 	{{1, 84}, {0, 
                  166557021}}, 	{{1, 67}, {0, 415932593}}, 	{{1, 77}, {0, 
                  1063756903}}, 	{{x}}, 	{{1, 21}, {0, 3307317135}}, 	{{1, 
                  25}, {0, 5512195235}}, 	{{1, 11}, {0, 8904315409}}, 	{{1, 
                  6}, {0, 13992495654}}, 	{{1, 2}, {0, 21455160010}}, 	{{1, 
                  4}, {0, 32182740014}}, 	{{1, 1}, {0, 47327558849}}, 	{{0, 
                  68362029450}}, 	{{0, 97146041850}}, 	{{0, 
                  136004458590}}, 	{{0, 187815680910}}, 	{{0, 
                  256112292150}}, 	{{1, 1}, {0, 345194828549}}, 	{{0, 
                  460259771400}}, 	{{0, 607542898248}}, 	{{0, 
                  794479174632}}}, 
{{{1, 40}, {0, 31784}}, 	{{1, 63}, {0, 
                  286353}}, 	{{1, 101}, {0, 1431979}}, 	{{1, 99}, {0, 
                  5250861}}, 	{{1, 89}, {0, 15752791}}, 	{{1, 88}, {0, 
                  40957400}}, 	{{1, 75}, {0, 95567397}}, 	{{1, 57}, {0, 
                  246196608}}, 	{{1, 31}, {0, 575211749}}, 	{{1, 32}, {0, 
                  1364617508}}, 	{{1, 42}, {0, 3307317114}}, 	{{x}}, 	{{1, 
                  11}, {0, 9521064529}}, 	{{1, 14}, {0, 
                  15380181166}}, 	{{1, 6}, {0, 24168856134}}, 	{{1, 5}, {0, 
                  37058912743}}, 	{{1, 3}, {0, 55588369119}}, 	{{1, 2}, {0, 
                  81747601648}}, 	{{0, 118079869050}}, 	{{1, 1}, {0, 
                  167797708649}}, 	{{0, 234916792110}}, 	{{0, 
                  324408903390}}, 	{{1, 1}, {0, 442375777349}}, 	{{0, 
                  596245612950}}, 	{{1, 1}, {0, 794994150599}}, 	{{0, 
                  1049392278792}}, 	{{0, 1372282210728}}}, 
{{{1, 20}, {0, 
                  50368}}, 	{{1, 47}, {0, 453445}}, 	{{1, 73}, {0, 
                  2267387}}, 	{{1, 72}, {0, 8313948}}, 	{{1, 63}, {0, 
                  24941997}}, 	{{1, 53}, {0, 64849303}}, 	{{1, 55}, {0, 
                  151315109}}, 	{{1, 38}, {0, 324246742}}, 	{{1, 24}, {0, 
                  814130436}}, 	{{1, 21}, {0, 1815908359}}, 	{{1, 21}, {0, 
                  4119640647}}, 	{{1, 17}, {0, 9521064523}}, 	{{x}}, 	{{1, 
                  4}, {0, 25633635296}}, 	{{1, 2}, {0, 40281426898}}, 	{{1, 
                  2}, {0, 61764854578}}, 	{{1, 1}, {0, 92647281869}}, 	{{1, 
                  1}, {0, 136246002749}}, 	{{0, 196799781750}}, 	{{1, 
                  1}, {0, 279662847749}}, 	{{1, 1}, {0, 
                  391527986849}}, 	{{0, 540681505650}}, 	{{0, 
                  737292962250}}, 	{{0, 993742688250}}, 	{{1, 1}, {0, 
                  1324990250999}}, 	{{0, 1748987131320}}, 	{{0, 
                  2287137017880}}}, 
{{{1, 8}, {0, 77512}}, 	{{1, 38}, {0, 
                  697642}}, 	{{1, 45}, {0, 3488355}}, 	{{1, 54}, {0, 
                  12790746}}, 	{{1, 40}, {0, 38372360}}, 	{{1, 47}, {0, 
                  99768193}}, 	{{1, 28}, {0, 232792532}}, 	{{1, 17}, {0, 
                  498841183}}, 	{{1, 17}, {0, 997682383}}, 	{{1, 9}, {0, 
                  2475487291}}, 	{{1, 9}, {0, 5306882715}}, 	{{1, 6}, {0, 
                  11571755358}}, 	{{1, 12}, {0, 
                  25633635288}}, 	{{x}}, 	{{0, 65069997300}}, 	{{1, 
                  1}, {0, 99773995859}}, 	{{1, 4}, {0, 
                  149660993786}}, 	{{1, 1}, {0, 220089696749}}, 	{{0, 
                  317907339750}}, 	{{0, 451763061750}}, 	{{0, 
                  632468286450}}, 	{{0, 873408586050}}, 	{{0, 
                  1191011708250}}, 	{{0, 1605276650250}}, 	{{0, 
                  2140368867000}}, 	{{0, 2825286904440}}, 	{{0, 
                  3694605951960}}}, 
{{{1, 12}, {0, 116268}}, 	{{1, 
                  18}, {0, 1046502}}, 	{{1, 29}, {0, 5232571}}, 	{{1, 
                  25}, {0, 19186175}}, 	{{1, 15}, {0, 57558585}}, 	{{1, 
                  25}, {0, 149652335}}, 	{{1, 18}, {0, 349188822}}, 	{{1, 
                  16}, {0, 748261784}}, 	{{1, 9}, {0, 1496523591}}, 	{{1, 
                  5}, {0, 2826766795}}, 	{{1, 4}, {0, 7002942800}}, 	{{1, 
                  4}, {0, 14501313680}}, 	{{1, 2}, {0, 30516232498}}, 	{{1, 
                  5}, {0, 65069997295}}, 	{{x}}, 	{{1, 2}, {0, 
                  156787707778}}, 	{{1, 1}, {0, 235181561669}}, 	{{0, 
                  345855237750}}, 	{{0, 499568676750}}, 	{{0, 
                  709913382750}}, 	{{0, 993878735850}}, 	{{0, 
                  1372499206650}}, 	{{0, 1871589827250}}, 	{{0, 
                  2522577593250}}, 	{{0, 3363436791000}}, 	{{0, 
                  4439736564120}}, 	{{0, 5805809353080}}}, 
{{{1, 2}, {0, 
                  170542}}, 	{{1, 15}, {0, 1534881}}, 	{{1, 17}, {0, 
                  7674463}}, 	{{1, 18}, {0, 28139742}}, 	{{1, 17}, {0, 
                  84419263}}, 	{{1, 17}, {0, 219490111}}, 	{{1, 15}, {0, 
                  512143617}}, 	{{1, 17}, {0, 1097450623}}, 	{{1, 7}, {0, 
                  2194901273}}, 	{{1, 2}, {0, 4145924638}}, 	{{1, 8}, {0, 
                  7462664344}}, 	{{1, 2}, {0, 18602695330}}, 	{{1, 4}, {0, 
                  37351868576}}, 	{{0, 76112178660}}, 	{{1, 1}, {0, 
                  156787707779}}, 	{{x}}, 	{{0, 360611727894}}, 	{{1, 
                  1}, {0, 530311364549}}, 	{{0, 766005304350}}, 	{{0, 
                  1088533853550}}, 	{{0, 1523947394970}}, 	{{0, 
                  2104498783530}}, 	{{0, 2869771068450}}, 	{{0, 
                  3867952309650}}, 	{{0, 5157269746200}}, 	{{0, 
                  6807596064984}}, 	{{0, 8902241008056}}}, 
{{{1, 4}, {0, 
                  245153}}, 	{{1, 5}, {0, 2206408}}, 	{{1, 3}, {0, 
                  11032062}}, 	{{1, 19}, {0, 40450886}}, 	{{1, 15}, {0, 
                  121352700}}, 	{{1, 10}, {0, 315517049}}, 	{{1, 9}, {0, 
                  736206462}}, 	{{1, 8}, {0, 1577585287}}, 	{{1, 7}, {0, 
                  3155170583}}, 	{{1, 1}, {0, 5959766669}}, 	{{1, 1}, {0, 
                  10727580005}}, 	{{1, 2}, {0, 18529456372}}, 	{{1, 1}, {0, 
                  46750868189}}, 	{{0, 91295178030}}, 	{{0, 
                  180646706790}}, 	{{1, 2}, {0, 
                  360611727892}}, 	{{x}}, 	{{0, 795467046825}}, 	{{0, 
                  1149007956525}}, 	{{0, 1632800780325}}, 	{{0, 
                  2285921092455}}, 	{{0, 3156748175295}}, 	{{0, 
                  4304656602675}}, 	{{0, 5801928464475}}, 	{{0, 
                  7735904619300}}, 	{{0, 10211394097476}}, 	{{0, 
                  13353361512084}}}, 
{{{1, 1}, {0, 346103}}, 	{{1, 5}, {0, 
                  3114931}}, 	{{1, 5}, {0, 15574675}}, 	{{1, 7}, {0, 
                  57107153}}, 	{{1, 5}, {0, 171321475}}, 	{{1, 4}, {0, 
                  445435844}}, 	{{1, 8}, {0, 1039350304}}, 	{{1, 3}, {0, 
                  2227179237}}, 	{{1, 1}, {0, 4454358479}}, 	{{1, 3}, {0, 
                  8413788237}}, 	{{1, 1}, {0, 15144818831}}, 	{{1, 2}, {0, 
                  26159232526}}, 	{{0, 43598720880}}, 	{{1, 3}, {0, 
                  111836883057}}, 	{{0, 212926528980}}, 	{{0, 
                  410107455252}}, 	{{1, 1}, {0, 
                  795467046824}}, 	{{x}}, 	{{0, 1689717583125}}, 	{{0, 
                  2401177618125}}, 	{{0, 3361648665375}}, 	{{0, 
                  4642276728375}}, 	{{0, 6330377356875}}, 	{{0, 
                  8532247741875}}, 	{{0, 11376330322500}}, 	{{0, 
                  15016756025700}}, 	{{0, 19637296341300}}}, 
{{{1, 2}, {0, 
                  480698}}, 	{{1, 3}, {0, 4326297}}, 	{{1, 3}, {0, 
                  21631497}}, 	{{1, 4}, {0, 79315496}}, 	{{1, 2}, {0, 
                  237946498}}, 	{{1, 2}, {0, 618660898}}, 	{{1, 1}, {0, 
                  1443542099}}, 	{{1, 2}, {0, 3093304498}}, 	{{1, 1}, {0, 
                  6186608999}}, 	{{0, 11685817000}}, 	{{1, 1}, {0, 
                  21034470599}}, 	{{1, 2}, {0, 36332267398}}, 	{{0, 
                  60553779000}}, 	{{0, 97817643000}}, 	{{0, 
                  255966291900}}, 	{{0, 476101758396}}, 	{{0, 
                  894458501541}}, 	{{0, 1689717583125}}, 	{{x}}, 	{{0, 
                  3468367670625}}, 	{{0, 4855714738875}}, 	{{0, 
                  6705510829875}}, 	{{0, 9143878404375}}, 	{{0, 
                  12324357849375}}, 	{{0, 16432477132500}}, 	{{0, 
                  21690869814900}}, 	{{0, 28364983604100}}}, 
{{{0, 
                  657800}}, 	{{1, 1}, {0, 5920199}}, 	{{1, 4}, {0, 
                  29600996}}, 	{{1, 2}, {0, 108536998}}, 	{{0, 
                  325611000}}, 	{{1, 1}, {0, 846588599}}, 	{{1, 1}, {0, 
                  1975373399}}, 	{{0, 4232943000}}, 	{{1, 3}, {0, 
                  8465885997}}, 	{{0, 15991118000}}, 	{{0, 
                  28784012400}}, 	{{1, 1}, {0, 49717839599}}, 	{{0, 
                  82863066000}}, 	{{0, 133855722000}}, 	{{0, 
                  210344706000}}, 	{{0, 562936367796}}, 	{{0, 
                  1024710415641}}, 	{{0, 1881264515625}}, 	{{0, 
                  3468367670625}}, 	{{x}}, 	{{0, 6900226207875}}, 	{{0, 
                  9528883810875}}, 	{{0, 12993932469375}}, 	{{0, 
                  17513561154375}}, 	{{0, 23351414872500}}, 	{{0, 
                  30823867631700}}, 	{{0, 40308134595300}}}, 
{{{0, 
                  888030}}, 	{{0, 7992270}}, 	{{0, 39961350}}, 	{{1, 
                  2}, {0, 146524948}}, 	{{1, 2}, {0, 439574848}}, 	{{0, 
                  1142894610}}, 	{{0, 2666754090}}, 	{{1, 2}, {0, 
                  5714473048}}, 	{{0, 11428946100}}, 	{{0, 
                  21588009300}}, 	{{0, 38858416740}}, 	{{1, 2}, {0, 
                  67119083458}}, 	{{0, 111865139100}}, 	{{0, 
                  180705224700}}, 	{{0, 283965353100}}, 	{{0, 
                  435413541420}}, 	{{0, 1194037903971}}, 	{{0, 
                  2130275527875}}, 	{{0, 3828050243875}}, 	{{0, 
                  6900226207875}}, 	{{x}}, 	{{0, 13340437335225}}, 	{{0, 
                  18191505457125}}, 	{{0, 24518985616125}}, 	{{0, 
                  32691980821500}}, 	{{0, 43153414684380}}, 	{{0, 
                  56431388433420}}}, 
{{{0, 1184040}}, 	{{1, 1}, {0, 
                  10656359}}, 	{{1, 2}, {0, 53281798}}, 	{{0, 
                  195366600}}, 	{{0, 586099800}}, 	{{0, 
                  1523859480}}, 	{{0, 3555672120}}, 	{{0, 
                  7619297400}}, 	{{1, 1}, {0, 15238594799}}, 	{{0, 
                  28784012400}}, 	{{0, 51811222320}}, 	{{0, 
                  89492111280}}, 	{{0, 149153518800}}, 	{{0, 
                  240940299600}}, 	{{0, 378620470800}}, 	{{0, 
                  580551388560}}, 	{{0, 870827082840}}, 	{{0, 
                  2450432543625}}, 	{{0, 4290499266625}}, 	{{0, 
                  7557390608625}}, 	{{0, 13340437335225}}, 	{{x}}, 	{{0, 
                  25121602774125}}, 	{{0, 33859551565125}}, 	{{0, 
                  45146068753500}}, 	{{0, 59592810754620}}, 	{{0, 
                  77929060217580}}}, 
{{{0, 1560780}}, 	{{0, 
                  14047020}}, 	{{0, 70235100}}, 	{{0, 257528700}}, 	{{0, 
                  772586100}}, 	{{0, 2008723860}}, 	{{1, 1}, {0, 
                  4687022339}}, 	{{1, 1}, {0, 10043619299}}, 	{{1, 1}, {0, 
                  20087238599}}, 	{{0, 37942561800}}, 	{{0, 
                  68296611240}}, 	{{0, 117966873960}}, 	{{0, 
                  196611456600}}, 	{{0, 317603122200}}, 	{{0, 
                  499090620600}}, 	{{0, 765272284920}}, 	{{0, 
                  1147908427380}}, 	{{0, 1688100628500}}, 	{{0, 
                  4879070750125}}, 	{{0, 8393781664125}}, 	{{0, 
                  14511384812925}}, 	{{0, 25121602774125}}, 	{{x}}, 	{{0, 
                  46172115770625}}, 	{{0, 61562821027500}}, 	{{0, 
                  81262923756300}}, 	{{0, 106266900296700}}}, 
{{{0, 
                  2035800}}, 	{{1, 1}, {0, 18322199}}, 	{{1, 1}, {0, 
                  91610999}}, 	{{0, 335907000}}, 	{{0, 1007721000}}, 	{{0, 
                  2620074600}}, 	{{0, 6113507400}}, 	{{0, 
                  13100373000}}, 	{{0, 26200746000}}, 	{{0, 
                  49490298000}}, 	{{0, 89082536400}}, 	{{0, 
                  153869835600}}, 	{{0, 256449726000}}, 	{{0, 
                  414264942000}}, 	{{0, 650987766000}}, 	{{0, 
                  998181241200}}, 	{{0, 1497271861800}}, 	{{0, 
                  2201870385000}}, 	{{0, 3180479445000}}, 	{{0, 
                  9448361690625}}, 	{{0, 15987796850025}}, 	{{0, 
                  27160457492025}}, 	{{0, 46172115770625}}, 	{{x}}, 	{{0, 
                  82975976167500}}, 	{{0, 109528288541100}}, 	{{0, 
                  143229300399900}}}, 
{{{0, 2629575}}, 	{{0, 
                  23666175}}, 	{{0, 118330875}}, 	{{0, 433879875}}, 	{{0, 
                  1301639625}}, 	{{0, 3384263025}}, 	{{0, 
                  7896613725}}, 	{{0, 16921315125}}, 	{{0, 
                  33842630250}}, 	{{0, 63924968250}}, 	{{1, 1}, {0, 
                  115064942849}}, 	{{0, 198748537650}}, 	{{0, 
                  331247562750}}, 	{{0, 535092216750}}, 	{{0, 
                  840859197750}}, 	{{0, 1289317436550}}, 	{{0, 
                  1933976154825}}, 	{{0, 2844082580625}}, 	{{0, 
                  4108119283125}}, 	{{0, 5837853718125}}, 	{{0, 
                  17833311896400}}, 	{{0, 29709025889400}}, 	{{0, 
                  49647436312500}}, 	{{0, 82975976167500}}, 	{{x}}, 	{{0, 
                  146037718054800}}, 	{{0, 190972400533200}}}, 
{{{0, 
                  3365856}}, 	{{0, 30292704}}, 	{{0, 151463520}}, 	{{0, 
                  555366240}}, 	{{0, 1666098720}}, 	{{0, 
                  4331856672}}, 	{{0, 10107665568}}, 	{{0, 
                  21659283360}}, 	{{0, 43318566720}}, 	{{0, 
                  81823959360}}, 	{{0, 147283126848}}, 	{{0, 
                  254398128192}}, 	{{0, 423996880320}}, 	{{0, 
                  684918037440}}, 	{{0, 1076299773120}}, 	{{0, 
                  1650326318784}}, 	{{0, 2475489478176}}, 	{{0, 
                  3640425703200}}, 	{{0, 5258392682400}}, 	{{0, 
                  7472452759200}}, 	{{0, 10461433862880}}, 	{{0, 
                  32869250702145}}, 	{{0, 53956833784425}}, 	{{0, 
                  88784294499225}}, 	{{0, 146037718054800}}, 	{{x}}, 	{{0, 
                  252083568703824}}}, 
{{{0, 4272048}}, 	{{0, 
                  38448432}}, 	{{0, 192242160}}, 	{{0, 704887920}}, 	{{0, 
                  2114663760}}, 	{{0, 5498125776}}, 	{{0, 
                  12828960144}}, 	{{1, 2}, {0, 27490628878}}, 	{{0, 
                  54981257760}}, 	{{0, 103853486880}}, 	{{0, 
                  186936276384}}, 	{{0, 322889931936}}, 	{{0, 
                  538149886560}}, 	{{0, 869319047520}}, 	{{0, 
                  1366072788960}}, 	{{0, 2094644943072}}, 	{{0, 
                  3141967414608}}, 	{{0, 4620540315600}}, 	{{0, 
                  6674113789200}}, 	{{0, 9484266963600}}, 	{{0, 
                  13277973749040}}, 	{{0, 18336249462960}}, 	{{0, 
                  59260707596025}}, 	{{0, 95932993984425}}, 	{{0, 
                  155569317368400}}, 	{{0, 252083568703824}}, 	{{x}}}}\);

\(TableForm[
      results19782000, \  (*\ in\ a\ cleaner, \ tabular\ format; \ 
        prepare\ to\ scroll\ right\ *) 
TableAlignments -> {Right, Center, \ Right}, \  (*\ 
        tune\ these\ orientations\ to\ your\ liking\ *) 
TableHeadings -> {Map["home=", 
            Table[i, {i, 0, 26}]], 
          Map["road=", Table[i, {i, 0, 26}]]}]\)

The 1-0 victory by the home team

In the table directly above, the row "headers" correspond to the total game runs scored by the home team, while the column "headers" correspond to the total game runs scored by the road or visiting team. By way of an example, let us look at the "cell" corresponding to a home-team 1-0 victory:

TableForm[results19782000[[2, 1]]]

As we saw from the linescoresFinalscore table in the previous section, there are only nine possible line scores that correspond to a home-team 1-0 victory: A single run, scored in the bottom of the first, second, third, fourth, fifth, sixth, seventh, eighth, or ninth inning. In the two-column table that we've extracted from our all-inclusive table, the left column indicates the number of "mirror" games corresponding to a particular line score, while the right column indicates how many of those road/home team line scores occurred between 1978 and 2000, inclusive. To wit: There were 67 MLB regular-season 1978-2000 games in which the line score was:
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		0	0	0	0	0	0	0	0	0	-	0
HOME	0	0	0	1	0	0	0	0	x	-	1
This particular road/home team line score was the most-frequently occurring MLB regular-season 1978-2000 line score -- the only run in these 67 games was scored in the bottom of the fourth inning. The other cases corresponded to scoring the games' only run in the bottom of the first (60 games), ninth (58), sixth (56), third (48), second (47), fifth (44), seventh (42), and eighth (40) inning. Visco wrote that "Certainly line scores for 1-0 games have been duplicated" and he is indeed correct, both for home- and road-team 1-0 victories. Note the last row in our latest table, in which the entry in each column is zero: The zero in the left column denotes possible line scores for a particular final score that were NOT achieved in MLB regular-season 1978-2000 games; the zero in the right column indicates that all possible line scores for 1-0 home victories (1978-2000 regular seasons) had been achieved. Indeed: If you add up the numbers in the right column, your sum corresponds to the number in the linescoresFinalscore table in the previous section.

The 2-1 victory ... 698 of 810 possible line scores seen in 23 years

Visco also asserts that "Most, though possibly not all, line scores for 2-1 games have occurred more than once." Let us extract the following information from our all-inclusive table:

TableForm[{results19782000[[2+1,1+1]],results19782000[[1+1,2+1]]}]

For 1978-2000 MLB regular-season games, the 2-1 home-team victories feature two sets of nontuplets (in terms of road/home team line scores), two sets of octuplets, seven sets of septuplets, 19 sets of sextuplets, 24 sets of quintuplets, 32 sets of quadruplets, 79 sets of triplets, 111 sets of twins, 95 unique line scores with no "mirror" games, and 34 line scores that were possible for a 2-1 home-team victory but not realized for 1978-2000 MLB regular-season games. For said games, the 2-1 road-team wins feature one set of octuplets, four sets of septuplets, two sets of sextuplets, 17 sets of quintuplets, 23 sets of quadruplets, 55 sets of triplets, 106 sets of twins, 119 unique line scores with no "mirror" games, and 78 line scores that were possible for a 2-1 road-team victory but not realized in said games. For 2-1 home-team wins, note that there are 2+2+7+19+24+32+79+111+95+34=405 possible line scores, so (405-34)/405 = .916 have been achieved and (405-34-95)/405 = .681 have been achieved and mirrored; for 2-1 road-team wins, note that there are 1+4+2+17+23+55+106+119+78=405 possible line scores, so (405-78)/405 = .807 have been achieved and (405-78-119)/405 = .514 have been achieved and mirrored. A total of (405-34) + (405-78) = 698 road/home team line scores have been achieved. Also: In our 1978-2000 MLB regular-season games, the number of games in which the home team won 2-1 was 9*2+8*2+7*7+6*19+5*24+4*32+3*79+2*111+1*95+0*34=999 games, while the number in which the road team won 2-1 was 8*1+7*4+6*2+5*17+4*23+3*55+2*106+1*119+0*78=721 games. Technically at least, Visco's assertion is again correct, although 1) some possible line scores for 2-1 games were not seen even once in 23 years, 2) some were seen but never mirrored, and -- at the other end of the spectrum -- the line scores
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		0	0	0	0	0	0	0	1	0	-	1
HOME	0	0	0	0	0	0	0	0	2	-	2
and
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		0	0	0	0	0	0	1	0	0	-	1
HOME	0	0	0	2	0	0	0	0	0	-	2
occurred nine times each, and the line score
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		0	0	0	2	0	0	0	0	0	-	2
HOME	0	0	0	0	1	0	0	0	0	-	1
occurred eight times in those 23 years.

The 5-4 victory ... only one set of twin line scores seen in 23 years

Visco next asks "But what about a 5-4 contest? Or any game in which, say, nine or more runs have been scored? Have two such games ever resulted in identical line scores?" A look at our all-inclusive table reveals no mirror games (for 1978-2000 MLB regular-season play) among 9-0 road wins, 8-1 road wins, 7-2 road wins, 5-4 road wins, and 9-0 home wins. For 6-3 road wins, there were but two sets of twin road/home team line scores. For 5-4 home wins and 6-3 home wins, there was only one set of twin line scores in each case. There were three sets of twins in the 7-2 home win case, and two sets of twins in the 8-1 home win case. Since Visco asked first about identical line scores in 5-4 contests, let us show the single set of twin line scores in the case of the 5-4 home victories:
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		0	0	0	0	4	0	0	0	0	-	4
HOME	2	1	0	0	1	0	0	0	1	-	5
These aren't bad games: The home team stakes itself to a 3-0 lead after two innings; the visitors make it 4-3 after 4.5 innings but the hosts tie it 4-all after five; the tie continues until the home team secures a win in the bottom of the ninth. This twin line score is from 25 April 1987 (the White Sox defeated the Toronto Blue Jays in Chicago, with Bob James as the winning pitcher and Mark Eichhorn as the loser) and from 7 June 1991 (the Yankees defeated the Texas Rangers in New York, with John Habyan as the winner and John Barfield as the losing pitcher). There are 637,065 possible line scores for an 5-4 home-team victory in nine innings, and only 1002 actual 5-4 home wins in the 1978-2000 MLB regular seasons; as such, the game on 7 June 1991 that mirrored the 25 April 1987 game was improbable (though certainly not impossible) in that it occurred so relatively soon after 25 April 1987. With roughly 1002/23 = 43 1/2 5-4 home wins per season, with the mirror game occurring in just over four seasons after the basis game, and making the weak assumption that each of the 637,065 possible line scores for an 5-4 home team victory is equally likely, the rough probability of that particular mirror game occurring when it did (as soon as it did) was 43.5*4/637065, or roughly one in 4,000.

Largest run total in game with at least one pair of mirror games

It should be obvious by now that the greater the total number of runs scored in a game, the less the likelihood of finding mirror games. For 1978-2000 MLB regular-season play, the largest run total in a game with at least one pair of mirror games was twelve, by way of two 8-4 wins by the visiting team. The twin road/home team line score was as such:
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		1	0	0	1	0	0	1	1	4	-	8
HOME	3	0	0	0	0	0	0	1	0	-	4
The visitors open the scoring but their hosts secure a lead after one; the road team chips away, tying the game 3-all in the seventh and taking a 4-3 lead in the eighth; the home team ties the game 4-all in the bottom of the eighth; the road team explodes for four unanswered runs in the ninth to win the game 8-4. This twin road/home team line score is from 8 August 1979 (the Milwaukee Brewers defeated the Orioles in Baltimore, with Bill Travers getting the win and Don Stanhouse suffering the loss) and from 3 June 1988 (the Houston Astros defeated the Giants in San Francisco, with Dave Smith as the winning pitcher and Scott Garrelts the loser). There are 6,370,650 possible line scores for an 8-4 road-team victory in nine innings, and only 288 actual 8-4 road wins in the 23 seasons we covered; as such, the game on 3 June 1988 that mirrored the 8 August 1979 game was again improbable (though again certainly not impossible) in that it occurred so relatively soon after 8 August 1979. With roughly 288/23 = 12 1/2 8-4 road wins per season, with the mirror game occurring in less than nine full seasons after the basis game, and making the still-weak assumption that each of the 6,370,650 possible line scores for an 8-4 road team victory is equally likely, the rough probability of that particular mirror game occurring when it did (as soon as it did) was 12.5*9/6370650, or roughly one in 60,000 -- 15 times less likely than the aforementioned 5-4 home-team victory.

Consecutive mirror games

Our study primarily made use of the 1978-2000 MLB regular-season game results. A look at 2001 MLB regular- and post-season game results, however, unveils twin games played (almost) on consecutive days.  Consider this particular line score for a 5-0 road-team shutout:
TEAM	1	2	3	4	5	6	7	8	9		R
ROAD		0	0	0	3	0	1	0	1	0	-	5
HOME	0	0	0	0	0	0	0	0	0	-	0
In regular-season MLB action from 1978 through 2000, this line score occurred just once: On 19 September 1989, the St. Louis Cardinals visited and defeated the Montreal Expos in a game marked by this line score, with Bob Tewksbury defeating rookie Mark Gardner for his first win as a Cardinal. But recent data tell us that the (now moribund through possible contraction) Montreal Expos may have played its last game as a franchise by visiting and defeating the New York Mets by this line score, on 7 October 2001 (the final day of the 2001 regular season). Only two days later, on 9 October 2001 -- the first day of the 2001 Divisional playoff Series -- the Cleveland Indians visited and defeated the Seattle Mariners by this very same line score. Thus, after seeing this particular road/home team line score only once in 23 regular seasons and never in the last dozen years' worth of regular seasons, we see it as a twin line score in two consecutive days on which MLB games were scheduled. From our tables above, we know that this line score is but one of 1287 possible for a 5-0 road-team victory, and that 275 games in the 23 regular seasons from 1978 through 2000 ended in 5-0 road-team shutouts. The latter corresponds to an average of 275/23 = 12 games per season on average; we know from our 2001 data that there were 14 such games in 2001. There were three MLB games on 9 October 2001, and the probability of seeing a 9 October mirror line score to the 7 October Montreal-New York game was 3*(275/43,883)*(1/1287), or roughly one in 68,000.

Other Tables

The following table tells you how many games (ending with a won-loss decision in 8.5 to 9 innings) were played in MLB regular seasons from 1978 through 2000, inclusive, given a particular final score. If you add up the numbers in the following table, you get 43,883 games -- the total number of MLB regular-season games from 1978 through 2000 by our count.

TableForm[
      Table[
If[ii == jj, 
          0, 
Transpose[
                results19782000[[ii, jj]]][[1]] . Transpose[
                results19782000[[ii, 
                    jj]]][[2]]], 
{ii, 1, 27}, {jj, 
          1, 27}], 
TableAlignments -> {Right, 
          Center}, 
TableHeadings -> {Map["home=", 
            Table[i, {i, 0, 26}]], 
          Map["road=", Table[i, {i, 0, 26}]]}]

Using (appropriately enough for this MLB-oriented notebook) the Throw[] and Catch[] functions, we define a function to create a table that -- for each final score -- tells you how many tuplet-sets occurred during 1978-2000 MLB regular-season games for that final score. For example, fncx[0] reveals the number of all unrealized possible road/home team line scores for each final score, fncx[1] reveals the number of unique road/home team line scores for each final score, fncx[2] reveals the number of sets of twins, fncx[8] reveals the number of sets of octuplets, et cetera.

fncx[tuplet_] :=
Table[
Catch[Do[If[results19782000[[ii, jj, z, 1]] == 
                        tuplet,
 Throw[results19782000[[ii, jj, z, 2]]]],
{z, Length[results19782000[[ii, jj]]], 
                      1, -1}]; 0],
{ii, 1, 27},{jj, 1, 27}]

Adding the entries in the following table yields 37,313 unique games (in terms of road/home team line scores) from the set of 1978-2000 MLB regular-season games.

TableForm[
      fncx[1], 
TableAlignments -> {Right, 
          Center}, 
TableHeadings -> {Map["home=", 
            Table[i, {i, 0, 26}]], 
          Map["road=", Table[i, {i, 0, 26}]]}]

Since fncx[w] reveals the number of sets of w-tuplets for each possible final score, then the product w*fncx[w] reveals the number of games in those sets. By computing the sum of this product over each value of w from 2 through 67 (the maximum tuplet, corresponding to 1-0 home-team wins with the single run occurring in the bottom of the fourth) in steps of one, we get the number of mirror games during 1978-2000 MLB regular-season play. Adding each value from the following table produces 6570 mirror games.

TableForm[
      Sum[w*fncx[w],  {w,  2,  
          67}], 
TableAlignments -> {Right, 
          Center}, 
TableHeadings -> {Map["home=", 
            Table[i, {i, 0, 26}]], 
          Map["road=", Table[i, {i, 0, 26}]]}]