The answer is
or approximately ways.
I was inspired to solve this problem while sitting at Outback Steakhouse. The television at the bar displayed the final score for a basketball game: 83 to 74. Though I don't pay much attention to sports, I pretty well know the basic rules for the most popular ones. So I wondered how many ways there were for that game to have played out since I saw only the final score. Here is what I came up with:
There are two ways I know of to get the answer. One is a simple (though kinda ugly) counting function involving a few summations. The second is my professor's solution using a recursive formula.
For the first method, we will equate the problem to counting the number of ways to rearrange 1-pointers, 2-pointers, and 3-pointers by team A with 1-pointers, 2-pointers, and 3-pointers from team B. That is, if and are the final scores for team A and team B, respectively, then for each solution to the system
we want to count the number of ways to rearrange the total number of plays, , taking into account that are identical elements. Then, we add the number of rearrangements of each solution over all solutions to get our answer. Well, for each solution we have arrangements of the elements, then we need to divide out the different arrangements of each set of identical elements, obtaining the total number of unique arrangements for each solution to be
Now we want to sum this over all possible solutions to the system of equations above. We achieve that with the following rather elementarily derived quadruple summation
This runs through all solutions to the given system where for any given , and . Substituting these expressions for and gives us the total number of ways a basketball game could have happened given final score to to be
Using gives us the solution to the original question. To get that solution requires a math package that can deal with arbitrary size integers. I used PARI/GP as it is open source, handles arbitrary size integers, and I use it a lot, but other packages can be used such as Maple, Mathematica, etc. Some math packages will not be able to handle the size of the number, such as Matlab.
The recursive solution comes from the idea that given the score , the last score could have been a , , or pointer by team or team . Thus,
for and , where and This is like a two-dimensional version of the Tribonacci sequence. In fact, is the Tribonacci sequence.
The following table displays the values for . Implemented in a computer program, one can very quickly build a matrix of all possible scores for any realistic basketball game. Of course, still gives us the same answer as above.