I have $n$ items arranged on a straight line (like a number line, items can only move 2 directions). The each item has a size, some distance around their center position, that can't overlap with other items. They also cannot cross each other.
We have a set $S$ of positions (of size $\leq n$). We need to find a way to move the items, so that after the movement each position in $S$ has one item there. (There might be other items at other positions as well.) The goal is to minimize the total movement of all items. Is there an efficient algorithm to find the way to move the objects that minimizes this?