Having looked long at this how does the prime factorization play into this.
I would consider an approach similar to factoring a number. Of course the
issue with prime factoring is your ned to know the primes. I assume this
would be a similar problem you may need to know the solutions to the
factors. I might look closer at this please post if you come across a
solution.
Thanks
Vincent Davis
720-301-3003


On Fri, Feb 20, 2009 at 7:31 AM, Trip Technician <luke.d...@gmail.com>wrote:

> anyone interested in looking at the following problem.
>
> we are trying to express numbers as minimal expressions using only the
> digits one two and three, with conventional arithmetic. so for
> instance
>
> 33 = 2^(3+2)+1 = 3^3+(3*2)
>
> are both minimal, using 4 digits but
>
> 33 = ((3+2)*2+1)*3
>
> using 5 is not.
>
> I have tried coding a function to return the minimal representation
> for any integer, but haven't cracked it so far. The naive first
> attempt is to generate lots of random strings, eval() them and sort by
> size and value. this is inelegant and slow.
>
> I have a dim intuition that it could be done with a very clever bit of
> recursion, but the exact form so far eludes me.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to