In reply to Ksharp.

Nice! Thanks for sharing. I originally wrote a paragraph about how to solve this problem by using more sophisticated methods, but I decided to delete it to make the article shorter. When I first saw the problem, I thought I could formulate it as a constrained linear programming problem. However, I realized that there is no objective function, only the constraints. However, as you have pointed out, the CLP solver in SAS/OR enables you to obtain solutions that satisfy the constraint without specifying an objective. I might blog about this problem in the future; I don't think the CLP solver is as well known as it should be.