Optimization of redundancy in branched water distribution systems