Page 1 of 3

Problem 094

Posted: Thu Oct 16, 2008 6:28 pm
by pjt33
I'm convinced that my solution for 94 is finding the correct triangles, because using the output I was able to find the relevant sequences in Sloane's and they agree for the entire of the relevant range.

However, it won't accept either of my answers (one assuming that (1,1,0) is valid, and the other that it isn't).

To check my understanding (which could be wrong, because I can't parse the sentence "Find the sum of the perimeters of every almost equilateral triangle with integral side lengths and area and whose perimeters do not exceed one billion (1,000,000,000)" as grammatical English - should that say "whose perimeter does not"?): if 1E9 were replaced with 50, would the answer be (1+1+2)+(5+5+6)+(17+17+16)?

(Link to problem added by moderator: Problem 94 (View Problem))

Re: Problem 94

Posted: Thu Oct 16, 2008 7:10 pm
by daniel.is.fischer
No. Only nondegenerate triangles should be considered, so (1,1,0) and (1,1,2) aren't valid.

Would "Find the sum of the perimeters of all almost equilateral triangles with integral side lengths and area and whose perimeters do not exceed one billion" be a good and grammatically correct sentence?

Re: Problem 94

Posted: Thu Oct 16, 2008 11:42 pm
by pjt33
That would be it! Thanks.

Yes, replacing "every" with "all" turns a singular noun phrase into a plural noun phrase.

problem 94

Posted: Sat Jan 03, 2009 6:21 pm
by tiny
The text says: whose perimeters do not exceed 1.000.000.000

Does this mean, that for every triangle the perimeter is less than 1.000.000.000?

Or does it mean, that all the perimeters of the triangles together are less than 1.000.000.000?

Re: problem 94

Posted: Sat Jan 03, 2009 6:23 pm
by Tommy137
tiny wrote:Does this mean, that for every triangle the perimeter is less than 1.000.000.000?
Right.

Re: problem 94

Posted: Tue Jan 06, 2009 9:46 pm
by pjt33
tiny wrote:The text says: whose perimeters do not exceed 1.000.000.000

Does this mean, that for every triangle the perimeter is less than 1.000.000.000?
Almost. It means less than or equal to 1.000.000.000.

Problem 094

Posted: Thu Nov 05, 2009 3:05 pm
by bearface
I seem to be having problems handling large integers on this problem. Can someone tell me if I at least have the 5 smallest triangles correct? Sides are
5,5,6
65,65,66
901,901,902
12545,12545,12546
174725,174725,174725

Could you also tell me the 2 largest triangles? I am checking triangles with shortest sides up to and including 333333333.
Thanks for your help.

Re: Problem 094

Posted: Thu Nov 05, 2009 3:24 pm
by daniel.is.fischer
You're missing some, e.g. the second smallest.

Re: Problem 094

Posted: Thu Nov 05, 2009 6:58 pm
by bearface
Daniel - I appreciate your guidance but I guess I need more of a shove in the right direction to figure out what I am missing.

My understanding is we are looking for triangles with integral sides a,a,a+n that have integral area and a perimeter less than a certain amount. n is equal to 1 because 0 is impossible, and the problem constrains n to be no greater than 1. Correct?

I believe you are saying that 5,5,6 and 65,65,66 are valid but that I am missing at least one in between them. I am using Heron's Formula for the area, which becomes Area =.25*sqrt{(3a+1)(a+1)(a+1)(a-1)} where a is the short side. I don't get any other integral areas between a=5 and a=65, although 38 and 54 come close.

Any push in the right direction is appreciated. Thank you.

Re: Problem 094

Posted: Thu Nov 05, 2009 7:22 pm
by harryh
We shall define an almost equilateral triangle to be a triangle for which two sides are equal and the third differs by no more than one unit.
"Differs by no more than one unit" does not necessarily mean "Is one unit larger" :wink:

Also: Please check that a topic for a given problem does not already exist, before starting a new one!

Re: Problem 094

Posted: Thu Nov 05, 2009 8:18 pm
by bearface
thanks harryh

Re: Problem 094

Posted: Sun Jul 25, 2010 9:05 pm
by MaJJ
Is 5479171588 as the final answer at least close?

Edit: Nevermind, I just found out where is my error. I worked only with those triangles that differed by 1, not with those that were in fact equilateral...

Edit 2: Wait, there are no equilateral triangles with integral area. Soooo ... What the hell am I missing? :D

Re: Problem 094

Posted: Sun Jul 25, 2010 9:48 pm
by MaJJ
harryh wrote:"Differs by no more than one unit" does not necessarily mean "Is one unit larger" :wink:
So the third side doesn't have to be integer?

Re: Problem 094

Posted: Sun Jul 25, 2010 9:54 pm
by elendiastarman
Problem 094 (View Problem)

All three sides must be integer (and the area must be integer). Two of them are the same (say, x) and the third is one off (x [plusmn] 1).

That help?

Re: Problem 094

Posted: Sun Jul 25, 2010 9:56 pm
by MaJJ
elendiastarman wrote:Problem 094 (View Problem)

All three sides must be integer (and the area must be integer). Two of them are the same (say, x) and the third is one off (x [plusmn] 1).

That help?
Yeah, that told me I understood the problem the first time and made error somewhere in the algo. Thanks ;)

Re: Problem 094

Posted: Sun Jul 25, 2010 10:08 pm
by elendiastarman
You're welcome. :)

Re: Problem 094

Posted: Sat Aug 20, 2011 9:46 pm
by jake223
is the partial sum for perimeters under 1000000 716032? I want to see if my algorithm is totally off or just having problems with larger numbers.

never mind. I was just misreading the problem. I was checking for sides going up to 1 billion each, not perimeter.

Re: Problem 094

Posted: Thu Sep 29, 2011 5:00 am
by JMW1994
I know you are supposed to check on whether the lengths and the perimeter are below a billon. However, does the area have to be below a billion as well?

Re: Problem 094

Posted: Thu Sep 29, 2011 9:33 am
by hk
Find the sum of the perimeters of all almost equilateral triangles with integral side lengths and area and whose perimeters do not exceed one billion (1,000,000,000).
This means:
1) The sides have integral length.
2) The area is integral.
3) The perimeter should not exceed one billion.

Re: Problem 094

Posted: Thu Dec 22, 2011 1:31 pm
by manfazil
MaJJ wrote:Is 5479171588 as the final answer at least close?

Edit: Nevermind, I just found out where is my error. I worked only with those triangles that differed by 1, not with those that were in fact equilateral...

Edit 2: Wait, there are no equilateral triangles with integral area. Soooo ... What the hell am I missing? :D
I found the same answer but it is wrong! I think there is an wrong triangle in my sum, included due to some round error.