Solution. It is clear that exactly one of the numbers a1 and b20 is 20. Without loss of generality, we can take a1=20. Let, for example, ai+1−ai≥2 for some i∈{1,2,…,9} and let j be such that bj=ai+1. The sets A′={a1′,a2′,…,a10′} and B′={b1′,b2′,…,b10′} where ak′=ak(k=i),ai′=ai+1, bk′=bk(k=j),bj′=bj−1 are disjoint subsets of {1,2,3,…,20} and it holds
∣a1′−b1′∣+∣a2′−b2′∣+…+∣a10′−b10′∣=∣a1−b1∣+∣a2−b2∣+…+∣a10−b10∣
After a finite number of such steps, we arrive at the case a1=20,a2=19,…,a10=11, b1=1,b2=2,…,b10=10 where it holds
∣a1−b1∣+∣a2−b2∣+∣a3−b3∣+…+∣a10−b10∣=19+17+15+…+1=100