Added comment for is_hamiltonian