kuniga.me > NP-Incompleteness

NP-Incompleteness

Asymmetric Numeral Systems

20 Aug 2026
Cartoon of a bespoke machine to compress a cloud. Generated with Nano Banana.

Jarosław Duda is a Polish professor at the Jagiellonian University in Kraków. He developed a family of entropy coding methods called asymmetric numeral systems (ANS), mainly used in data compression. He wanted these to remain patent-free but has had mixed success.

Google worked with Duda around 2014 in a paper Mixed boolean-token ANS coefficient coding and tried to patent a coder for video, but Duda pushed back and Google abandoned the attempt. In 2019 Microsoft was able to patent a variant and since then other patents have been granted internationally.

A variant of ANS, known as FSE, is used by Meta’s compression library called zstd. I wanted to learn more about it and decided to study this algorithm first.

Continue reading...

Euclidean Minimum Spanning Tree

17 Aug 2026
MST Logo.

Otakar Borůvka was a Czech mathematician who is best known for his work in graph theory. Once, his friend Jindřich Saxel, an employee of the West Moravian Power Company, asked him for help optimizing electric distribution networks.

Borůvka modeled the problem as the minimum spanning tree problem and then came up with the first known algorithm to solve it, now known as the Borůvka algorithm.

In this post we’ll explore the Borůvka algorithm combined with KD-trees to solve the Euclidean Minimum Spanning Tree problem more efficiently.

Continue reading...

Atomic Posts

15 Aug 2026
Ship containers, cartoon style. Generated with nano banana

I’m using the term atomic post in reference to the concept of atomic habits. The idea is for posts to be as narrow as possible in scope, while still being self-contained.

Continue reading...

Folly F14 Map

07 Aug 2026
Folly Logo

F14Map is Folly’s alternative to std::unordered_map and in this post we’ll explore this data structure in detail.

We’ll start with std::unordered_map which implements a more textbook version of hash maps using linked lists to handle collisions and then cover F14FastMap which uses a chunked (14 entries / chunk) open addressing implementation and leverages SIMD instructions for efficiency.

Continue reading...

Velox: Memory

04 Aug 2026
Velox Logo

Velox is an open source C++ library by Meta that can be used to perform computation common to distributed engines like Presto.

Its offerings include columnar operations, a rich type system, an expression parser and a smart resource management such as memory [1]. In this series of posts we’ll go over different components of Velox.

In this post we’ll study memory management done by Velox.

Continue reading...

Visit archive to see all posts...

Sub-pages