Optimal allocation of wire