Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Dec 23, 2011 #1
    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)?
     
  2. jcsd
  3. Dec 23, 2011 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    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!
     
  4. Dec 23, 2011 #3
    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.
     
  5. Dec 24, 2011 #4
    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)
     
  6. Dec 24, 2011 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    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.
     
  7. Dec 24, 2011 #6
    Ok... Thank you. Thank you.. Thank you... :)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How can i calculate length of a rod with Monte Carlo method?
Loading...