Problem 075

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
solarmew
Posts: 42
Joined: Thu Jan 01, 2015 3:52 pm

Re: Problem 075

Post by solarmew »

Is the answer <50,000?
Image
366541_5799d51e95657e1a227f2cb86bd181de
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 075

Post by hk »

No
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
solarmew
Posts: 42
Joined: Thu Jan 01, 2015 3:52 pm

Re: Problem 075

Post by solarmew »

didn't think so T.T ...
I got 62444, but it was wrong :(
Could I pm someone my code? I think I'm just not getting all of them...
Image
366541_5799d51e95657e1a227f2cb86bd181de
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 075

Post by hk »

Perhaps you can study the pdf for problem 9 first.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
solarmew
Posts: 42
Joined: Thu Jan 01, 2015 3:52 pm

Re: Problem 075

Post by solarmew »

hk wrote:Perhaps you can study the pdf for problem 9 first.
I don't understand the paragraph after eq 9.3
I implemented those conditions, but i'm getting that m<k<2m is always false :\
Image
366541_5799d51e95657e1a227f2cb86bd181de
User avatar
dawghaus4
Posts: 56
Joined: Fri Nov 29, 2013 2:22 am

Re: Problem 075

Post by dawghaus4 »

Just some observations:

m > n > 0

m < m + n < m + m = 2m

Since k = m + n,

m < k < 2m

And a question:

If you are "running" loops, are you keeping n < m?
User avatar
solarmew
Posts: 42
Joined: Thu Jan 01, 2015 3:52 pm

Re: Problem 075

Post by solarmew »

I define n as n = k - m, like it says in the pdf, so yeah, it should be <m
but before that I pick m from a list of divisors of the perimeter/2, like it says, and then k from a list of odd divisors of p/(2m).
And it so happens that for p = 100, k is never between m and 2m >.> ...
Image
366541_5799d51e95657e1a227f2cb86bd181de
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 075

Post by hk »

Eh, Problem 9 (View Problem) says a+b+c=1000.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
solarmew
Posts: 42
Joined: Thu Jan 01, 2015 3:52 pm

Re: Problem 075

Post by solarmew »

hk wrote:Eh, Problem 9 (View Problem) says a+b+c=1000.
Is the method not generalizable to any p? :-?
Image
366541_5799d51e95657e1a227f2cb86bd181de
User avatar
dawghaus4
Posts: 56
Joined: Fri Nov 29, 2013 2:22 am

Re: Problem 075

Post by dawghaus4 »

solarmew wrote:
hk wrote:Eh, Problem 9 (View Problem) says a+b+c=1000.
Is the method not generalizable to any p? :-?
Yes, but there are not always unique integral solutions. There can be multiple solutions or no integral solutions, at all.
Problem 75 states this.
In contrast, some lengths of wire, like 20 cm, cannot be bent to form an integer sided right angle triangle, and other lengths allow more than one solution to be found; for example, using 120 cm it is possible to form exactly three different integer sided right angle triangles.

Your result indicates that there are no right triangles with perimeter = 100, whose sides are all integers.

Tom
User avatar
Oliver1978
Posts: 166
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

Re: Problem 075

Post by Oliver1978 »

EnDorphin wrote:Alright, I figured out what I did wrong for the one before and I fixed it, but still not correct.
So I wanted to check my new values.

If we let X(n) be the function which gives the number of solutions for the problem when L <= n,
then for L = 50, 100, 500 and 2000, I get these values:

X(50) = 6
X(100) = 11
X(500) = 56
X(2000) = 210


If these are still wrong, could I may be PM anyone the L values for when the max length is 2000?
If these values are all correct, then could someone take a look at my code? It's in Java
I get the same for 50 and 100. But I get 59 for X(500) and 222 for X(2000) :? I'm wondering if at least one of us is right with their numbers...
49.157.5694.1125
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Problem 075

Post by Georg »

leghorn wrote:I'm wondering if at least one of us is right with their numbers...
You are right.
User avatar
Oliver1978
Posts: 166
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

Re: Problem 075

Post by Oliver1978 »

So far so good, but my result of xx446 won't work. Maybe someone could give a yes or no for X(135,000) = 14774?
49.157.5694.1125
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Problem 075

Post by Georg »

I give a "Yes".
User avatar
Oliver1978
Posts: 166
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

Re: Problem 075

Post by Oliver1978 »

Vielen Dank. My code is going wrong somewhere. Now I've got to find out where.
49.157.5694.1125
MadPat
Posts: 1
Joined: Fri Jul 21, 2017 12:42 am

Re: Problem 075

Post by MadPat »

I agree with Oliver 1978.

X(50) = 6
X(100) = 11
X(500) = 59
X(2000) = 222
Kamiccolo
Posts: 1
Joined: Wed Mar 09, 2016 10:21 am

Re: Problem 075

Post by Kamiccolo »

*sigh* this is the one problem, which is considered easy, but still too long lasting for me :D

Unfortunate, getting the same numbers up to X(2000) -.-

EDIT:
oh, the reason being... 150 000 used as a limit instead of 1 500 000 :|
Post Reply