Observe that a sequence of adjacent task swappings needed from \(\Gamma _{\pi _1}^{S(n)}\)  to reach \(\Gamma _{\pi _2}^{S(n)}\)  in Algorithm  corresponds to a path from vertex \(\pi _2^{-1}\pi _1\)  to vertex \(I\)  in a star graph \(\text{ST}_n\) . Therefore, an upper bound of the minimum number of adjacent task swappings needed from \(\Gamma _{\pi _1}^{S(n)}\)  to reach \(\Gamma _{\pi _2}^{S(n)}\)  in Algorithm  is the diameter of a star graph \(\text{ST}_n\) , which is \(\lfloor 3(n-1)/2\rfloor \)  [1]}, [2]}.
