An Efficient Algorithm for Output Set Assignment in Large Scale Systems