Hacker News new | past | comments | ask | show | jobs | submit login
Coastline paradox (wikipedia.org)
164 points by scrlk 11 months ago | hide | past | favorite | 100 comments



I think I've heard this in reference to the difficulty of software estimation. The project details and potential problems are unknowns until you get to that specific part of the project. Even though theoretically you can see the "shape" and rough size of the project when zoomed out.


> I think I've heard this in reference to the difficulty of software estimation.

I don't like linking to Quora but I have to link the legendary "coastline trip" story posted by Michael Wolfe as a response to the question "Why are software development task estimations regularly off by a factor of 2-3?"

https://www.quora.com/Why-are-software-development-task-esti...


Yes, there's a classic blig post (sorry, no bookmark handy) about an analogous trip from SF to LA....

Also, (maybe counterintuitively), in software estimation the more fine-grained the estimates, the more likely they are to _underestimate_ project scope. For areas that are better-understood, the estimate will be (properly) limited in scope (reducing the overall buffer) -- which leaves less margin for error in the areas with more unknowns, where the biggest scope bloat is hiding. As a rule, software estimates should use a very broad brush. (This also helps mitigate the tendency of PHBs and product owners to mistake precision for accuracy.)



Thanks, yes - that's the one.

(Too late for me to correct "blig" -> "blog", whoops.)


Woa, from way back when a traffic sign with the word “Estimate” was considered helpful imagery


Schröder's Fractals, Chaos, and Power Laws had a digression about a family of distributions where the longer you've gone without observing something, the longer the expected mean time to first sighting becomes.

I read that and immediately thought well, this explains software schedule slips.

"The first 90% took us 90% of the scheduled time; the last 10% will take the other 90%..." (editor's note: 9% of that last 10%, anyway!)


you also should, and inevitably will, cut corners smaller than your "step" when actually following the "coastline" in development. the more fixated one on the smallest details, the longer it will end up


It's delusional. The only reason this is a problem in mathematics is because lines in mathematics are infinitely narrow, while in reality complexity is bounded.

In real life, specific unknowns in part of the project may turn out to be actually _easier_ than you thought, while in perimeter calculations it's always a lower bound at a higher scale.


Next time you go to measure your waistline, just remember: have you really put on weight, or is it just the coastline paradox?


This unfortunately doesn't quite work, because while there's no well defined upper bound, there is a lower bound.


true, but you could just argue that any increase was just a result of over-estimating the last time you measured


The lower bound is generally very easy to measure precisely. So a change in that would be immediately noticed.

For example, how long is the North Carolina coastline? No idea. But we can measure the precise distance between the point where that state's border with South Carolina meets the ocean, and the point where the border with Virginia meets the ocean. The coastline must be at least this long.

And if you measure your waistline, you can draw a cord around your midsection with some known amount of force. Your true waistline may be larger, but it is at least that large. And if that number increases...well, we're in a period of relatively high inflation already, what's one more thing?


Much more complcated problem than you're implying as NC has no unbroken coast. It's all shoals and barrier islands - and when you're inside that, swampland.


That does not affect the lower bound as described.


Unbroken coastline, shoals, barrier islands, etc, are all unrelated and irrelevant to the lower bound.

For example, the lower bound of the coastline of Canada is the straight-line distance from White Rock to Saint Andrew.


Interestingly there is no paradox for convex shapes, like measuring tape forms.


But isn’t the problem that the ‘object’ formed by the measuring tape/rulers isn’t representative of the (most likely) concave object you’re trying to measure.


It's not a problem for me or my waist in practice, no ;)


Of course, if you are using tape to measure your weight, you are using the wrong tool for the job.


Why?


... fractal hips?


'Doc, my hips have finite volume but infinite surface area.'


Related:

Coastline Paradox - https://news.ycombinator.com/item?id=24437749 - Sept 2020 (32 comments)

Coastline Paradox - https://news.ycombinator.com/item?id=21214958 - Oct 2019 (1 comment)


I’ve always found this argument very cool (and obviously true in a mathematical sense) but not really ”practically” relevant. Like, the only reason you would be interested to know the length of a coastline is because you want to know how far a ship would need to travel, and that is pretty well-defined. Or, like, if you wanted to do a naval blockade, you would need to know how many ships you’d need to cover the entire coast, given that a single ship can only cover so much.

Still a cool argument though.


The interesting thing is that while there is a 'practical' length, it varies depending on the application. So if you want to put a wind turbine every 1km along the coast, and a lamp post every 100m along the coast, the number of lamp posts you need won't be 10 times the number of wind turbines. It will be more.


The coastline paradox is useful as an illustration of how any measurement or observation is performed against an abbreviated version of reality that corresponds to a specific practical purpose, whereas the underlying complete reality is never phenomenologically accessible. (Measuring the coastline to arbitrarily high precision would require an arbitrarily high amount of energy and time, all the while the coastline is undergoing natural processes that change the result of the measurement.)

Just how there can never be a complete map, there can never be a complete and provably correct model of reality. A sufficiently detailed map becomes the territory, and if you with your measuring apparatus are part of the territory then you’d need to recurse infinitely. The fact that there can never be a complete map (complete and provably correct model of reality) is irrelevant to natural science itself, but it’s relevant to how we think about natural science and its limitations when it comes to explanatory capabilities.


That's similar to what Robert L. Forward responded at school. He was transferred from mathematics to physics (to good effect!). He had a hilarious autobiography online but can't find it anymore...


what if you want to take a hike along the beach and you want to estimate how long it will take to walk?


This depends on how big you are on a scale of “quark” to “ship”.


This is well defined as your stride and ability to micro correct determine the distance


I’ve never taken calculus (the last math class I took was an algebra class in high school in the late 1980s). But I read a description of calculus once that used the example of trying to figure out the length of a coastline and described how one could use smaller and smaller sections to estimate the length and this is what calculus is all about. But, this article doesn’t mention calculus at all, so now I’m wondering if my impression of what calculus is used for is all wrong.


Your impression is exactly right. The difference lies in something called smoothness. Loosely speaking, a smooth curve is one where if you zoom in far enough at any point, the curve starts to look like a straight line. You might have to zoom in a very long way, but as long as you eventually end up with something that looks straight, it counts as smooth, even if the overall shape is very wiggly. Loosely speaking, smooth curves behave well when you use calculus on them.

The coastline paradox is a situation where that doesn't happen. No matter how far you zoom in on a part of the coastline, you always find more detail -- bays and peninsulas, cliffs and inlets, pits and protrusions, tiny bumps, and so on. And the more of that detail you try to include in your measurement, the more your measured length will increase. In mathematics, we say that the length diverges. If you were measuring a smooth curve, the length would converge on a single value -- incorporating more detail would change the length, but only by tinier and tinier amounts.

Now of course a real coastline is a very complicated thing, and there are lots of practical obstacles to measuring one very precisely. So at some point we stop talking about real coastlines and start talking about a mathematical ideal, a kind of perfect roughness that's the opposite of the perfect smoothness we use for calculus. Such a perfectly rough curve is called a fractal.

There are also other things that can break calculus -- pointy curves, discontinuities, and infinities can all cause trouble.


Great explanatory writing, thanks.

> In mathematics, we say that the length diverges. If you were measuring a smooth curve, the length would converge on a single value -- incorporating more detail would change the length, but only by tinier and tinier amounts.

Can you say something bout the exponential curve in this context? IIRC whatever level we zoom to we see the same curve, neither converging nor diverging. Is there something special we should take note of here?


I think you might be remembering something else -- an exponential curve is proportional to its own rate of change. Exponential curves are smooth in the way I described -- if you zoom in far enough, they look straight.

The part about being proportional to its own rate of change does make exponential curves very important in calculus (and thus in science in general). Sine waves also have this property (although in a more complicated way). This is why you see exponential decay and sinusoidal oscillation so much in physics.


The exponential curve does look like a line when you zoom in very close to a point. For example, f(x) = e^x looks linear with slope e^x near x. You can see that, for small epsilon, e^(x+epsilon) - e^x is approximately epsilone^x, with an error term of the order of epsilon^2 e^x


Calculus deals with things that are sufficiently smooth on a small scale, and thus converges. For example, approximating a circle with smoother and smoother polygons. The length of those polygons will converge to the circumference of the circle.

The coastline paradox is the classic example of a fractal; the dimension of a fractal is actually greater than that of the space it lives within!


The word converge always confused me here when learning English. It's not like the edges of a circular polygon "converge" even in a hypothetically perfect circle. They more....blend together, or lose their edge. Either way maybe I've never properly understood the term.


What converges is the resulting value of the calculation. As you add more lines the approximate result (of the circumference) gets closer and closer to the true answer. It's not necessarily referring to the geometric shape of the polygon. (Though you can also see it as, if you take any given point on the circumference of the polygon, as you add more segments, that point will get closer and closer to the true edge of a circle.)


Unless when it doesn’t, see the problem of “squaring the circle”. Somewhat related to the coastline paradox as well.


I think what you're referring to is the false proof suggesting that pi=4. That is not what squaring the circle is, and does not in fact become smoother and smoother but rougher and rougher


The Wikipedia article states it's not really fractal.


It's not really a fractal in the sense that a fractal is a mathematical object, and a coastline lives in the real world. As your ruler gets smaller, it also becomes impossible to define what even is the coastline anymore - is it the wetted sandline? On a sufficiently small scale, where is the interface between land and sea?

Thus at sufficiently small scale it does break down, but the fractal nature over a very broad range of scales is clear; I feel like the Wikipedia article is tripped into pedantry at that point :)


On a sufficiently small scale, I guess you would have to start worrying about quantum effects. So, you would still have trouble measuring the coastline maybe not a paradox anymore but still quite a pain.


> But I read a description of calculus once that used the example of trying to figure out the length of a coastline and described how one could use smaller and smaller sections to estimate the length and this is what calculus is all about.

According to https://en.wikipedia.org/wiki/Outline_of_calculus:

> Calculus is a branch of mathematics focused on limits, functions, derivatives, integrals, and infinite series.

The coastline paradox is definitely an example of something that interests calculus people, and to tackle the problem they most likely will use a bunch of concepts and theorems of calculus.

However calculus, as a field is not this paradox.


Calculus and why it doesn’t help here are mentioned in the “mathematical aspects” section of the article


I was surprised to see that the real world example really does go up and up as the resolution of measurement increases:

https://en.m.wikipedia.org/wiki/File:Great-britain-coastline...

If stops at ~50m resolution. I imagine it could go even further.


The coastline paradox relies on the assumption that the coast is equally “jagged” at all levels. Is this actually true? I mean, if I go to the beach and look at the line where the water meets the land it doesn’t really seem like a fractal to me.

The outer boundary of land masses gets smoothed out by erosion from the water, right?


If the coast is a sandy beach, then it is usually pretty smooth.

But in other cases ... https://www.nps.gov/articles/images/acad-ship-harbor-rocky-c...


> If the coast is a sandy beach, then it is usually pretty smooth

But it underlines another issue in this problem. What is defining the coastline ? If it’s water touching the land, it’s always moving, if it’s land at sea level, it’s eight always moving or approximated depending on your definition. And billions of billions of billions of billions of … of grains of sand seems like very near to fractal that could arguably add billions of coastline kilometers depending on your max definition.


> it doesn’t really seem like a fractal to me.

That's because you don't look close enough.


The Wikipedia article states it's not really fractal.


It actually bottoms out pretty low though. The apparent fractal dimension changes over scales, but is sufficient that ruler length really does make a huge distance in coastline length


Rocks and boulders have all kinds of different sizes in general. If the coast/beach area is all smooth and uniform small particles (ie sand) then it would be easy to measure as long as you use a ruler larger than ~10 grains of sand. If there are ranges of particles from 1cm (pebbles) to 10 cm (rocks) to 10 meters (boulders) to 100 meters (rock outcroppings) then the effect kicks in.


Sure but the quantity that’s important is your sampling accuracy. Even on a visually smooth beach there is enough variation for that to significantly impact the results. This closely relates to numerical integration where often you’re dealing with fixed sized steps and for example can simulate significantly stiffer materials with a smaller timestep.


You're taking the term "Coastline" literally. It's an abstract idea, and a coastline is a good way to conceptualize it as a real thing.


If you look close enough the sand is pretty jagged I guess.


A simple way to think about this is this: draw circles along the coastline, all of radius R, such that the entire coastline is within some circle, with the circles centers are spaced R apart. For a given R, there is some minimum number of circles N which will cover the coastline. Smaller values of R require more circles.

The length of the coastline for a value of R is RN. Plot RN vs. R.

Trying to use a ruler on an irregular edge is ill-defined. If you formulate the problem as a chain of circles, there's a well defined result.


What you will find is that in the plot the length doesn't level off as R gets smaller. It will just get larger without bound.


Another fairly counter-intuitive map-related thing is that Edinburgh is further west than Bristol, and roughly on the same longitude as Cardiff.

There's no real advanced math or optical illusion going on here, it's pretty obvious when you look at the map. It's just that our minds just make a simplistic "it's on the east coast, and therefore further east than things on the west coast"-shortcut. It works most of the time, except when it doesn't.


Reno, Nevada is further west than Los Angeles, California. Same effect, US perspective :)

Heck, Spokane, Washington is nearly the same longitude as Los Angeles.


I understand why the measurement of a coastline changes depending on how you measure it. I do not understand why it is important to measure coastlines. ¯\_(ツ)_/¯


Note that it can apply to borders too.

> the Portuguese reported their measured border with Spain to be 987 km, but the Spanish reported it as 1214 km.


ok so why does it matter for borders?

the location of the border seems important, but not the length.


It isn't


Are there any definitions of length, or specifically perimeter length, that are more intuitive for comparison purposes, and practical, and actually used, perhaps separating smoothed path length from path roughness?


There's convex hull which is how you measure your body with a measuring tape. The tape straightens itself over any recesses like where your belly button is.


It also imples that any border between countries that is defined by a natural border, eg a river is infinitely long, right?


No since water boundaries like rivers are defined as the middle of the river, not as the shifting coast of either side of the river.


Not always. The boundary between VA and MD (states in the USA) is the Virginia shoreline of the Potomac River.

Which has caused oddities over the years…

At one time, gambling and liquor were illegal in VA, so casinos set up boats at the low tide line. Customers parked in VA and walked onto the casino barges from the Va side, but they were technically in MD.

You need to follow MD fishing regulations even from VA shore (though a VA license is ok).


My uncle once argued a case in the U.S. Supreme Court regarding Indiana & Kentucky's border, which was initially established in the middle of the river.

The Ohio River has gradually shifted south since the border was established, so some parts of Kentucky are now on the "wrong" side of the river.


The former capital of Illinois is on the wrong side of the Mississippi nowadays


genuine question: how is the middle defined when both shores are fractals?


I've thought about this before and came to the non-rigorous conclusion that if you define the middle as always being equidistant between the nearest points on the shoreline, then its length must be finite. The same is true if you define it as the shortest path through the river.

Basically this is because an infinite-length line must "loop back" on itself, so that at some point it curves by at least 90° from the main direction of movement. This can never happen at a small scale for the middle of a river.

I would really love a mathematician to weigh in on this though. The one main problem I can see is that it might lead to something akin to the Weierstrass function https://en.wikipedia.org/wiki/Weierstrass_function which itself has infinite length, although I don't quite understand why this is or if it's applicable to the case of rivers.


Lawyers don't really think about these things in the same way that mathematicians do:

https://en.wikipedia.org/wiki/Thalweg#Thalweg_principle

> The Treaty of Versailles, for example, specifies that "In the case of boundaries which are defined by a navigable waterway" the boundary is to follow "the median line of the principal channel of navigation."


As an example, here is what is said by Oregon & Washington about the border between them. This was ratified by both states in a compact. It looks like they switched from less precise definitions like "the varying center of the main channel of the Columbia River" to a list of precise coordinates.

Washington: https://app.leg.wa.gov/rcw/default.aspx?cite=43.58&full=true

Oregon: https://oregon.public.law/statutes/ors_186.520


Wondering the same, don't enlightenment there would be great


But the middle of the river is just a function of both shifting coasts.


Why don’t the people in charge of measuring just agree on some unit of resolution?


All surfaces are definitional. A surface exists when you define it.


Step 1: Acquire small beachfront property

Step 2: Put property on the market, listed as having a mile of beach

Step 3: ???

Step 4: Profit

There's no way this could backfire, unless the buyer asks how big your ruler is. But a true gentleman never questions the size of another's ruler, so you should be in the clear.


Listings already have these and worse things.

E.g.: properties are routinely described as “X minutes away from beach”, where in reality it’s impossible without teleportation.


as the crow flies

at the speed of a bullet


Do bullets fly for minutes? (Edit: to be clear, that's a genuine question. I would imagine they drop to the ground before the "three minutes from the beach" have passed no matter the firing angle, but I don't know.)


> Do bullets fly for minutes?

Effectively no. MythBusters said a 30-06 shot straight up could hit 10K feet and would take just under 1 minute to hit the ground. I'd be comfortable asserting that a 30-06 is about the largest 'normal' cartridge. Bigger ones definitely exist, but they're a niche.

Handgun rounds are generally a lot slower and lighter than a 30-06, so they'll all be even quicker to reach the ground. Plus, to hit the beach, you'd shoot at about a 45 degree angle instead of straight up, which would reduce the height reached.


Depends on gravity of the body and its atmospheric pressure and related variables (wind speed, temperature, composition - lead bullet could meld on Venus, etc.).

Low gravity & no atmosphere- bullet reaches escape velocity and wanders off to space.

Very high atmosphere & fired high up above ground (if any - eq. gas giant) and bullet might take quite a while to fall.


Bullets take the same amount of time to fall as if you dropped it!


Not exactly:

https://en.wikipedia.org/wiki/Magnus_effect#In_external_ball...

can make ULR bullets drop faster or slower depending on crosswind direction and strength.


Where I'm from realtors solve this problem by declaring the length of the sea-opening (not sure of the English word, not a native speaker), the length of the straight line between two ends of the coast access.

Well, this could be a problem, of course, if you are selling an island.


Especially if you're selling the whole island except for the place where a two-meter-wide footbridge connects to it. The sea-opening would be two meters no matter the size of the island


would be especially misleading if it’s a cove

a U shaped beach would be listed with half its effective beach area


> There's no way this could backfire, unless the buyer asks how big your ruler is.

Or it goes through a real world court system where judges take very dim views to that level of pedantry...


Yes, the GP was clearly serious in their advice to exploit the coastline paradox in order to mislead would-be buyers! (/s)


Can you get a decent approximation by measuring displacement? Dump a bucket of water in the ocean, observe the level of sea rise, that tells you the volume of the island, and indirectly the area of the edge.


Do this with Gabriel's horn and you'll observe that it has an area of pi, which does not reflect the fact that its perimeter is infinite.


Yeah, I'm not sure how I concluded you could go from volume to area.


It does seem intuitive that you'd be able to, I can certainly understand how you'd think that. But no!


Nope. Edges do not work that way. Mathematically a fractal outline can have infinite length but finite area.


Consider a short portion of shoreline in Fourier space. By keeping the "DC" term constant (i.e. the integral), you have complete freedom to change all other terms. By increasing high frequency terms the length of shoreline can tend to infinity without changing the area of the island.


> the area of the edge

No, it will give you the area of the island (more precisely, the area of the sea-level cross section of the island).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: