I'm looking at the double bridge algorithm in the context of an iterated-local search algorithm, which is a 4-opt move, which can't be easily reverted by a 3-Opt or a Lin Kernighan algorithms (two of the mostly used local search algorithms).There's an implementation in the Ruby programming language of the iterated-local search algorithm along with the double bridge move by Jason Brownlee here. Its implementation of the double bridge goes like this:def double_bridge_move(perm)    pos1 = 1 + rand(perm.size / 4)    pos2 = pos1 + 1 + rand(perm.size / 4)    pos3 = pos2 + 1 + rand(perm.size / 4)    p1 = perm[0...pos1] + perm[pos3..perm.size]    p2 = perm[pos2...pos3] + perm[pos1...pos2]    return p1 + p2endwhich doesn't seem to be the conventional algorithm illustrated with the following picture:What's the relation between the algorithm implemented by J. Brownlee and picture above? Are the two algorithms equivalent? Why would he just find pos1, pos2 and pos3 starting from a number in the first quater (i.e., rand(perm.size / 4))?
Double Bridge Move's implementation by splitting in 3 parts
artificial intelligence;search algorithms;traveling salesman