Page 1 of 2

Problem 088

Posted: Wed Apr 09, 2008 10:47 pm
by Frisker
"In fact, as the complete set of minimal product-sum numbers for 2≤k≤12 is {4, 6, 8, 12, 15, 16}, the sum is 61."

Why isnt for example "k=10: 20 = 10+2+1+1+1+1+1+1+1+1" listed there?

Re: error in the example of problem 88?

Posted: Wed Apr 09, 2008 11:42 pm
by daniel.is.fischer
Because 16 = 4*4*1*1*1*1*1*1*1*1 = 4+4+1+1+1+1+1+1+1+1.

Problem 88

Posted: Wed May 21, 2008 6:38 am
by JamieCamardelle
I need more explanation or help with problem #88, the minimal product-sum problem.
:?
I am wondering why the value for k = 10 is not 20. Is there a further stipulation that the values in the sequence {4, 6, 8, 8, 12, 12, ...} appear in inreasing order? (I mean, before the collapsing for answer and summing for submission.)

(I haven't figured out how to put a list in this forum properly yet.)
Looking at the right hand colmun, the first time we see 2 is at n = 4, so a(2) = 4.
Continuing, a(3) = 6, a(4) = a(5) = 8; a(6) = a(7) = a(8) = 12; a(9) = 15; a(11) = a(12) = 16 (Note - notice that 10 was skipped)
a(13) = 18; and a(10) = a(14) = 20.

If I run my routine until there is a value for a(12), I get: {0,4,6,8,8,12,12,12,15,0,16,16} (10th in this sequence is 0- it hasn't been filled yet.)
and if I run my routine until there is a value for a(20), I get: {0,4,6,8,8,12,12,12,15,20,16,16,18,20,24,0,24,24,24,28}
The second sequence agrees with the first except at the 10th position - we now have 20 there. But now see that the 16th place is 0, but when I run my routine until there is a value for a(24), I get a(16) = 32.

Re: a question on Problem 88

Posted: Wed May 21, 2008 7:51 am
by stijn263
k=10: 16 = 1*1*1*1*1*1*1*1*4*4 = 1+1+1+1+1+1+1+1+4+4

Re: a question on Problem 88

Posted: Wed May 21, 2008 4:34 pm
by JamieCamardelle
Thank you very much. :D Now I see there is a big fault in my code.

Re: Problem 088

Posted: Tue Jan 20, 2009 12:18 pm
by Phibonacci
just a simple question. Do the individual numbers in the set have to be between 1 and 9

Re: Problem 088

Posted: Tue Jan 20, 2009 12:29 pm
by stijn263
no

Re: Problem 088

Posted: Fri Jun 17, 2011 9:56 am
by elr
can someone verify that the sum of minimal product-sum numbers from 2 <= k <= 500 is 31510

thanks

Re: Problem 088

Posted: Fri Jun 17, 2011 10:13 am
by sivakd
It's smaller than that.

Re: Problem 088

Posted: Fri Jun 17, 2011 10:35 am
by elr
hmm,i really cant understand why my approach does not working :(
my code successfully find the minimal product sum numbers for the examples
at the problem page,but somehow things mess up later for example up to 50
my program finds :

snip

and the set contain :{snip}
with sum of snip
:?
i wondering what went wrong

Re: Problem 088

Posted: Fri Jun 17, 2011 5:28 pm
by sivakd
Your result for k = 17 is incorrect.

Re: Problem 088

Posted: Sat Jun 18, 2011 2:57 am
by rayfil
In particular don't post any code fragments or results.

I guess you forgot to read that, or it wasn't apparent enough.

Re: Problem 088

Posted: Mon Jun 20, 2011 2:46 pm
by elr
rayfil wrote:In particular don't post any code fragments or results.

I guess you forgot to read that, or it wasn't apparent enough.
i am sorry if i violated any of the forum rules
i just did not thought that posting a result (which is probably a wrong result)
for 2 <= k <= 50 when the limit is 12000 going to help anyone

anyway i manage to solve the problem

Re: Problem 088

Posted: Tue Jun 21, 2011 1:25 am
by rayfil
i just did not thought that posting a result (which is probably a wrong result)
for 2 <= k <= 50 when the limit is 12000 going to help anyone
The problem with such a philosophy is that the next person will post results up to k=100 and argue that if 50 is OK, then why should 100 not be since it's much below the limit. Then the next one will post them up to 200 with the same argument, and so on ...

Re: Problem 088

Posted: Mon Mar 26, 2012 5:46 pm
by Usaio
I'm currently doing two things which I absolutely hate doing. Asking for help on a program and thread necromancy. However, I can't seem to get this problem.

My algorithm agrees with the given data and the logic for higher numbers seems to work out, but I'm not getting the right answer. I've spent a lot of time going through the program trying to find bugs, examining output to see if I missed something in the logic, and computing product-sums by hand using trial and error... and I just don't see what's wrong.

I know I'm not supposed to ask for extra data and I can't post the algorithm for you guys to check, but I'm totally out of ideas on how to fix this. What else can I do? Or what information can I ask for?

Re: Problem 088

Posted: Mon Mar 26, 2012 6:35 pm
by Marcus_Andrews
It could be due to a variety of things. If the logic is generally solid and it scales well for higher numbers (i.e. no overflow/precision issues), then maybe it's as simple as ensuring you're looking at the right range (2≤k≤12000). Perhaps it's a matter of handling edge cases correctly depending on the structure of your loops (i.e. make sure you are performing the right number of iterations). Perhaps it's a double-counting issue.

It's hard to say without spoiling the problem. It comes down to taking a closer look at your code and keeping an eye out for possible areas where it's grinding against your intended logic in a non-obvious way.

Re: Problem 088

Posted: Mon Mar 26, 2012 6:58 pm
by Usaio
Marcus Stuhr wrote:It comes down to taking a closer look at your code and keeping an eye out for possible areas where it's grinding against your intended logic in a non-obvious way.
That's what I've been doing, but haven't been able to find any. I've even asked several friends to take a look at it. One thing I was able to determine is that my result is too low, which means I'm identifying some numbers as minimum when they don't satisfy the product-sum condition. However, I've checked several large numbers which can be product-sums in many different ways and they all seem to check out.

I would like to refrain from taking 3 days to brute force this just to be able to ask specifics. Would anyone be willing to read through a PM to tell me what boneheaded thing I'm doing wrong?

Re: Problem 088

Posted: Thu Aug 16, 2012 3:24 pm
by rouge6789
Bonjour.
Pourquoi 9 ne figure pas dans les résultats poutant
9 = 3 * 3 = 3 + 3 +1 +1 +1

J'ai pas compris quoi ?

Re: Problem 088

Posted: Thu Aug 16, 2012 6:32 pm
by mdean
rouge6789 wrote:Bonjour.
Pourquoi 9 ne figure pas dans les résultats poutant
9 = 3 * 3 = 3 + 3 +1 +1 +1

J'ai pas compris quoi ?
9=3*3*1*1*1=3+3+1+1+1 mais 8=2*2*2*1*1=2+2+2+1+1 et 8<9

Re: Problem 088

Posted: Fri Aug 17, 2012 4:03 pm
by rouge6789
Bonjour.
Ah oui j'ai compris, il faut prendre le plus petit pour un même nombre de facteurs.
my english is very bad !!
Merci de votre aide.