Given a sequence , let be a sequence obtained by rearranging the terms of . The total self-variation of relative to is . On the other hand, let be a connected graph and be a permutation of . The total relative displacement of is , where means the distance between and in . It’s clear that the total relative displacement of is a total self-variation relative to the distance sequence of the graph.
In this paper, we determine the sequences which attain the maximum value of the total self-variation of all possible rearrangements relative to . Applying this result to the distance sequence of a graph, we find a best possible upper bound for the total relative displacement of a graph.