Problem 296

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.
Post Reply
Quique12
Posts: 7
Joined: Sun Sep 05, 2010 7:08 am

Problem 296

Post by Quique12 »

In problem 296, if it would be the case that a triangle could have two ways of having BE integral (say for example that if you rotate the labels A,B,C the "new triangle" would have a different BE if the triangle is not equilateral). Do these count as two different triangles?
Image
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 296

Post by jaap »

You can't rotate the labels, as it is specified in the problem that AB is the longest side and BC the shortest.
Quique12
Posts: 7
Joined: Sun Sep 05, 2010 7:08 am

Re: Problem 296

Post by Quique12 »

Thanks jaap.
It simplifies the problem a little as I don't have to check 6 permutations for the labels. I noticed that most of the time BE is integral is when BC<= AC<=AB anyways. I wonder if there's a good reason for that.
Image
Quique12
Posts: 7
Joined: Sun Sep 05, 2010 7:08 am

Re: Problem 296

Post by Quique12 »

After two days running my computer gave me the wrong answer. I want to know if the algorithm is completely wrong. So I'll post what I have if the perimeter were up to 1000 and ask if someone can confirm. Hopefully that is not too spoilery.
My answer for 1000 would be: 190
Image
ThomasH
Posts: 117
Joined: Sun Mar 26, 2006 8:41 am
Location: Berlin, Germany

Re: Problem 296

Post by ThomasH »

Quique12 wrote:My answer for 1000 would be: 190
That is not even in the neighbourhood of the correct value.
Quique12
Posts: 7
Joined: Sun Sep 05, 2010 7:08 am

Re: Problem 296

Post by Quique12 »

I found the mistake in the program. I later wrote another one and got the correct answer in 2.5 hours of running time. My algorithm seems to be the same as the algorithm used by the first posters but somehow in Mathematica it runs in 2.5 hours and it ran much quicker on their programming languages.
Image
User avatar
nicolas.patrois
Posts: 118
Joined: Fri Jul 26, 2013 4:54 pm
Contact:

Re: Problem 296

Post by nicolas.patrois »

Is the answer for 1000 is 492574?
Image
User avatar
Marcus_Andrews
Administrator
Posts: 1637
Joined: Wed Nov 09, 2011 5:23 pm

Re: Problem 296

Post by Marcus_Andrews »

No -- too high.
User avatar
nicolas.patrois
Posts: 118
Joined: Fri Jul 26, 2013 4:54 pm
Contact:

Re: Problem 296

Post by nicolas.patrois »

Is p=100000 is accepted? Of course.
I think that I found my error. :?
Image
Post Reply