There are 17 people. They each belonged to four groups previously. Group 0 had five people: 0 1 2 3 4
Group1 had four people: 5 6 7 8 Group2, ditto: 9 10 11 12 Group3, ditto: 13 14 15 16 I wanted to shuffle them into new groups. But there were some constraints. If possible, every person should move into a new group. For example, person 16 should not stay in the group 3. (The groups have physical locations, uh tables, and I want to change people's location) It is preferable that the people meet new people at their new groups. Meeting just one person in the previous grouping wouldn't be too bad. Person number 0, 5, 9, 10, 13, 14, 16 should be well distributed among the groups. It is preferable that person number 1, 6, 10, 16 go into each team; that is, if possible, each of them should be in different groups and well distributed among the four groups. This was a real problem I encountered a few days ago and I solved it with pencil and paper. I'd like to solve it using J but can't think of a good way of solving this kind of constraints problem in J. Any suggestions? June ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
