Need help checking for path among connected dots.

shant93

Member
Messages
119
Reaction score
0
Points
16
This probably doesn't belong here, but anyways.

I'm making a web app based on a game thought up by John H. Conway in which, on an undirected complete graph of n-points, two players alternate to direct the connection between two vertices. The first to complete a Hamiltonian path loses.

Terms:

Undirected complete graph of n-points:
Any number points where each one is connected to every other one.
(Play around with this for numbers between 3 and 15 http://gdex.tk/cont/?i=0003)

Directing a connection between two vertices:
Making an arrow between two points to make the connection directional.
(Click two points on the previous link. The arrows look terrible, I know, i'm working on that)

Hamiltonian path:
A path that passes once, and only once, through every point on the graph.

What I need to know is, how could I check if it is a Hamiltonian path in script? Is there a simple way of checking and could you explain the theory behind it?

(I realise this is more of a math question than a programming question, but i am pretty sure there are multiple ways of doing this, and i have nowhere else to ask...)
 
Last edited:
Top