Question
Create a single NOTEPAD or PDF file that restates the problem in your own words, specifies what input is needed from whomever is using the
Create a single NOTEPAD or PDF file that restates the problem in your own words, specifies what input is needed from whomever is using the process, what output is expected, the step by step process (algorithm) to get the output from the input, and test data (input for which you know the expected output for each of the 3 problems given below. (Include all this information in one file) You should not write any code. Make sure the problem statement is in your own words and is descriptive enough so someone not reading the problem you were given will understand what is being done. Do not write any code.
: 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. 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)
Answer should be in this format:
Purpose:
Input Needed:
Output Expected:
Algorithm:
Test Data:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started