Post AzvBsdQrrI44NKUn7Q by gregeganSF@mathstodon.xyz
(DIR) More posts by gregeganSF@mathstodon.xyz
(DIR) Post #AzvBsdQrrI44NKUn7Q by gregeganSF@mathstodon.xyz
2025-08-22T13:12:02Z
0 likes, 0 repeats
Here’s a fun puzzle I heard from @octonion Pick two points uniformly at random in a square. What is the probability that the line that contains both points intersects two opposite edges of the square, rather than two adjacent edges?
(DIR) Post #AzvBseSK3Mp3Y8BT1c by gregeganSF@mathstodon.xyz
2025-08-22T13:13:09Z
0 likes, 0 repeats
SOLUTION:Take the unit square [0,1] × [0,1], and consider the two horizontal edges.Parameterise the endpoints of a line joining those two edges as (α,0) and (β,1), then parameterise two points along that line as:(1-λ) (α,0) + λ (β,1)(1-μ) (α,0) + μ (β,1)where α, β, λ, μ all range from 0 to 1.So we have a map from the parameter space [0,1]^4 to the geometric space of pairs of points [0,1]^4:F(α,β,λ,μ) = (β λ + α (1-λ), λ, β μ + α (1-μ), μ)The absolute value of the Jacobian determinant of F is just:|J(F)| = |μ-y|The integral of this over [0,1]^4 in the parameter space gives the 4-volume in the geometric space:∫_[0,1]^4 |μ-y| = 1/3We multiply by two to account for the other case, where the pair of opposite edges are the two vertical edges.So P(opposite) = 2/3.I think this is a simpler approach than trying to specify the required subset of the geometric space in terms of a collection of inequalities in the Cartesian coordinates. My original intuition was that this subset ought to consist of a union of convex polytopes in R^4 ... but it doesn't, the boundaries are not hyperplanes!
(DIR) Post #AzvBsfXK2GPqtvWySO by jjacobsson@mastodon.gamedev.place
2025-08-22T14:36:24Z
1 likes, 0 repeats
@gregeganSF 50-50, either it happens or it doesn’t :)
(DIR) Post #AzvBslZJblZjbqVeOe by gregeganSF@mathstodon.xyz
2025-08-23T05:25:31Z
0 likes, 0 repeats
Here is a more geometrically intuitive solution.We assume the square has both x and y coordinates ranging from 0 to 1.Imagine sweeping a line across the square (red in the animation) so that it always joins the top and bottom edges, and one endpoint or the other is always in one of the corners of the square.If we call the two points (x₁,y₁) and (x₂,y₂), suppose we hold y₁ and y₂ fixed, and look at the values of x₁ and x₂ so that both points lie on the red line.In the (x₁, x₂) plane, their values sweep out a parallelogram with vertices at (0,0), (y₁,y₂), (1,1) and (1-y₁,1-y₂). The area of this parallelogram is:|y₁-y₂|So for any fixed y₁ and y₂, this is the probability that the line between the two points with uniformly random x₁ and x₂ joins the top and bottom edges of the square.What is the average of |y₁-y₂| across all values of y₁ and y₂? This is just the volume of two pyramids with equal-sized triangular bases, one with y₁ ≤ y₂ and one with y₁ ≥ y₂. The height of both pyramids is 1, since that is the maximum that |y₁-y₂| reaches in both triangles. So the volume of each pyramid is 1/6, for a total of 1/3.We multiply by two to account for the other case, where the pair of opposite edges are the left and right edges.So P(opposite) = 2/3.