
Patrick B. answered 03/15/21
Math and computer tutor/teacher
It's actually 31+30+29+28+...+3+2+1
= 31*32/6 <-- sum of the 1st N integers
= 496
starting with the New England Patriots, they have 31 possible opponents;
then, moving onto the New York Jets, they have 30 possible opponents;
then with respect to the Buffalo Bills, they have 29 possible opponents;
finally, the Miami dolphins will have 28 possible opponents;
<done with AFC East>
For the AFC North, the Pittsburgh Steelers will have 27 opponents, the
Baltimore Ravens shall have 26, the Cleveland Brown 25, and the Cincinnati Bengals 24;
continuing with this line of reasoning and logic there are
31+30+29+28+....+3+2+1 =
31*32/2 <--- formula for the sum of the 1st N integers
31*16 =
(30+1)*16 =
480 + 16 =
496
In the RESOURCES section,
I have uploaded the code for you as well as the output file which lists
all 496 possible match-ups
Code is written in Java:
First, put the team names in an array like this:
String nflTeams[] = {"New England Patriots",
"Buffalo Bills",
"Miami Dolphins",
"New York Jets",
"Pittsburgh Steelers",
...
"San Fransisco 49ers",
" Arizona Cardinals",
"Los Angeles Rams",
"Seattle Seahawks"};
the pseudo-code for the main for loop is:
for (int iLoop=0; iLoop<32; iLoop++)
{
for (int jLoop=1; jLoop<32; jLoop++)
{
outbuff = nflTeams[iLoop] + " vs " +nflTeams[jLoop] + "\n";
write to file (outbuff);
}
}
The output file does contain 496 lines...
It is in the RESOURCES section whose description is this link.
enjoy