## Fair and Square Solution

*January 17, 2011 at 8:40 pm* *
19 comments *

A few days ago, I posted the following problem:

Three points are randomly chosen along the perimeter of a square. What is the probability that the center of the square will be contained within the triangle formed by these three points?

In that post, I mentioned that I had an elegant solution. If you want to think about the problem a little before seeing my solution, check out the Three Points page at the MJ4MF website. I created a really cool Excel file that allows you to explore 100 cases at a time. I think it’s worth a look.

But if you’re not interested in any of that, here’s my solution…

Without loss of generality, choose any two points along the perimeter. Call them A and B. Then, construct segments AD and BC that pass through point P, the center of the square.

This gives four cases:

- If A and B are the two chosen points, then the third vertex must be chosen along segment CD to form a triangle that contains point P.
- If B and D are the two chosen points, then the third vertex must be chosen along segment CA.
- If D and C are the two chosen points, then the third vertex must be chosen along segment AB.
- If C and A are the two chosen points, then the third vertex must be chosen along segment BD.

What we’ve now done is selected two sets of points in **four** different ways, and the portions along the segments where the third point could be chosen collectively comprise the **entire perimeter**. Consequently, the probability that a point along the perimeter is 1, but this is divided among 4 cases, so the probability that a randomly selected triangle will contain the center is **1/4**.

As a footnote, points A and B were chosen arbitrarily, so there is no loss of generality.

Entry filed under: Uncategorized. Tags: proof, square, triangle.

1.Julia | January 17, 2011 at 10:31 pmThat IS elegant. Meanwhile, I’ve tried to solve it and after many dead ends (including double integrals, differential equations and other long-forgotten debris) ended up with 1/8.🙂 Here’s how:

Start with A and B on a square with perimeter = 1 (the case when perimeter is not 1 is left to the reader :)). The distance is AB. The third point must now land in a segment of length CD = AB.

Using the law of total probability:

P(midpoint in triangle) = Limit of P(0<AB<dx)*dx+P(dx<AB<2dx)*2dx+…+P(1/2-dx<AB 0.

(The endpoint 1/2 is because that’s the greatest distance possible between A and B).

Now this limit is the integral(x*dx, 0, 1/2) = 1/8.

This is wrong (your solution is convincing) and I think that my mistake was to only consider A to one side of B.

A better integral would be integral(x*dx, -1/2, 1/2) = 2*1/8=1/4.

It’s been sooo long since I did this kind of thing. Any comments will be welcome.

2.Julia Tsygan | January 18, 2011 at 12:15 pmOops, typo, that limit should end with P(1/2-dx<AB<1/2)*1/2.

3.venneblock | January 18, 2011 at 8:58 pmJulia, a colleague used a similar approach involving double integrals. However, her approach broke it into the four cases where the three points could occur (all on one side; two on one side, the third on the opposite side; two on one side, the third on an adjacent side; and, all three on different sides), and then she used calculus to compute the probability for each of the four cases. Her method was a little different, but like you, she got an answer of 1/8. Also like you, she required that the second point must always occur to one side of the first point. (When I suggested that was her error, though, she didn’t like the suggestion.)

Anyway, I thought this problem deserved a place in the “Problems” section on my website. Feel free to check it out at http://mathjokes4mathyfolks.com/problem_threepoints.html. You might enjoy playing with the spreadsheet to which the page links. (I certainly enjoyed creating it!)

4.Julia | January 18, 2011 at 9:47 pmOh, that’s neat. So there are three solutions so far? I posted this problem on facebook yesterday and so far one of my (high school) students has solved it – but I have to give him chocolate in exchange for the solution so I haven’t seen it yet.

I’m troubled by the 1/8. While you and I suspect that it’s due to ordering the points a certain way, how can we be sure? Why wasn’t your colleague convinced? This element of weird uncertainty often strikes me in probability more than in any other field of mathematics. It has to do with combinatorics, which I can’t say I ever developed an intuition for. In this case, does my (and your colleague’s) solution depend on AB and BA being two distinct / the same possibilities?

5.venneblock | January 19, 2011 at 6:14 amI can’t be sure, actually. I’m so many years removed from double integrals that I had to trust my colleague. But when she said, “So after I choose x, I have to choose y to its right,” a red flag went up for me. Just didn’t feel right. I don’t have a convincing argument against it, but I saw no reason she should exclude choosing a point on either side.

Probability is often counterintuitive. That’s why I prefer to think about these types of problems holistically rather than case by case. When working with cases, I’m always worried that I’ve forgotten a case, or made a mistake with a case. When I think about the problem as a whole, I can feel more sure of myself and my answer.

I don’t know exactly what’s wrong with the answer of 1/8, but I do know I feel pretty confident about my answer of 1/4. That’s what I’m resting on.

6.Joshua Zucker | January 19, 2011 at 10:30 amSure, you have to divide by the total, just like in a counting problem: divide number of successful outcomes by total number of equally likely outcomes to get the probability.

Same with the integral: if you have integral from 0 to 1/2 of x dx then you have to divide by the integral from 0 to 1/2 of dx.

My argument was somewhere in between these two (Pat’s beautiful one and the integral approach): take a random point. Now take a second random point. The distance along the perimeter from the first point to the second is uniformly distributed from 0 to 1/2, hence on average it’s 1/4. And (the key realization for any of these approaches) the length of the segment into which the third point has to go is the distance between the two points, so it’s also on average 1/4.

7.venneblock | January 19, 2011 at 8:51 pmJosh — My colleague (the one who also came up with 1/8) argued against my solution, claiming she didn’t think there was necessarily a uniform distribution of points. I like that your solution invokes the term “uniform distribution.” Yet my lingering question… even though I believe it is uniformly distributed, how do you prove that it is?

Wouldn’t you knotw it — Harold Reiter and Arthur Holshouser couldn’t leave well enough alone — they modified it to ask for the probability that the center is contained within any regular 2n-gon (i.e., an even number of sides) when any number of points less than 2n are chosen along the perimeter. Harold told me the answer they got, but I don’t have a solution yet.

8..mau. | January 20, 2011 at 9:39 pmI thought about added points C and D, but at that point stopped, not wanting to do double integrals🙂

I would modify a bit your proof in this way:

– choose a point A at random, and find the symmetrical point D.

– then for each point B chosen at random, consider the PAIR (B,C), where C is the symmetric of B. As you say, the sum of the probabilities that the third vertex gives a “good” triangle starting with A and B or with A and C is 0.5, whatever B is. But in this way you counted any point twice, since the pair (B,C) and the pair (C,B) is the same thing; so you have to divide the result by 2 obtaining 0.25.

9.venneblock | January 20, 2011 at 11:38 pmI admit my proof wasn’t ready for prime time. Nice emendations. If I publish it somewhere, you get half the royalties!

10.Claudio | January 26, 2011 at 11:27 amHi,

a colleague of mine and I tried a brute force simulation for the 2 dimensional case and obviously got the 1/4 approximation (we used a Mathematica script together with this piece of knowledge: http://mathworld.wolfram.com/TriangleInterior.html)

I challenged my colleague (who is a much better mathematician than me) to generalise the result and we conjectured that for the n dimensional case the probability of finding the centre of the n-dimensional cube within a n-dimensional pyramid created by n+1 random points on the hyperfaces shoud be 1/2^n.

Quite surprisingly that is the case and a few hundred thousands trials per dimension are showing exactly that.

Could any of the 2-dimensional proofs easily be extended to the n-dimensional case?

11.venneblock | January 26, 2011 at 7:58 pmI don’t know the answer to your question, and I don’t easily see a why to extend my argument to the n-dimensional case. I’ll need to give it some thought. I may also send it to my friend Harold Reiter; he and his friend Arthur Holshouser solved a different generalization (see comment #7 above), so they may have thoughts on this one, too.

12.Wild About Math bloggers 1/28/11 » Fun Math Blog | February 4, 2011 at 10:20 am[…] solution is very elegant. If you want to cheat (or give up) the solution is here. SHARETHIS.addEntry({ title: "Wild About Math bloggers 1/28/11", url: […]

13.jd2718 | February 20, 2011 at 6:31 pmI think the answer should be 4/15

The solution offered is nice. But see the bottom. I have a quibble.

I considered 4 cases:

3 points on a side P = 1/16

2 points on a side, and one on an adjacent side P = 6/16

2 points on a side, and one on the opposite side P = 3/16

points on 3 sides P = 6/16

The first case (3 on a side) yields no triangles.

The second (2 on a side, one adjacent) never encloses the center.

The third case (2 on a side, one opposite) I used analysis like yours, but found P = length of the segment on one side, integrated, got 1/3.

The fourth, points on 3 sides, I connected the points on opposite sides. The adjacent point will enclose the center either on the left, or on the right, so 1/2

But here’s the problem

3/16 x 0 = 0

6/16 x 1/3 = 1/16

6/16 x 1/2 = 3/16

Adds to 4/16, right? But you’ve asked about the triangle, and in 1/16 of the cases there is no triangle. Looks to me like 4/15 of the triangles enclose the center.

14.jd2718 | February 20, 2011 at 6:34 pmI can see two corrections.

1. Reword

“What is the probability that the center of the square will be contained within the triangle formed by these three points?” to

“What is the probability that the center of the square will be contained within a triangle formed by these three points?” or to

“What is the probability that these three points will form a triangle containing the center of the square?”

2. Modify your solution by multiplying by the probability a triangle is actually formed (15/16). This is not so nice, and yields my quibble-answer.

Jonathan

15.venneblock | February 21, 2011 at 12:19 amThree collinear points form a triangle — it just happens to be degenerate. (Consequently, it has a lot in common with my friends.) I think the James and James math dictionary provides a definition of triangle without stipulating that they must not be collinear, allowing for the degenerate case. The book is at my office, so I’ll check it out on Tuesday — but I think it’s James and James; if not, I know that I’ve seen definitions that allow for this very case, and I’ll see if I can find a reference.

I definitely don’t like any rewording of the problem where the answer must be changed to 4/15.

16.jd2718 | February 21, 2011 at 12:46 amI would suggest going with “What is the probability that these three points will form a triangle containing the center of the square?” and avoiding all ambiguity, while keeping the elegance of your solution intact.

Jonathan

17.Blog: Proofs from the Book « Math Jokes 4 Mathy Folks | February 13, 2013 at 7:52 am[…] generated by Excel. With no pencil, no paper, and no agenda — just some time to think — an elegant proof came to me as I was picking up feces. (I have no idea what that says about […]

18.Proofs and Jokes Have a Lot in Common - Proofs from The Book | February 22, 2013 at 4:55 pm[…] and jokes is that an elegant proof is as enjoyable as — and perhaps more than — a good joke. My favorite proof, in fact, is one that came to me while I was walking my dog, and its beauty far surpasses that of […]

19.What If? | Math Jokes 4 Mathy Folks | March 30, 2015 at 7:33 am[…] Unsure how to attack this problem, the answer was estimated using an Excel simulation. From the insights gained by that simulation, a solution eventually revealed itself. […]