A tournament is a complete, directed graph, such that given any two vertices, u and v, there exists a directed edge between them (if u won over v, then the edge is from u to v).
A Hamiltonian Path always exists in a tournament. So given adjacency lists in the form {u:[v,w],v:[w]} where there is a directed edge from u to w, u to v, and v to w, how do I find what the Hamiltonian Path is and print the veritces in order?
Even if you don't know python or whatever, just the algorithm would be very helpful. I've thought about it, and I suppose I have to start with the vertex of highest out degree? Then add the vertex with the second highest degree etc till the vertex with the lowest degree. But I don't see how this is a fail safe method, the vertex with the highest degree could have been beaten by the vertex with the second highest.
Thank you for any help in advance!