Hi,
I am a software engineer trying to solve the following problem analytically for a physics problem
given a line segment in cm and n random points on it
what is the probability that the distance between any 2 consecutive points on the line is less than the given minimum distance?
For Example:
n = 10 points
lineSegment = 1000 cm
minimumDistance = 2 cm
Running a Montecarlo simulation I took the following steps:
1. generate n random points
2. sort the points by order of smaller first
3. calculate the distances between consecutive points
4. count how many distances are smaller or equal to the minimumDistance.
Link to Python Montecarlo simulation on replit:
replit.com
I am looking for an analytical solution to deal with any n number of points.
Thanks...
I am a software engineer trying to solve the following problem analytically for a physics problem
given a line segment in cm and n random points on it
what is the probability that the distance between any 2 consecutive points on the line is less than the given minimum distance?
For Example:
n = 10 points
lineSegment = 1000 cm
minimumDistance = 2 cm
Running a Montecarlo simulation I took the following steps:
1. generate n random points
2. sort the points by order of smaller first
3. calculate the distances between consecutive points
4. count how many distances are smaller or equal to the minimumDistance.
Link to Python Montecarlo simulation on replit:

Loading...
Build and deploy software collaboratively with the power of AI without spending a second on setup.

I am looking for an analytical solution to deal with any n number of points.
Thanks...