Thread: Math Quiz 9
View Single Post
  #85   Spotlight this post!  
Unread 05-08-2016, 17:55
Greg Woelki's Avatar
Greg Woelki Greg Woelki is offline
FRC Alumnus
FRC #1768
 
Join Date: May 2014
Rookie Year: 2013
Location: Bolton, MA
Posts: 97
Greg Woelki is a glorious beacon of lightGreg Woelki is a glorious beacon of lightGreg Woelki is a glorious beacon of lightGreg Woelki is a glorious beacon of lightGreg Woelki is a glorious beacon of light
Re: Math Quiz 9

A Monte Carlo simulation written in python and running on my laptop isn't a great solution if 1 part in a million accuracy is required, but since I had essentially already written the program, I figured that I might as well give it a shot. For the average length of line segments in the interior of an r=1 circle, I got 0.9054124568 after 4e10 trials. I'm not certain whether or not this meets the accuracy requirement. I also made minor modifications so that I could simulate the chord problem, and I got 1.2732310914 after 7e09 trials. This problem requires far fewer trials to get an accurate result and I believe this solution meets the accuracy spec. I can post my code if anyone is interested.
Reply With Quote