How can i calculate length of a rod with Monte Carlo method?

cloudhunter
Messages
3
Reaction score
0
0_______._________________L
L/3
Suppose that there is a rod has length L. How can you calculate some part of its length from starting point (for example from 0 to L/3)?
 
Physics news on Phys.org
I have no clue what you are asking. If you mean exactly what you say, then the length from "0 to L/3" is L/3, of course. Surely that's not what you mean!
 
I think you have simplified your question too much. It is possible for instance to obtain the surface area enclosed by a circle with a Monte Carlo method.

Take a square of sides one with the middle at (0,0) and generate two uniform random numbers (x,y) between -0.5 and 0.5. If (x*x + y*y)<1 then the point is inside the circle of radius 1. Do this 10,000 times. The ratio of points inside and outside is the surface area enclosed by the circle. Hope this helps, else please reformulate your question.
 
HallsofIvy -I mean finding the length of any part of a rod. It can be L/3 or L/4. Yes, 0 to L/3 is L/3. Sorry for my English...
bigfooted - Thank you. Your way is similar to Pi calculation examples with this method; but is this the only way ? I think, if you draw i can understand better. I couldn't calculate like you said. Can you e-mail me? (cloudhunteer@hotmail.com)
 
Okay, choose a number, N, of points "at random" from the line segment. Let m be the number of those points that are inside your interval. If the line segment has length L then the segment has length (m/N)L.
 
Ok... Thank you. Thank you.. Thank you... :)
 
Back
Top