As the end of the season approaches, baseball fans like to engage in speculation about which teams will advance to the post season and whether their favorite team is still in contention for a playoff berth. Newspapers frequently run headlines in their sports sections declaring that a particular team has been eliminated from contention or that the first place team has clinched a playoff berth. These determinations can often be made by looking at the standings and making a few simple calculations. The RIOT baseball standings can actually tell you when a team has locked up a playoff spot or fallen out of contention days before it is reported anywhere else!
The key is taking into account the actual matchups that remain in the season and
enumerating all possible outcomes. Until the final weeks of the season, however, the number
of possible outcomes can be astronomically large, which makes such an
enumeration impractical even on a very fast computer. By using a powerful and pervasive
analytics technique called Network Optimization, it is possible to
accurately perform the necessary calculations without explicitly enumerating all
possibilities. Consequently, it is possible for RIOT to determine the playoff prospects of
a team a few days, or even weeks, before it is reported by the popular media.
The following example, using the American League standings on the morning of Wednesday, September 5, 2012 shows how
Since Baltimore and New York are tied for first place in the AL East with identical records, neither team has a traditionally calculated magic number. However, if either team wins 26 of their remaining 27 games, they will clinch first place. This is because they still have a four-game series left on the schedule. For example, suppose Baltimore wins 26 more games. That would have to include at least three wins against New York. The final win totals in this scenario would be 102 for Baltimore, and at most 100 for New York. Therefore, RIOT reports that Baltimore has a first place clinch number of 26. Using the same logic, New York's first place clinch number is also 26.
Tampa Bay does not have a traditional magic number because they are not in first place. However, they have a four-game series left with New York, and a six-game series left with Baltimore. If they win all 26 of their remaining games, then they will win the division with 101 wins while New York has at most 99 wins and Baltimore has at most 97. Therefore, RIOT reports that Tampa Bay's first place clinch number is 26.
Chicago can clinch first place in the AL Central with 100 wins because Detroit's best possible win total at end of the season is 72+27 = 99.
Since Chicago already has 73 wins, their traditionally calculated magic number is 100 - 73 = 27.
It's easy to see that Chicago can clinch first place by winning all 27 of their remaining games, but they really only need to win 25 to clinch because they still have a four-game series with Detroit left on their schedule. If they split that series, and both teams win all of their other remaining games, then Chicago will finish the season with 98 wins to Detroit's 97. Therefore, RIOT reports that Chicago's first place clinch number is 25.
If Detroit wins 26 of their remaining 27 games, that would have to include at least three wins against Chicago. In this scenario, Detroit would win the division with 98 wins while Chicago would finish the season with at most 87. Therefore, Detroit's first place clinch number is 26.
Texas can clinch first place in the AL West with 104 wins because Oakland's best possible win total at the end of the season is 76+27 = 103.
Since Texas already has 80 wins, their traditionally calculated magic number is 104 - 80 = 24.
But, Texas really only needs to win 22 more games to clinch the division because they still have a seven-game series against Oakland left on their schedule.
If they win 22 out of their remaining 27 games, that would have to include at least two wins against Oakland. The final win totals in this scenario would be 102 for Texas, and at most 101 for Oakland. Therefore, RIOT reports that Texas has a first place clinch number of 22. Using similar logic, RIOT reports that Oakland's first place clinch number is 26.
In another example, RIOT's standings page for the National League on the morning of August
Houston had already been eliminated from the playoffs even though it wasn't obvious from their won-lost record.
It is easy to see from the standings above that Houston is eliminated from first place in the NL Central. If Houston were to win all 32 of their remaining games, they would finish with 72 wins. But, Cincinnati has already won 80 games; so no matter what else happens in the season, Cincinnati will finish ahead of Houston in the NL Central. However, the fact that Houston has also been eliminated from reaching the postseason as a wild card team is not readily apparent from the standings.
Since Washington, Atlanta, Cincinnati, and San Francisco already have better records than Houston, their only chance for the playoffs is to clinch the second wild card spot. St. Louis is currently in the lead for that spot with 71 wins. Since Houston still has a chance, however remote, of finishing the season with 72 wins, it looks as though they could still make the postseason as a wild card team. A closer look at the schedule, however, reveals that even a miracle winning streak would not allow Houston to make the playoffs.
Los Angeles, who have 70 wins so far, and St. Louis still have a four-game series to play before the end of season. There are no ties in baseball, which means that at least one of these teams will finish with at least 73 wins. If St. Louis wins two or more games in the series, then they will finish the season with at least 73 wins; and if they win one or zero of those games, then Los Angeles will finish with at least 73 wins. Either way, Houston is eliminated from the playoffs because there will be at least five teams in the National League with better records at the end of the season.
Determining that a particular team has been eliminated can often be much more difficult than it is in this example. Follow this link for a more complicated example involving all the teams in the American League East.
For more information on the integer programming formulations and implementation of the RIOT baseball standings, send mail to the RIOT Baseball Project and see our paper "Baseball, Optimization and the World Wide Web", which appeared in the March/April 2002 issue Interfaces.
 B. Schwartz. "Possible winners in partially completed tournaments." SIAM Review. 8:302-308. 1966
 L. W. Robinson "Baseball playoff eliminations: An application of linear programming." Operations Research Letters. 10:67 -74. 1991
 D. Gusfield and C. Martel. "A Fast Algorithm for the Generalized Parametric Minimum Cut Problem and Applications." Algorithmica. 7:499 -519. 1992