Question: For the problemsbelow state the purpose in your own words , specify input that is needed , expected output , and the step by step

For the problemsbelow state the purpose in your own words, specify input that is needed, expected output, and the step by step process that will obtain the output from the input (the algorithm). In addition to these 4 items also specify test data that can be used to all the scenarios described for each problem. DO NOT WRITE ACTUAL CODE (C++)

Write a process that will use the Monte Carlo method to estimate PI as described below. The Monte Carlo method to estimate probability generates a large number of points then determines how many points meet a specific condition. Consider the figure below containing a square with a circle inside of it, both of which are centered on zero.

For the problemsbelow state the purpose in your own words, specify input

The area of the circle would be r2 where r is 1. The area of the square is s2 where s is 2 (-1 to 1). Therefore the ratio of the area of the circle to the area of the square would be /4. Now suppose we generate random points to fall uniformly in the area of the square (x varies from -1 to 1 and y varies from -1 to 1). We can state ratio of the number of points falling inside the circle to the total number of the points is equal to the ratio of the area of the circle to the area of the square. /4 = (number of points in the circle)/(total number of points) Therefore can be defined by the equation = 4 * (number of points in the circle)/(total number of points) Generate a process that would generate random numbers between 1 and 1 for x and y positions of 10000 points and count how many points fall with the circle, then determine an estimated version of . (See below to generate floating point random numbers. This generation is not needed to describe the process, but to implement the process)

-1 -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!