How about an extreme version of the sort problem. Suppose x is a vector of bits (such as they have in APL). How do you sort x?
This would have been one way to solve the sorting small integers problem: figure out how to sort 0-1 vectors and then work your way up from that. I once posed the 88 Hats Problem<http://www.jsoftware.com/jwiki/Essays/88_Hats>to a very smart and very persistent intern. He solved it by generalizing a solution to the 2 Hats problem. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm