An iron bead is attatched to a fragment complementary to the second city. A magnetic field is then used to pull out all of the DNA fragments containing this city code. Those not containing it are discarded. This process is repeated for all other cities in the path. At the end, each remaining fragment must contain one copy of the code for each city. Since each all of the connections formed were legal (because they were facilitated by "flight" fragments), each fragment that passed the PCR test starts and ends at the right place, each fragment that passed the gel electrophoresis test has the right number of cities, and each fragment that passed the magnetic ball test has one of each cities, the remaining paths must be Hamiltonian!