The newspapers here are full of news that the Pittsburgh Pirates (Major League Baseball) have broken a twenty-year reign of mediocrity by guaranteeing a non-losing season. Since they have won 81 games in a 162 game season, that seems self-evident.
But those of us in operations research know enough to check out the details before leaping to a conclusion. Consider the following situation:
1) The Pirates proceed to lose all their remaining games to end up at 81-81.
2) St. Louis and Cincinnati pass the Pirates, to win the division and the first wild-card.
3) Arizona ends up at 81-81 also, with all other teams (except division winners) with a worse record.
The Pirates would then play Arizona a one-game tie-breaker to determine who the second wild-card team is. Suppose (horrors!) they lose again. Where does the game count? It turns out that tie-breaking games count in the regular season records, as Wikipedia confirms. So Pittsburgh would end up 81-82, for another losing season. Note that it has to be a one-game tie-breaker: subsequent playoff games are not included in regular season records.
I don’t think anyone is losing sleep over this possibility. But a correct computer system for determining clinching of non-losing seasons would have to take this into account. Having worked on such a system for another professional sports league, I can assure you that all the difficulty is in these near (but not quite) impossible events. 99% of the code handles cases that have never occurred, and are unlikely to occur in our lifetimes.
Note that if Pittsburgh wins one more game, then they are guaranteed a winning season: a tie-breaker can’t turn their record into a losing (or .500) season.
Update 9/9: With the win tonight, the Pirates guarantee a winning season. Now the streak is truly broken! Go Bucs!