  The role of an expert in the decision-making process is crucial, as the final
recommendation depends on his disposition, clarity of mind, experience, and
knowledge of the problem. However, the recommendation also depends on their
honesty. But what if the expert is dishonest? Then, the answer on how difficult
it is to manipulate in a given case becomes essential. In the presented work,
we consider manipulation of a ranking obtained by comparing alternatives in
pairs. More specifically, we propose an algorithm for finding an almost optimal
way to swap the positions of two selected alternatives. Thanks to this, it is
possible to determine how difficult such manipulation is in a given case.
Theoretical considerations are illustrated by a practical example.
