If you've ever tried to untangle a pair of earbuds, you'll understand how loops and cords can get twisted up. DNA can get tangled in the same way, and in some cases, has to be cut and reconnected to resolve the knots. Now a team of mathematicians, biologists and computer scientists has unraveled how E. coli bacteria can unlink tangled DNA by a local reconnection process. The math behind the research could have implications far beyond biology.