>>>>> "Arnaud" == Arnaud Delobelle <[EMAIL PROTECTED]> writes:
Arnaud> Sorry I gave an incorrect example to illustrate my question last Arnaud> night (I blame this on baby-induced sleep deprivation ;), so I'll Arnaud> have another go: Arnaud> Say I have 2, 3, 4, 100 and I want to make 406. AFAICS there is only Arnaud> one way: (2*3)+(4*100), i.e. in postfix notation: Arnaud> 2 3 * 4 100 * + Arnaud> It seemed to me that your function wouldn't generate that sort of Arnaud> solution (as you always extend partialSolution by [num, op] making Arnaud> the subsequence [mul, add] impossible). Am I wrong? No, you're right. I actually started out with a stack solution, and then switched to something simpler (too simple). I'm going to redo it, but maybe not right now... Thanks! Terry -- http://mail.python.org/mailman/listinfo/python-list