// HACKER NEWS — CYBERSECURITY
Every shape can be cut exactly in half with one straight line
Take any bounded 2D region with positive area. Make it ugly. Add dents. Stretch it. Punch holes in it.
There is a clean mathematical guarantee: there is always at least one straight line, oriented in that exact direction, that divides your shape into two pieces of identical area.
You don't need to guess if a solution exists; the mathematics guarantees it is there. The interesting part is trying to find it anyway.
I recently built a small browser game around this idea called Bisecto, and while implementing the cutting engine, I stumbled into a fascinating gap between mathematical certainty and human perception.
Why is a perfect cut guaranteed for any direction? The foundation is a basic consequence of continuity: the Intermediate Value Theorem (IVT).
(Here we're talking about a 2D region and a 1D straight line. In 3D, the same argument works with a plane and volume.)
Consider a bounded 2D region S with finite positive area A > 0. Pick any line orientation θ. Imagine sliding a straight line with that orientation continuously across the shape from one side to the other, parameterized by its position offset t.
Let f(t) be the area of the shape lying on one side of the line:
Because 0 < A/2 < A, the Intermediate Value Theorem guarantees that f(t) must hit exactly A/2 at some point:
For every orientation, a perfect cut exists. While shapes with internal voids can sometimes allow a small range of offsets that yield a 50/50 split, there is always at least one valid cutting line.