Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>I realized there are only finitely many candidate rectangles that might possibly maximize the discrepancy. They are the rectangles in which each of the four sides passes through at least one dot.

That's really a non-trivial insight. It makes perfect sense once you hear it, but I'm not sure any amount of thought would have lead me to it were I in the author's position.



For what it's worth, it occurred to me right away. If you spend any time learning about and solving continuous optimization problems, one of the first patterns you notice is the existence of criteria that narrow possible optima to a finite number of possible points. For example, using basic calculus on differentiable optimization functions these are the "critical points". In linear programming, we can consider only the vertices of the polytope defined by the constraints.

If such reasoning doesn't occur to you right away, you might also discover this fact by considering a candidate rectangle and considering how changing it slightly changes the discrepancy. A very simple kind of change would be one in which no points enter or leave the rectangle, which leads to this observation.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: