New

The latest blog posts to take off on Hacker News. 2,851 posts.

Math & Algorithms
Any year
123

Squares in Squares

The following pictures show $n$ unit squares packed inside the smallest known square (of side length $s$). If a pictured packing has multiple numbers in its label above, the picture represents the largest; each smaller is represented by removing any square. For the $n ≤ 324$ not pictured, the trivial packing (with no…

124

What it takes to transpose a matrix

Classical CPU architecture is a poor choice for performing matrix-oriented computations. Developers have to spend much effort to create efficient algorithms even for the problems appearing trivial on the surface. Matrix transpose is probably the most striking representative of such problems. It exposes numerous…

127

The quadratic sandwich

If you have ever tried to minimize a function with gradient descent, you probably noticed that some functions are a joy to optimize and others are a nightmare. The difference often boils down to two properties: strong convexity and L-smoothness. These two concepts define a “sandwich” of quadratic bounds around your…

135

You can beat the binary search

We sometimes have to look for a value in a sorted array. The simplest algorithm consists in just going through the values We sometimes have to look for a value in a sorted array. The simplest algorithm consists in just going through the values one by one, until we encounter the value, or exhaust the … Continue reading…