Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: A friendly challenge: Generalized Partition

  • To: mathgroup at
  • Subject: [mg34932] Re: A friendly challenge: Generalized Partition
  • From: gleam at ("Mr. Wizard")
  • Date: Thu, 13 Jun 2002 02:38:23 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Since it seems you're all coming up with code pretty much identical to
mine, as well as to each other's, I see no point in waiting to post
the code I had previously arrived at.  My fastest was:


And and shortest:


I compiled the larger part of the first function shortly before posing
this challenge, but doesn't seem to have provided any real advantage,
so I am going back a version without it for my own use.  I was using
length and sum checking to replicate some of the functionality of
ggCheckArgs, in this final form:


a more secure check, as (roughly) suggested by Hartmut Wolf, would be:



  • Prev by Date: Re: PolynomialQ ?
  • Next by Date: Re: Re: which Linux does Mathematica run on?
  • Previous by thread: Re: A friendly challenge: Generalized Partition
  • Next by thread: Re: Re: A friendly challenge: Generalized Partition