football2_diophantine


football2_diophantine, a Python code which uses Diophantine methods to find the number of ways a given score of N points can be achieved in football, with scoring opportunities of 2, 3, 4, 6, 7, and 8 points, ignoring the order of events.

For instance, to get a score of 14, there are 11 ways, if we ignore the order in which opportunities are achieved:

  1: 8 + 6
  2: 8 + 3 + 3
  3: 8 + 2 + 2 + 2
  4: 7 + 7
  5: 7 + 3 + 2 + 2
  6: 6 + 6 + 2
  7: 6 + 3 + 3 + 2
  8: 6 + 2 + 2 + 2 + 2
  9: 3 + 3 + 3 + 3 + 2
 10: 3 + 3 + 2 + 2 + 2 + 2
 11: 2 + 2 + 2 + 2 + 2 + 2 + 2

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

football2_diophantine is available in a Python version.

Related Programs:

python_combinatorics, a Python code which considers a variety of problems in combinatorics involving counting, combinations, permutations, and so on.

Reference:

Source Code


Last revised on 05 February 2023.