Algorithm for optimum design of space trusses