News for hackers. Stuff that matters.
Re:π does not equal 4 by cousin_it on Sunday November 21, 2010 @01:00PM (#1927460)
What... ouch. This is not math, this is... I don't even.

Read the post closely. The author introduces a set S of squarey curves approximating a circle. This set has an obvious correspondence with the natural numbers: there is curve #1, curve #2, etc. Then the author defines a function f: S->S that takes curve #n to curve #n+1. Wait, that doesn't sound right! The function f has no interesting structure whatsoever, it's exactly equivalent to defining f(n)=n+1 on the naturals. Of course, taking the "limit" of a function f: S->S makes no sense at all.

What would make sense is taking the limit of a certain function N->C, where N is the naturals and C is the set of all curves on the plane. That is, the limit of a sequence of curves (not of a function from curves to curves as the OP tried to say). To talk about such limits, you need to define what it means for a sequence of curves to converge - a "topology" on C. There are many ways to do that, some more outlandish than others. One way is pointwise convergence: assume a parameterization t->C_i(t) on each curves in the sequence, and require that C_i(t) converges co C_lim(t) for each t separately.

Now, pretty much any reasonable notion of "convergence" on the space of all curves has to imply pointwise convergence. That is, pointwise convergence is a very "weak" notion of convergence: if we have a sequence of curves that has a limit in some reasonable sense, then it had better coincide with the pointwise limit, dontcha think?

And here we come to the second facepalm moment in the post. Under pointwise convergence, the sequence of squarey curves under discussion does not converge to some "right angled fractal beast". It converges to the circle. As n grows, every point on S_n comes closer and closer to some point on the circle. Ain't nothing more to it.

Now the correct explanation for the original puzzle. Pointwise convergence of curves doesn't imply that their lengths converge to the limit's length. Hell, we don't even need 2-dimensional space to show that! A simple straight line will do. Imagine a human traveling a straight road of 1km length in this fashion: he takes two steps forward, then one step back, then repeats. In the end he will have traveled about 3km instead of 1km. As we make the human and his steps tinier and tinier, his movement looks smoother and smoother to an external observer, but he still travels 3km in total instead of 1. Or maybe (going back to the 2D space) the human could take a step left, then forward, then right; this would make his path look like a fine comb that approximates the straight line more and more closely, but it's always 3x longer. Something like this is happening in the original puzzle.

Finishing touch: there are notions of convergence where it's true that the length of the curves in the sequence always converges to the length of the limit. One such notion says that the direction of travel (velocity vector) must also pointwise converge to the velocity vector of the limit curve. Under this definition of convergence, the original sequence of curves does not converge, because it makes too many sharp turns.

Re:π does not equal 4 by neilk on Sunday November 21, 2010 @03:46PM (#1927832)
On a less trollish note, I had always been puzzled by the related question you discuss: why Manhattan Distance does not converge to the Euclidean distance.

I'm pretty uneducated about math, so please let me know what trap I'm falling into.

Your answer isn't yet helping me because you just note that Manhattan Distance remains the same no matter how many twists and turns there are. Yes, this is the premise of the question!

But turn up the twistiness to infinity. Now the Manhattan Distance line is identical to the hypotenuse. There is no point on the Manhattan distance line isn't also on the hypotenuse and vice versa. They both have an infinite number of points, of the same aleph-number, I think.

You mention a hypothetical path that doubled back on itself -- it is easy to see why that would result in a different answer. But the Manhattan Distance line is not doubling back on itself. Every point is a step towards the goal, and it doesn't cross itself. All of its deviations from the simple hypotenuse are infinitely small.

So why are the distances still different?

Re:π does not equal 4 by cousin_it on Sunday November 21, 2010 @04:57PM (#1927994)
There's no such thing as "infinitely small" deviation. The Manhattan Distance limit line is the hypotenuse, and its length is the length of the hypotenuse. The question is not about the limit line, which does not exhibit any weird behavior. The question is about the sequence of approximations to that line: why the length of the approximations doesn't converge to the length of the limit. And the answer is that it doesn't have to, because even though the approximations are very similar to the limit line in one respect (geometric closeness), they are all very different from it in another respect (directions and angles of travel). If we had a sequence of approximations whose direction of travel converged correctly, the length would converge correctly too.
Re:π does not equal 4 by ced on Sunday November 21, 2010 @04:12PM (#1927884)
Playing with infinities is dangerous business, and it's very easy to yield paradoxes like the OP. But note that before the 20th century, mathematicians like Gauss would avoid playing with such ill-defined objects, for precisely this reason[1]. Their rule was that you should first derive an expression in the finite case, then take the limit to infinity at the end.

In this case, it's mathematically simple that a Manhattan line should have the same length, no matter what N (the number of steps) is.

[1] http://en.wikipedia.org/wiki/Russell%27s_paradox for instance.

The Banach-Tarski paradox is also worthwhile: http://en.wikipedia.org/wiki/Banach%E2%80%93Tarski_paradox

I think nowadays most mathematicians are "comfortable" with such aberrant results, but that was not always the case. And there's still a chance that future generations of mathematicians will dismiss this work.

Re:π does not equal 4 by RiderOfGiraffes on Sunday November 21, 2010 @04:11PM (#1927883)
Perhaps I could more easily answer your question if you tried to explain why you think the length of the zig-zag line should approach the length of the straight line. It's zig-zagging - why should it end up the same length? You say that in the Manhattan Distance every point is a step towards the goal, but it's not directly towards the goal, therefore you always get a bit more than you want.

The number of points isn't relevant - the Cantor Set (also known as Cantor Dust) is an uncountably large subset of the real line, and yet its length is zero.

I guess the only insight I can offer at this point is that length has nothing to do with points.

Re:π does not equal 4 by jules on Sunday November 21, 2010 @06:40PM (#1928231)
I think he is not asking what he wants to know. He wants to know how we know why Archimedes' solution does converge to the right length. Couldn't there be a problem with his solution that we're just not seeing yet? i.e. what makes Archimedes right and the troll wrong?
Re:π does not equal 4 by sesqu on Sunday November 21, 2010 @08:00PM (#1928386)
Here's a thought: Archimedes's approximation approaches the target. That is, the perimeter of each subsequent approximation is closer to that of the circle than all that came before.

The side of a regular polygon is √(sin²(τ/n)+(1−cos(τ/n))²)=√(2(1−cos(τ/n))), while the corresponding arc is τ/n.

d/dn τ/n−√(2(1−cos(τ/n))) = −(τ/n²+sin(τ/n)/√(2(1−cos(τ/n)))) < 0, so the difference is strictly decreasing (note that sin(τ/n)>0 when n>2).

So there's your lower bound for the difference. You'd still have to prove the limit is at 0, though.

Re:π does not equal 4 by caf on Sunday November 21, 2010 @07:10PM (#1928283)
It's because the tangents to Archimedes' polygons also approach the tangents to the circle.

(This is the "velocity vector" convergence condition mentioned by cousin_it above).

Re:π does not equal 4 by jules on Sunday November 21, 2010 @08:46PM (#1928456)
That doesn't explain why. Why is it that if tangents approach the circle (whatever that means precisely) that the length of the approximation approaches the length of the circle?
Re:π does not equal 4 by caf on Sunday November 21, 2010 @11:04PM (#1928679)
Loosely speaking, the total path length is defined as the sum of a bunch of infintesimal segments that have both position and direction. For the sum (integral) of those infintesimals to approach the sum of the similar infintisemals around the actual circle, those of the approximation path have to approach those of the circle in the limit, and of course this means in both position and direction.
Re:π does not equal 4 by simcop2387 on Sunday November 21, 2010 @04:02PM (#1927865)
The reason it won't converge is that a very large number of the points will ALWAYS lie off of the line. While you might be able to make something that looks like a line on a computer screen when you make it smaller and smaller segments of manhattan distance. it will in fact only ever be able to intersect the real line (they are infinitely thin remember) at N+1 points at most (where N is the number of turns you make when following it along the grid in manhattan distance). because of this you will always have a very large portion of your approximation lying off of the line.
Re:π does not equal 4 by RiderOfGiraffes on Sunday November 21, 2010 @04:13PM (#1927887)
What you (simcop2387) say doesn't help, as I can produce curves that do as you describe and yet they do converge. It's possible to have convergence even when all the points lie off the line (in the only sense I can understand you to mean) so your comment isn't really an explanation.
Re:π does not equal 4 by neilk on Sunday November 21, 2010 @04:49PM (#1927970)
> The reason it won't converge is that a very large number of the points will ALWAYS lie off of the line.

No they won't. It moves zero distance horizontally and zero distance vertically. All the points of the infinitely zigzagging line are on the hypotenuse.

Of course, now we're back to Zeno; if it's not moving off the line, and it only makes progress when it's off the line, how can it get anywhere?

Re:π does not equal 4 by RiderOfGiraffes on Monday November 22, 2010 @05:15AM (#1929315)
For every fractally-type enclosing shape, yes they will. And when you talk about the limit, then you have a circle.

You can't talk about moving "zero distance horizontally and zero distance vertically" becuase then, as you rightly say, we're back to Zeno. You don't have an infinitely zigzagging line. That way of trying to think about things is a dead end, and unhelpful.

Better answers are given elsewhere in this thread.

Re:π does not equal 4 by ewjordan on Sunday November 21, 2010 @04:10PM (#1927879)
Put another way, the right angles approximation as N->infinity puts a countable infinity of points exactly on the line.

The true line has an uncountable infinity of points on the line, and the difference between an uncountable infinity and a countable one is an uncountable infinity, so we're still way the hell off.

Re:π does not equal 4 by RiderOfGiraffes on Sunday November 21, 2010 @04:17PM (#1927901)
That's irrelevant.

+ The limit has all the points on the line.

+ Uncountable sets can be of length zero

+ There are families of curves where at no stage do any of the points lie on the circle, and yet the limit is the circle, and the limit of the length is the length of the circle.

In short, your comment isn't really explaining anything.

ADDED IN EDIT: Whoa - cool - a downvote! Please, let me know where I'm wrong. I thought I'd explained clearly why the comment was wrong, and I have explained elsewhere more about what's really going on. No doubt you, the downvoter, have moved on now, but whoever you are, I'd love more information as to what you think I've got wrong.

Thanks.