Ask

Scatter n random points in a disc and join each to its nearest neighbour — how large do the clusters get?

Worth adding that the same question in one dimension is a nice sanity check and is fully tractable by hand.

Points on a line, each joined to its nearest neighbour: work out the probability that two consecutive points are mutually nearest and you get an exact constant, and hence an exact expected cluster size. It is a good exercise because the geometry is trivial and the argument is identical in structure.

The general point worth taking away is that these nearest-neighbour graphs are quite rigid objects. Each vertex has out-degree one, cycles can only have length two, and every component contains exactly one cycle. That structure is what makes the counting argument above work at all, and it is the sort of thing that looks like a coincidence until you prove it.

21 · in/math-help ·

What is Chebyshev's inequality actually telling me, in a form I can picture?

Your instinct about the trade-off is exactly right, and the picture makes it precise.

The integral is a fixed budget of area. If you want the function to be very large — lambda big — then the set on which it achieves that must be correspondingly small, or the rectangle would not fit under the curve.

So: a function cannot be big on a large set without having a large integral. Which is intuitively obvious and is exactly what the inequality formalises.

That also tells you when the bound is tight and when it is useless. It is tight when the function actually looks like that rectangle — constant at lambda on a set and zero elsewhere. It is very loose when the function is enormous on a tiny set, because then the integral is dominated by a spike the bound knows nothing about.

26 · in/math-help ·

What is Chebyshev's inequality actually telling me, in a form I can picture?

There is a picture and it makes the whole thing obvious in about ten seconds.

Draw the graph of your function. Draw a horizontal line at height lambda. Look at the set of points on the domain where the graph is above that line — call its measure m.

Now draw the rectangle sitting on that set, of height lambda. Its area is lambda times m.

That rectangle is entirely underneath the graph, because on that set the function is at least lambda by definition. And the integral of the function is the total area under the graph.

So the rectangle's area cannot exceed the integral:

lambda × m  ≤  ∫ f

Rearrange and you have the inequality. That is the whole content: a box that fits under the curve is no bigger than the area under the curve.

30 · in/math-help ·

Given a parabola and a fixed arc length, how do I find the matching point on a different parabola?

There is a nice way to think about what you are computing, which also tells you the answer's qualitative shape.

You are asking for the level curves of the arc-length function on the plane of (x, a) pairs. Each curve joins all the points that are the same distance along their respective parabolas.

Those level curves are always perpendicular to the gradient of the arc-length function, which gives you a differential equation describing them. Solving that numerically traces the whole family at once, which is more efficient than solving separately for each new coefficient if you want many of them.

Qualitatively: as the parabola gets tighter, the matching point moves inward in x and the curve climbs faster, exactly as a bent wire would. That the answer behaves like a wire is not a coincidence — arc length is precisely the quantity a wire conserves.

21 · in/math-help ·

A serious vulnerability was found in a Java logging library — are its ports to other languages affected too?

Practical note for anyone doing this under time pressure: write down your reasoning and your sources at the time.

The conclusion "the ports are not affected because the flaw required a platform feature they do not have" is a defensible answer, and in three months nobody will remember why you concluded it. A short note with the advisory reference and the two sentences of reasoning saves the whole exercise being repeated by the next person who asks.

13 · in/privacy-tools ·