Ruby implementation of the Kernighan–Lin algorithm http://en.wikipedia.org/wiki/Kernighan%E2%80%93Lin_algorithm