in Education by
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago. In what way would you try to use multiple computers to compute a number like PI, i.e.? Are there existing algorithms or solutions that make this easy to do? How do you split up the work and let the results from other machines come into effect? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Here's one simple way: generate a huge number of random (x,y) points where x and y are between 0 and 1. for each point, calculate whether its cartesian distance to the origin is <= 1 (that is, whether it lies on or inside the circle) count the number of point inside the circle versus outside the circle Pi, then, can be calculated from the ratio of inside to outside points. A very large number of points is necessary for this to approach pi, but if you have many machines, you can have each computer generate as many as you like, then simply return the counts to some leader machine, which would collect all the results and calculate the final ratio. This method can be used to calculate pi to any precision you want...the more points, the more precision. It's called a 'Monte Carlo' method because it uses randomness. See http://math.fullerton.edu/mathews/n2003/montecarlopimod.html for more information.

Related questions

0 votes
    I am learning bash scripting. While exploring the math functions i am came across a command which calculated ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I know there are many advantages that SVMs have over ANN since they cover two main disadvantages of ANN: ANN covers ... ANNs usable ? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    when two operators like+,- share the same ranking the formula is calculate from right to left. is it true or false? Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    Which feature is recommended by Azure for having a common file sharing system between multiple virtual machines?...
asked Jul 31, 2021 by JackTerrance
0 votes
    The number of sigma ( σ ) ( and pi ( π ) ( bonds in pent-2-en-4-yne is: A. 13 σ 13 bonds and no π π ... 11 σ 11 bonds and 2 π 2 bond Select the correct answer from above options...
asked Jan 2, 2022 in Education by JackTerrance
0 votes
    How do you calculate with multiple formulas simultaneously? Explain with example? Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
0 votes
    A_is used to connect multiple devices like ( computer, printer, scanners) Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    I have data regarding gender of people under 8 columns: mem1;mem2;mem3;mem4;mem5;mem6;mem7;mem8 MALE; ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    How is Raspberry Pi different from Arduino?...
asked Jan 20, 2023 in Education by JackTerrance
0 votes
    How is Raspberry Pi used in IoT?...
asked Jan 20, 2023 in Technology by JackTerrance
0 votes
    How does the Raspberry Pi work?...
asked Jan 20, 2023 in Technology by JackTerrance
0 votes
    You are asked to perform a queue operation using a stack. Assume the size of the stack is some value ... from above options Data Structures and Algorithms questions and answers...
asked Nov 14, 2021 in Education by JackTerrance
...