Traveling salesman problem with disconnected cities / infinite length edge
You're just trying to find Hamiltonian cycles in unweighted graphs. That's still NP-complete.

If you want to do it with a TSP solver, do it as follows. Suppose you have a graph on $n$&nbsp;vertices. These are your $n$&nbsp;cities. If there's an edge between two vertices, set the distance between the corresponding cities to&nbsp;$1$. If there's no edge, set the distance to&nbsp;$2$. If a minimum-weight TSP solution has total weight&nbsp;$n$, it's a Hamiltonian cycle of the original graph; if it has weight $n+1$ or more, then every cycle that visits all cities must include at least one non-edge of the graph, so the graph has no Hamiltonian cycle.