All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
An Infinite Lattice of Points (Posted on 2024-05-23) Difficulty: 3 of 5
Consider an infinite square lattice of points with integer coordinates on a plane.

If two lattice points are chosen at random, what is the probability that the straight-line segment joining the two lattice points will not pass through any other lattice points?

**** Adapted from a problem appearing in the 2005 Fall collection of BENT, Brain Ticklers.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution -- simulation and research | Comment 1 of 2
For the two points being the endpoints of a line segment, that segment will not intersect any intervening points if and only if the delta x and delta y are relatively prime.

Simulation results in:

trials=1000000;
randomSpace=1000000;
dx=randi(randomSpace,[1,trials]);
dy=randi(randomSpace,[1,trials]);
relPrime=sum(gcd(dx,dy)==1);
relPrime/trials

finds  0.608082 of the random pairs of numbers (between 1 and a million) to be relatively prime. Even reducing the random space to just between  1 and 10, the ratio goes to 0.629578. For 1 to 100 it came out 0.608007.

A bit of research shows that the probability approaches 6/pi^2 =~ 0.607927101854027 as the random space increases.  Even for a space consisting of integers 1 through 100, the variation due to using only one million trials is enough to bring the simulation results statistically within the theoretical mean.

  Posted by Charlie on 2024-05-23 12:23:44
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information