Question
1) a) Looking at the average distance of two points within a unit sqaure, produce a table of ordered pairs n, dav , where n
1) a) Looking at the average distance of two points within a unit sqaure,
produce a table of ordered pairs n, dav , where n is the dimension of the "square"
(n = 2, for 2-d, n = 3 for 3-d) and dav is the average distance between the points
for that n dimensional space using the Monte Carlo Method for 10,000 points
per n. (Use 10,000 points to nd the average distance for the 3-d case, the 4-d
case, etc.) Make a table from n = 1 to n = 100.
b) Plot the result in a part a) using axis labels and a plot label.
c) Try to fit that plot/data to a function of n, so that this can be generalized
(approximately) for any n-d hypercube.
d) To test how well your fit works in part c), produce a table of the relative
error between your calcuated values in part a) and the fitted function. Plot this
table as well.
Ive gotten through A and B, and am having trouble figuring out what to do for part c-d. Any help is appreciated please post screenshots using MATHEMATICA.
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