Hacker News with Generative AI: Algorithms

This New Algorithm for Sorting Books or Files Is Close to Perfection (wired.com)
Computer scientists often deal with abstract problems that are hard to comprehend, but an exciting new algorithm matters to anyone who owns books and at least one shelf.
(Ab)using general search algorithms on dynamic optimization problems (2023) (dubovik.eu)
In retrospect, my most ambitious blog yet. As it goes, I was reading “Artificial Intelligence. A Modern Approach” the other day. In one of the earlier chapters the authors discuss general search algorithms: breadth-first search, depth-first search, uniform-cost search (Dijkstra), and variations of those. A bit later they also cover Monte Carlo tree search as a way of finding approximate solutions in big state spaces.
Why the Algorithm Hates You (cognitivewonderland.substack.com)
Science, philosophy, and science fiction geekiness, with a special interest in neuroscience and philosophy of mind. Publishes weekly on Thursdays.
How a computer that 'drunk dials' videos is exposing YouTube's secrets (bbc.com)
YouTube is about to turn 20. An unusual research method is unveiling statistics about the platform that Google doesn't want you to know.
JesseSort: A novel sorting algorithm that is faster than Python's default sort. (github.com/lewj85)
JesseSort is a novel sorting algorithm that introduces a new data structure called a Rainbow to efficiently organize and merge elements. It achieves a runtime of O(n log n).
Ask HN: What's the best implementation of Conway's Game of Life? (ycombinator.com)
Anyone else, like me, at one point try to implement Conway's Game of Life? If you have, what is the best implementation you've found?
Undergraduate shows that searches within hash tables can be much faster (quantamagazine.org)
A young computer scientist and two colleagues show that searches within data structures called hash tables can be much faster than previously deemed possible.
Generating Voronoi diagrams using Fortune's algorithm (redpenguin101.github.io)
Generating Voronoi Diagrams using Fortune’s Algorithm
Elastic Binary Trees (2011) (blogspot.com)
In computer science, an elastic binary tree (or EB tree or EBtree) is a binary search tree specially optimized to very frequently store, retrieve and delete discrete integer or binary data without having to deal with memory allocation.
Keep 'em (not) separated: detecting discontinuities in grid graphs (holm.dog)
In this post, I'm going to describe how I efficiently detected enclosed spaces in my browser game's map.
Disassembling a binary: linear sweep and recursive traversal (nicolo.dev)
Building your own set of analysis tools is a great exercise for those who already have some basics and allows you to later move on to implement more targeted analyses in reverse engineering. Even just seeing how the different algorithms can be implemented provides a mental framework that may help when reverse engineering more difficult-to-analyse executable files, i.e. obfuscated ones.
Optimizing with Novel Calendrical Algorithms (jhpratt.dev)
After exercising some creativity and applying some mathematical tricks, I was able to achieve something that I am more than happy with.
Optimizing with Novel Calendrical Algorithms (jhpratt.dev)
I was able to create performant, branchless, and const-compatible algorithms for converting an ordinal date to a calendar date that is 57.5% faster than the previous implementation, the month-only algorithm 43.2% faster, and the day-only algorithm 48.1% faster.
Why sorting is harder than it seems (plainopen.com)
This story is about sorting arrays. I am telling it because sorting continues to surprise me with delightful bugs. Frustrating too, but also delightful.
Burrows–Wheeler Transform (wikipedia.org)
The Burrows–Wheeler transform (BWT, also called block-sorting compression) rearranges a character string into runs of similar characters.
Bzip3: A spiritual successor to BZip2 (github.com/kspalaiologos)
A better, faster and stronger spiritual successor to BZip2. Features higher compression ratios and better performance thanks to a order-0 context mixing entropy coder, a fast Burrows-Wheeler transform code making use of suffix arrays and a RLE with Lempel Ziv+Prediction pass based on LZ77-style string matching and PPM-style context modeling.
Practicing graphical debugging using visualizations of the Hilbert curve (akkartik.name)
“..you don't understand things, you just get used to them.” — John von Neumann
Building a Mesh Using Spherical Embedding (andrews.wiki)
When trying to build a 3D model of an object in the real world, the goal is most often to construct a connected mesh of triangles or quadrilaterals that represents that object's surface.
When Greedy Algorithms Can Be Faster [C++] (16bpp.net)
In the realm of computer science, we're always told to pursue what is the most efficient solution. This can be either what is the fastest way to solve a problem; or what may be the cheapest.
Non-random uniform disk sampling (victorpoughon.fr)
Consider the problem of generating N points on a disk of diameter D. The function must be deterministic and the points somewhat uniformly spread around on the disk. Importantly, I want to generate exactly N points, for any integer value of N.
Capablanca: Minimum Vertex Cover Solver (pypi.org)
A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser.
You could have invented Fenwick trees (cambridge.org)
Fenwick trees, also known as binary indexed trees are a clever solution to the problem of maintaining a sequence of values while allowing both updates and range queries in sublinear time.
New book-sorting algorithm almost reaches perfection (quantamagazine.org)
Computer scientists often deal with abstract problems that are hard to comprehend, but an exciting new algorithm matters to anyone who owns books and at least one shelf.
Surface-Stable Fractal Dithering (github.com/runevision)
Surface-Stable Fractal Dithering is a novel form of dithering invented by Rune Skovbo Johansen for use on surfaces in 3D scenes.
Using the most unhinged AVX-512 instruction to make fastest phrase search algo (gab-menezes.github.io)
Do you know when you go to your favorite search engine and search for something using double quotes, like a passage of a book/article or something very specific? That’s called phrase search (sometimes exact search). What we are telling the search engine is that we want these exact words in this exact order (this varies from search engine to search engine, but that’s the main idea).
A Faster Quantum Fourier Transform (arxiv.org)
We present an asymptotically improved algorithm for implementing the Quantum Fourier Transform (QFT) in both the exact and approximate settings.
Making the fastest phrase search algo with the most unhinged AVX512 instruction (gab-menezes.github.io)
For those who don’t want to read/don’t care that much, here are the results. I hope after seeing them you are compelled to read. TL;DR: I wrote a super fast phrase search algorithm using AVX-512 and achieved wins up to 1600x the performance of Meilisearch.
Couriers mystified by the algorithms that control their jobs (theguardian.com)
From pay shortfalls to being dropped by apps, drivers face a range of issues – often with no way to fix them
Escape the walled garden and algorithm black boxes with RSS feeds (johnwalker.nl)
With most online platforms, it’s becoming more and more difficult to view a feed of content that is not generated by an algorithm whose purpose it is to keep you engaged.
VPTERNLOG: when three is 100% more than two (pvk.ca)
Like many, when I first saw VPTERNLOG, my reaction was “\(\log_2(3) \approx 1.58\) is a nice reduction in depth, but my code mostly doesn’t have super deep reductions.”