Problem 431

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
User avatar
RishadanPort
Posts: 79
Joined: Mon Jun 10, 2013 7:31 am

Problem 431

Post by RishadanPort »

So, I can now correctly calculate V(x).

My last issue is getting the accuracy to 9 decimal places.

Are the provided x values, x=1.114785284, x=2.511167869, result in V(x) = 36.000000000.., and 49.000000000
-- ie with accuracy to 9 decimal places?

-- I am assuming so.. Any maybe hints on accuracy would be appreciated.... :-(

Thanks
Last edited by RishadanPort on Mon Jun 10, 2013 7:45 pm, edited 1 time in total.
Image

Rishada is the gateway to free trade—but the key will cost you.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 431

Post by hk »

What you are required to do is to give [sum]x accurate to 9 decimal places.
This doesn't directly mean that the V(x) need to be accurate to 9 decimal places.
That depends on the function V(x).
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
RishadanPort
Posts: 79
Joined: Mon Jun 10, 2013 7:31 am

Re: Problem 431

Post by RishadanPort »

I just want to clarify something.

I compute V(0) for alpha = 30, and R = 3
and get 32.64838334800159 instead of 32.648388556.

I am assuming that 32.648388556 <-- is what should be expected after you do V(0) yes?

Thanks
Image

Rishada is the gateway to free trade—but the key will cost you.
User avatar
mpiotte
Administrator
Posts: 1961
Joined: Tue May 08, 2012 5:40 pm
Location: Montréal, Canada

Re: Problem 431

Post by mpiotte »

RishadanPort wrote:...
I compute V(0) for alpha = 30, and R = 3
and get 32.64838334800159 instead of 32.648388556.
I am assuming that 32.648388556 <-- is what should be expected after you do V(0) yes? ...
Yes. For alpha = 30 deg. and R = 3, V(0) = 32.648388556 when rounded to 9 decimals.
Image
User avatar
RishadanPort
Posts: 79
Joined: Mon Jun 10, 2013 7:31 am

Re: Problem 431

Post by RishadanPort »

Yep -- After a bit of analysis of the function... I have now realized why the error is cropping up.

Thanks

Edit: After a few days spent debugging, -- I found a few bugs in my code, and found why the errors were cropping up.
Great problem -- loved it.
Image

Rishada is the gateway to free trade—but the key will cost you.
kingvash
Posts: 13
Joined: Sun Nov 22, 2009 2:57 am

Re: Problem 431

Post by kingvash »

I'm very confused on how the volume missing is 32.648388556

With A = 30 degrees, Radius = 3, x =0 I get ~28.2743
In fact I get this answer with twomethods leading me to believe I have misunderstood the question.

I used shell method to integrate the empty space integrate( 2 * pi * x * (sin(A)*x), x = 0 to R) = 28.2743

Alternately I calculate the volume of cone (1/3 * pi * R^2 * (sin(A) * R) = 9*pi/2) and subtract that from a cylinder (pi * R^2 * (sin(A) * R) = 27*pi/2) = 27*pi/2 - 9*pi/2 = 18*pi/2 = ~28.2743

So now I'm confused on where 32.648 came from.
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 431

Post by jaap »

kingvash wrote:I'm very confused on how the volume missing is 32.648388556

With A = 30 degrees, Radius = 3, x =0 I get ~28.2743
In fact I get this answer with twomethods leading me to believe I have misunderstood the question.

I used shell method to integrate the empty space integrate( 2 * pi * x * (sin(A)*x), x = 0 to R) = 28.2743

Alternately I calculate the volume of cone (1/3 * pi * R^2 * (sin(A) * R) = 9*pi/2) and subtract that from a cylinder (pi * R^2 * (sin(A) * R) = 27*pi/2) = 27*pi/2 - 9*pi/2 = 18*pi/2 = ~28.2743

So now I'm confused on where 32.648 came from.
The height of the cone is not sin(A)*R.
NMB
Posts: 2
Joined: Wed Oct 29, 2014 9:56 am

Re: Problem 431

Post by NMB »

Hi,

I don't understand why 1.114785284 has 3 squared decimal places ...

At first sight, I see "1" twice and "4" twice too, giving thus 4 places... So this is not about single digits being squares...

Can someone please explain me the decision criterion ?

Many thanks for your help !
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 431

Post by jaap »

NMB wrote:Hi,

I don't understand why 1.114785284 has 3 squared decimal places ...

At first sight, I see "1" twice and "4" twice too, giving thus 4 places... So this is not about single digits being squares...

Can someone please explain me the decision criterion ?

Many thanks for your help !
It simply has 9 decimal places. That 9=3^2 is just part of Fred's obsession with squares.
NMB
Posts: 2
Joined: Wed Oct 29, 2014 9:56 am

Re: Problem 431

Post by NMB »

Wow ok it was as simple as that ... Thank you very much :D
pjt33
Posts: 140
Joined: Mon Oct 06, 2008 6:14 pm

Re: Problem 431

Post by pjt33 »

The problem statement says:
We shall let the amount of space wasted in cubic metres be given by $V(x)$. If $x = 1.114785284$, which happens to have three squared decimal places, then the amount of space wasted, $V(1.114785284) \approx 36$. Given the range of possible solutions to this problem there is exactly one other option: $V(2.511167869) \approx 49$.
It feels to me as though this question has been edited and lost some key explanation. Should this say something like the following?
We shall let the amount of space wasted in cubic metres be given by $V(x)$. If $x = 1.114785284$, which happens to have three squared decimal places, then the amount of space wasted, $V(1.114785284) \approx 36$, which is an integer square. Given this angle of repose and diameter, there is exactly one other value of $x$ which gives an integer square wastage: $V(2.511167869) \approx 49$.
Post Reply