Page 1 of 1

Problem 076

Posted: Sun May 25, 2008 10:58 pm
by flOvermind
I'm not 100% sure, but I think I found an error in the description to problem 76:

According to the description, there are 6 different ways to represent 5 as a sum. Assuming this is true, this means that the "5" itself is not included, or, in other words, a sum of a single term should not be considered. Otherwise there would be 7 different ways to represent 5...

But in the accepted solution, the sum containing only the single term "100" seems to be included in the count...

Re: Error in Problem 76

Posted: Sun May 25, 2008 11:01 pm
by Robert_Gerbicz
The problem's description is good.

Re: Error in Problem 76

Posted: Mon May 26, 2008 10:56 am
by flOvermind
Could you please clarify?

I mean, the question in itself is definitely ambigous. Is 5 = 5 considered a valid sum or not? Unlike in some other problems, that's not explicitly stated here.

If I look at the example, this leads to the conclusion that 5 = 5 is not considered a valid sum, otherwise the correct answer would be 7. So I wrote a program that counts only sums with at least two terms. This program gives an answer that is one less than the expected answer.
Then I wrote a program that does count sums with only one term, and this program gives the correct answer. The program is very simple, and I tested it with various different small examples, so I'm pretty sure it's correct...

If I run my "correct" program (the one that gives the answer that is correct according to your website) with the input 5, the answer is 7, not 6!

Could you write a program that outputs the correct solution to both problems? I highly doubt it...

Re: Error in Problem 76

Posted: Mon May 26, 2008 11:30 am
by daniel.is.fischer
The problem asks "How many different ways can one hundred be written as a sum of at least two positive integers?", so 100 = 100 is not to be counted. Obviously, since the solution to both programmes differs by one, a single output can't be correct for both. I would be interested in seeing your programmes.

Re: Error in Problem 76

Posted: Tue May 27, 2008 9:11 pm
by flOvermind
At the moment I don't have access to my source code. Once I get home (probably on Friday), I will send you a PM with my source (I assume I shouldn't post the solution to this public forum ;) ).

Btw. the solution differs by exactly one because the difference between the programs is a subtraction by 1 :P

Problem76

Posted: Sun Mar 21, 2010 8:51 pm
by ravish.hacker
[Please note that if you haven't solved the this problem yet please don't read further.]
Well, It seems like the answer is readily available for this question on Wikipedia. I request Project Euler team to please change the question to values other then 100 (may be 105 or something).

Re: Problem76

Posted: Sun Mar 21, 2010 9:20 pm
by hk
This wouldn't help very much as OEIS has b-files reaching far enough to cover every possible limit.
One can do two things: type in the answer one finds somewhere, or try to think up how it can be done in reasonable time.
This is of course the idea of the problem.