Hmm, 88 is a heavy one - I solved it with putting all factors of a number into an array (hint: 15 factors are enough) and starting a recursive procedure which 'mixes' all factors to check all resulting product-sum lengths.mike74 wrote:A question that occurred to me while thinking about Problem 88: What is the best way to get a number's unique factorizations
So, for 32 (=2x2x2x2x2) there are a lot of possibilities:
- 32
- 16 x 2
- 8 x 4
- 8 x 2 x 2
- 4 x 4 x 2
- 4 x 2 x 2 x 2
- 2 x 2 x 2 x 2 x 2
My idea to get these variations was to assign 'group numbers' to each factor. The first line above (32) means, that all factors have been assigned to a single group, the second (16 x 2) that 4 factors have been given into group 1 and the last factor into group 2 and so on...
Michael
*** EDIT *** once again, I was too late - mike solved it already