A new control algorithm for multistage interconnection networks