An algorithm for optimum structural design using duality