In mathematics, a Hamiltonian path in a graph is a path that visits each vertex precisely once. A Hamiltonian cycle is a cycle which visits each vertex once and only once.
This type of path is named after William Rowan Hamilton who invented a puzzle, now known as Hamilton's puzzle, about the construction of such paths.