The algorithm checks the mutation probability Pm to determine if mutation shall take place. Then the algorithm randomly obtains a mutation position after the source and prior to the destination node. The segment between the source node s and the node at the mutation position is kept, and the BFS algorithm is applied to find valid nodes until the destination node. So, the algorithm enables population diversity.