The one-commodity pickup and delivery travelling salesman problem on a path or a tree