Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 237 posts.

2024
122

Win your fantasy league using operations research

I’ve never been good at playing football 1 . I started playing again last year and I have scored more own goals than goals for my team. Also, I support the RCD Espanyol 2 , which has spent last season in the second division and has miraculously ascended to the first division last week. And to be honest, I only watch…

124

Constructing a Four-Point Egg

For reasons beyond the scope of this entry, I have been investigating elliptical and ovoid shapes. The Wikipedia article for Moss’s egg has a link to a tutorial on Euclidean Eggs by Freyja Hreinsdóttir which (amongst other things) describes how to construct the “four point egg”. I think it is a nicer shape than Moss’s…

127

Dividing unsigned 8-bit numbers

Division is quite an expensive operation. For instance, latency of the 32-bit division varies between 10 and 15 cycles on the Cannon Lake CPU, and for Zen4 this range is from 9 to 14 cycles. The latency of 32-bit multiplication is 3 or 4 cycles on both CPU models.

134

RSA is deceptively simple and fun

While reading Real-World Cryptography , I came across the "million message attack" . This is an attack that Daniel Bleichenbacher demonstrated in 1998, which effectively broke RSA with a particular encoding function called PKCS #1 . It was only mentioned briefly, so I dug in and decided to try to understand the…

136

Solving SAT via Positive Supercompilation

The boolean satisfiability problem (“SAT” for short) is arguably the most famous NP-complete problem in theoretical computer science. According to Wikipedia, it is “the problem of determining if there exists an interpretation that satisfies a given Boolean formula ”; or, in simpler terms, if there is at least one…

148

The Second Law of Thermodynamics (2011)

Web site content explains the modern view of entropy change and the dispersal of energy in a process (at a specific temperature). It has been selected for instructors in general and physical chemistry by Dr. Frank L. Lambert, Professor Emeritus (Chemistry) of Occidental College, Los Angeles.