Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 1.21 KB

README.md

File metadata and controls

15 lines (11 loc) · 1.21 KB

hamiltonian-win-cycles

Find and graphically illustrate a Hamiltonian cycle in a graph where wins are directed edges. A Hamiltonian win cycle is a closed loop that includes exactly one win by all teams in a league: A beat B beat C ... Z beat A.

All the code is in the nb-file. It is very simple, based on built-in functions FindHamiltonianCycle and Graph. Evaluating the whole notebook in Mathematica recreates the example output. The example input is the match data from Premier League season 2023-24, up until 2023-11-06, which is when the earliest Hamiltonian cycle of the season (in any of the Top 5 leagues) was completed.

Example output

Example Hamiltonian win cycle graph Earliest Hamiltonian win cycles in the Premier League 2023-24 appeared on 11-06. There were 25, this is a random choice.

Here is the part of the example input that shows up as the displayed Hamiltonian win cycle: CSV file