See in the J Wiki the essay: http://www.jsoftware.com/jwiki/Essays/Nonincreasing_Odometer
See the following related problem in MathsChallenge.Net: http://projecteuler.net/index.php?section=view&id=113 ----- Original Message ----- From: Eugene McDonnell <[EMAIL PROTECTED]> Date: Saturday, January 27, 2007 7:12 pm Subject: [Jprogramming] Puzzle > Suppose we have the six digits 0 1 2 3 4 5, and we wish to have a > table of all length-5 non-decreasing sequences from 0 0 0 0 0 > through 5 5 5 5 5. There are 252 rows if I have counted correctly. > > I believe row 100 is 0 2 2 5 5, and row 200 is 2 2 3 3 3. > > Is there a simple way to create this table? > > Building the table of 6^6 rows and five columns and winnowing it > down > is not permitted. > > Eugene ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
