Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Buffon's needle experiment is a classic probability experiment named after Georges - Louis Leclerc, Comte de Buffon, a French mathematician. In this experiment: You have

Buffon's needle experiment is a classic probability experiment named after Georges - Louis Leclerc, Comte de Buffon, a French mathematician. In this experiment:
You have a floor with evenly spaced parallel lines (like floorboards).
You randomly drop a needle of a certain length onto the floor.
The goal is to determine the probability that the needle crosses one of the lines.
The experiment provides insights into the concept of probability and can be used to estimate the mathematical constant \pi (pi). By collecting data on how many times the needle crosses the lines and comparing it to the total number of drops, you can calculate an approximation of \pi. The more drops you perform, the more accurate your estimation of \pi becomes, demonstrating the connection between probability and geometric shapes.
use a method similar to the Buffon's needle experiment to estimate the value of 2 instead of \pi . In the original Buffon's needle experiment, you drop a needle onto a floor with parallel lines, and you can estimate the value of \pi based on how many times the needle crosses the lines.
In this modified version, you have a floor with parallel lines. You drop squares of a given length onto the floor and estimate 2 based on how many times a square's two consecutive sides crosses the floor with parallel lines.(cracks between floorboards).
In this modified version, you have a floor with square tiles instead of lines. You drop squares of a given length onto the floor and estimate 2 based on how many times a square crosses two consecutive sides of a square tile (cracks between floorboards).
Write a MATLAB function called [r, crossings]= BuffonSquaresRootTwo(width, length,throws)
where r the estimate of 2;
crossings = the number of cracks (between floorboards) that cross two consecutive sides of a square.
width = the width of the floorboards;
length = the length of the squares;
throws = the number of needles thrown.
to solve this you must user following formula: r =2-(consecutiveCrossings / totalCrossings);
The outcome of the program should be 1.41
**make sure to test the program, and justify the used algorithm. *
***
*
DO NOT COPY AND PASTE FROM CHATGPT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Is the WebApp fully compatible with the server OS?

Answered: 1 week ago