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 1999

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

Search the Archive

Re: Re: Numbers problem

  • To: mathgroup at
  • Subject: [mg19597] Re: [mg19524] Re: [mg19520] Numbers problem
  • From: "Andrzej Kozlowski" <andrzej at>
  • Date: Sat, 4 Sep 1999 01:34:29 -0400
  • Sender: owner-wri-mathgroup at

Yes, I was a bit puzzled that you did no thave any index variable, which 
does the main "accounting" of which cases have been checked in the original
Backtrack. You obviously need something like it.

Clearly your version is  faster in checking individual cases but in general
it will only be faster when no solutions exist for then each program has to
test tall of them before exiting.


>From: "Allan Hayes" <hay at>
To: mathgroup at
>To: "Andrzej Kozlowski" <andrzej at>
>Subject: [mg19597] Re: [mg19524] Re: [mg19520] Numbers problem
>Date: Fri, Sep 3, 1999, 12:27 AM

> Andrzej,
> I realized after posting that my Backtrack2 does not backtrack - it tries
> everything at each level. So it will be usefull in finding all solutions but
> not in finding a few.
> Allan
> ---------------------
> Allan Hayes
> Mathematica Training and Consulting
> Leicester UK
> hay at
> Voice: +44 (0)116 271 4198
> Fax: +44 (0)870 164 0565
> ----- Original Message -----
> From: Andrzej Kozlowski <andrzej at>
To: mathgroup at
> To: Allan Hayes <hay at>; <mathgroup at>
> Sent: 02 September 1999 14:57
> Subject: [mg19597] Re: [mg19524] Re: [mg19520] Numbers problem
>> Thanks Allan. It's indeed an elegant and worthwhile improvement. I did not
>> realize that the Combinatorica packge has not been updated since v. 1.2 :
> it
>> is remarkable that it still is working so well. (Since backtracking is
> such
>> a useful and important technique I think Backtrack ought to be optimized
> and
>> compiled as a built in fuction).
>> Your new Backtrack is certainly fast and elegant. I will try to use it as
> a
>> replacement for the original Bactrack in Combinatoorica: it should speed
> up
>> some other functions which depend on it and seems very unlikely to break
>> anything. Still, I must admit that elegant  "high level" Mathematica
>> functions have one draw-back: it seems to me that the original program, in
>> spite of being longer, is rather easier to understand.
>> Andrzej
>> --
>> Andrzej Kozlowski
>> Toyama International University

  • Prev by Date: Question about evaluation with Sum
  • Next by Date: Re: Re: Numbers problem
  • Previous by thread: Re: Re: Numbers problem
  • Next by thread: Re: Re: Numbers problem