> It seems to me that is also very similar to what Roger Hui was describing.
Uhh... yes, I see that now. Marshall's is the binary digit counterpart of Roger's decimal-digit-based method. It's easier to see if I transpose the array formed by successive steps and render the numbers in binary form. Then you see the 1s in each column sink to the bottom in turn, starting with the rightmost... _ __ 9 4 6 2 0 5 3 8 1 7 1 __ 4 6 2 0 8 9 5 3 1 7 2 __ 4 0 8 9 5 1 6 2 3 7 4 __ 0 8 9 1 2 3 4 5 6 7 8 __ 0 1 2 3 4 5 6 7 8 9 ┌────┬────┬────┬────┬────┐ │1001│0100│0100│0000│0000│ ├────┼────┼────┼────┼────┤ │0100│0110│0000│1000│0001│ ├────┼────┼────┼────┼────┤ │0110│0010│1000│1001│0010│ ├────┼────┼────┼────┼────┤ │0010│0000│1001│0001│0011│ ├────┼────┼────┼────┼────┤ │0000│1000│0101│0010│0100│ ├────┼────┼────┼────┼────┤ │0101│1001│0001│0011│0101│ ├────┼────┼────┼────┼────┤ │0011│0101│0110│0100│0110│ ├────┼────┼────┼────┼────┤ │1000│0011│0010│0101│0111│ ├────┼────┼────┼────┼────┤ │0001│0001│0011│0110│1000│ ├────┼────┼────┼────┼────┤ │0111│0111│0111│0111│1001│ └────┴────┴────┴────┴────┘ I hadn't looked closely enough at Roger's informal algorithm, deciding too-quickly it was the "naive" algorithm I originally gave, generalized to multiple fields. On Wed, Aug 15, 2012 at 2:21 PM, Raul Miller <[email protected]> wrote: > On Tue, Aug 14, 2012 at 9:32 PM, Ian Clark <[email protected]> wrote: >> Very nice, Marshall. That's just the sort of solution I was feeling towards. > > It seems to me that is also very similar to what Roger Hui was describing. > >> I agree in principle with Raul -- a first pass is necessary to read >> the numbered cards into the computer in the first place, so notionally >> you must add 1 to any total of passes. But I wasn't thinking of this >> as forming part of the actual algorithm. > > If the human can supply sufficient summary information (which might be > roughly equivalent, from an algorithmic point of view, to constraining > the problem) this initial step would not be needed. > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
