Optimal allocation algorithm for a multi-way - CROS