Longest-path rotation (source code)

= Longest-path rotation

If an endpoint of a longest path is adjacent to an internal vertex, replacing the incident path edge by that chord produces another longest path with the same vertex set and a new endpoint. Every neighbour of every endpoint obtained this way must remain on the original path.

This rotation technique is used in arguments surrounding <Pósa's theorem> and other <Hamiltonian cycle> criteria.