On locating path- or tree-shaped facilities on networks