Minimizing sum of Manhattan distances...

...between node weight and number of paths which contain that node.