Skip to content

Find and graphically illustrate a Hamiltonian cycle in a graph where wins are directed edges

Notifications You must be signed in to change notification settings

tervio/hamiltonian-win-cycles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Find and graphically illustrate a Hamiltonian cycle in a graph where wins are directed edges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published