On Dec 14, 2007 7:47 PM, John Randall <[EMAIL PROTECTED]> wrote:
> Finally, for this type of problem I prefer breadth first search.  The
> rules prescribe depth first search, since you are required to be able
> to deliver fewer than the complete set of solutions.  With breadth
> first you know them all as soon as you know any.  This is a gripe, but
> immaterial compared with the problems above.

You can satisfy this requirement with breadth first searching: find the
full set of solutions and then return the required number.

Of course, this also has implications for execution time.

That said, I would not worry about "showing up J".  First off, if you
post your solution, other people can play around with it.  Also, if there
are areas in J which deserve improvement (are simple, general, and
should be at least an order of magnitude faster), Roger might even
spruce up the relevant part of the engine at some point in the
future.  Finally, given that our current execution time is infinite,
for this benchmark, I don't think you can make things slower.

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to