[Coco] Project Euler and the Coco

Arthur Flexser flexser at fiu.edu
Sat Nov 15 15:35:37 EST 2008


On Sat, 15 Nov 2008, Bill Barnes wrote:

> reread the link: http://projecteuler.net/index.php?section=problems&id=9
> 
> it specifically states the values meet the following criteria.
> 
> A<B<C                     It does not state c > A+B
> A+B+C=1000
> A^2+B^2=C^2

Mark meant c < a+b, as he says in a later message, which follows from the fact
that the hypotenuse of a right triangle must be less than the sum of the two
other sides (the triangle collapses into a straight line as c approaches
equality with a+b as the angle between sides a and b approaches 180 degrees).  
Mark also proved algebraically in a later message that c < a+b follows from
a^2+b^2=c^2.

I wrote:
> > > I see no apparent reason why B must be in the range 334 to 667, as
> > > John assumed.  Why exclude, for example, the abc combination 200, 300,
> > > 500, which properly adds to 1000, from testing?
> 
and Mark replied: 
> > because (a+b) < c     [should be a+b>c, which the example also violates]

Okay, bad example;  make it 200, 320, 480 as a plausible example that John
excludes from testing by assuming that b is at least 334.  They add to 1000;
a<b<c; a+b is properly greater than c; and b also exceeds (500-a), as Mark
proved that it must.

Art




More information about the Coco mailing list