Ask HN: What is new in algorithms and data structures these days?
737 pointsAlgs/DS were my first love in CS. Nowadays, all we hear about is AI/ML. There must be hardware/software improvements coming from or necessitating fundamental Algs/DS research.
Care to share any of the favorite recent results?
Are there big fields still making gains behind all this computing surge?
Comments (211) 45 threads
Earlier commentsAs it is your domain of expertise, can you give more details on the new/improved ones please?
On the performance front, see Algorand's consensus protocol (2016 ish), which can run on 10,000s of nodes, using a cryptographic technique called "sortition" which sub-selects a small committee of nodes to actually broadcast messages of the consensus protocol.
On the understandability front, this is my research area; we put out a new protocol recently (https://eprint.iacr.org/2023/463) that is faster and much easier than PBFT (and crash fault equivalents like Paxos/Raft). But there's a long line of prior work here.
Traditionally, consensus (PBFT,Paxos,Raft) has run on a small set of nodes (i.e. a dozen) and also has used what are called "stable leaders", where a single leader process sequences all transactions until it is detected to be faulty. Stable leaders are great for data centers.
Blockchains made it so that now protocols support thousands of nodes, and also use "rotating leaders", where a different node proposes each block (for fairness reasons). It happens that using rotating leaders allows for simpler protocols (in particular, with easier proofs).
Obligatory Quanta link: https://www.quantamagazine.org/finally-a-fast-algorithm-for-...
https://en.m.wikipedia.org/wiki/Combinatorial_optimization
Algos to solve those both exact methods and heuristics are super useful in real world applications, and very underappreciated by the HN crowd IMO.
Have you been doing it by hand or using a big program?
So, in a couple projects I was involved we had to resort to manually constructed heuristics such as Simulated Annealing (SA) and Large Neighborhood Search (LNS).
A very cool large scale approach we resorted in some problems (eg. airline scheduling) was Column Generation[1]. Not only it solved in minutes what took hours in the MIP implementation, unlike SA and LNS it's and exact method that provide valid bounds to global optimality.
[1]: https://en.wikipedia.org/wiki/Column_generation
Eg at Goldman Sachs I used mixed integer linear programming to reshuffle the assignments of particular departments' computing needs to specific data centres. Before I got my hands at this, people used to just do it manually and hadn't even realized this was something were you could optimize systematically and squeeze some efficiency out of.
If you have an eye for it, you can find similar opportunities in many areas of many companies. Assignment / scheduling is actually extremely common, if you can recognise it. It's also relatively easy to show an improvement that you can measure in dollars, which always goes over well with the business folks.
I've used SAT solvers recreationally to try solve some mathematical combinatoricsish-like problems but interesting more down-to-earth applications have eluded me. I would love to dig deeper into this stuff.
https://www.gurobi.com/case_studies/
however, it's mixed-integer programming rather than SAT solvers/constraint programming, but similar in spirit.
Some recent literature reviews:
https://link.springer.com/article/10.1007/s11750-021-00594-1
https://www.ijcai.org/proceedings/2021/608
There just aren't many situations where they're useful. Time scheduling, logistics, operations, there are only a handful of places where these problems are so important that they need to be solved optimally or nearly optimally.
>Time scheduling, logistics, operations...
Add marketing (pricing, assortment, ...) and finance (portfolio, captial budgeting, ...) to those.
And those are huge domains, moving trillions of USD globally each year. Many companies (think most of the Global 2000) benefit from a couple % improvement on their operations that lead to many $$ in savings.
If you are in the HN crowd, the 'opposite' direction is useful:
Know that effective generic solvers exist for these problems (but don't worry about how they do it), and re-formulate many of the trickier problems you encounter in the languages of these solvers, instead of eg writing your own bespoke algorithm to assign tents at the company picnic.
All comments shown.
Couldn't load more comments. Check your connection and try again.