Problem 143

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
User avatar
TheEvil
Posts: 84
Joined: Sun Nov 13, 2011 10:38 am
Location: Szeged, Hungary

Re: Problem 143

Post by TheEvil »

@karluk
Sorry I didn't see that, I thought the your problem was with X and T. Sorry again.
Image
Erf_Erf
Posts: 5
Joined: Sun Jan 12, 2014 12:12 pm

Re: Problem 143

Post by Erf_Erf »

This is a very nice problem, which I thought I had solved. But...
zwuupeape wrote:I have a total of 508 triangles for the original limit L = 120000. Total sum is 8 digits, starts with a 3.

If I lower it to 12000 I get only 38 triangles, total sum 251752.

What's wrong ?? =\
... I get exactly the same problem. daniel.is.fisher seems to suggest that every statement above is correct, which just makes this even more of a mystery to me. I have checked that every solution fulfills the conditions (already given by the construction of the triangle), that no angle of the triangle (a, b, c) is greater than 120 degrees. I have also checked that a-b < c <= b <= a, implying that it is possible to construct all of the triangles. I've even checked that no solution is repeated, both in terms of (a, b, c) and (p, q, r). In other words: I'm stuck. Since my answer is identical to the one quoted above, I would like to conclude that there is no bug in my code, but that I've missed something on the theoretical level. Am I correct about this? And in order to find that which I am missing, should I look towards the geometrical part (construction of triangles etc.) or the numerical part (solving the equations derived from the geometrical part) of the problem?

Thanks in advance.
Image
User avatar
hk
Administrator
Posts: 10993
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 143

Post by hk »

The problem might be in the interpretation of this sentence: Find the sum of all distinct values of p + q + r ≤ 120000
If I remember well it has to be interpreted as the values of p+q+r must be distinct.
It might be that there are more (p,q,r) with the same p+q+r.
Image
Erf_Erf
Posts: 5
Joined: Sun Jan 12, 2014 12:12 pm

Re: Problem 143

Post by Erf_Erf »

Ah, of course - being such a non-intuitive condition for (p, q, r), I totally neglected it. Anyway, I solved it now, thank you!
Image
Neilius
Posts: 8
Joined: Mon Aug 24, 2015 5:27 am
Contact:

Re: Problem 143

Post by Neilius »

If I calculate the problem using a smaller target of 12,000 instead of the original target of 120,000 I get 20 triangles, and the sum of p+q+r = 128015.

Would someone please tell me if this is correct?

Thanks in advance.

(Gee this problem is teaching me a lot about geometry that I never knew)
Image
User avatar
nicolas.patrois
Posts: 118
Joined: Fri Jul 26, 2013 4:54 pm
Contact:

Re: Problem 143

Post by nicolas.patrois »

My sum is bigger.
Image
Neilius
Posts: 8
Joined: Mon Aug 24, 2015 5:27 am
Contact:

Re: Problem 143

Post by Neilius »

nicolas.patrois wrote:My sum is bigger.
Many thanks :)
Image
Post Reply