I’ve been using graph theory for years professionally. A good example of practical uses of graph theory is any routing software. It is basically graphs all the way down.
For starters the whole street network is represented as a directed graph. The most widely used algorithm is the venerable A* to find paths through the vertices of the graph, not necessarily the shortest distance but the most optimal distance given all the trade-offs you wish based on the heuristics you define. There are lots of variations of A* and today most implementations would use its faster cousin: bidirectional A* which attacks the point-to-point calculation from both ends at the same time.
Then you have Dijkstra which is used for flood searches to e.g. give the best cost back home from every vertex so you know when to turn back the search if you have a search budget.
Menger’s theorem I’ve used in order to determine whether we can create a loop back. Basically search outwards, then search back without visiting those same edges.
Tarjan to ensure we identify all subnetworks so we don’t get stuck in a disconnected island of vertices with no way out to join the wider network.
A lot of these algorithms were conceived decades ago and are still the backbone of modern routing software.
One thing that’s constantly been in the back of my mind is, since routing is a highly deterministic problem space, it doesn't seem plausible that LLMs can take this over. It seems to me that it's a good example of a tool that LLMs would call out to rather than implement themselves.
In fact, see this convo I had with @simonw wherein he had Astra generate a jogging route. It setup a whole GIS stack and took about half an hour. That seems like a boil the ocean kind of approach and I’m not sure if that’s ever going to be optimal. https://x.com/baz_shkara/status/2099118620647305630
A problem I didn’t even conceive of a year ago was whether or not a book was written by a human.
This author has done nothing to deserve that scrutiny, but I can’t escape the feeling now of having to be guarded when I see a new book online with a relatively short history (spring 2026 is the earliest version of this text), as I can’t be sure it’s either “AI-enhanced” or AI-written.
I don’t like this feeling and it dampers any enthusiasm I once had for being excited about stuff like this.
That aside, if the author did write this themselves without AI, kudos to them and their acheivement!
I've been doing a lot with graphs over the past couple of years. Basically since I started using neo4j, although not everything involves neo4j directly. I've developed a number of really interesting graph algorithms, but I'm always a bit disappointed by how little use I get out of my graph theory knowledge. I've never needed a Hamilton path or do something with the degrees of my vertices. It's all just logic and intuition.
But maybe I should read this to see if there's anything that applies to my current work.
Cool. I am applying to jobs and it seems graph theory is popular in the "Leet Code" questions pace. So very timely, thank you! And clever domain name :)
I have studied algorithms in college. I believe the goals of leetcode vs the goals of graph theory may be against each other.
A good graph theory course abstracts away the details of code and pursues the goal of understanding how many problems can be expressed concisely and clearly through graphs.
A good leetcode practice ... honestly just hones how patient you are in debugging and memorising various code patterns.
If you want to pursue money, it's almost always better to pursue leetcode exclusively
Graphs are fantastic - PageRank [1] that powered Google Search (still does to some extent), TextRank for extractive text summarisation [2], Louvain for neighbourhood detection [3] all use graphs, as well as tonnes of others like belief propagation, Markov clustering, A*, and so on. So yeah, learn it.
not super fond of my memories of having to come up with a graph demonstration on a fixed time on a paper exam, but at least I can say I was once a person that could do that!
Sure I can. But from my experience solutions in math books usually continue learning process and can provide even more insight to a problem. Solutions from ChatGPT or Claude barely can replace that.
(Edit) But I understand that goal of a book can be completely different. So it's just problem of my expectations.
Everything, except the bleeding edge and situations requiring the context window to be more than 60% filled, are elementary to Opus 5.5 . If you provide the questions completely, you can be very sure that Claude’s solutions will be correct. The world has changed; AI is reliable; we need to adapt.
I get a lot of obviously wrong or slightly wrong answers from all LLMs across the board. If you don't double-check you just don't know or you might miss it.
And for the bleeding edge part: My godchild wanted to know the name of a Pokémon from his licensed shirt. One of the first ones, found in every training set. Couldn't get it right, was certain it was the wrong one.
If you don’t understand the solutions, how can you verify textbook solutions? And sometimes they’re wrong, maybe subtle typos, causing hours of grief and feelings of inferiority.
what applications is this useful for? node topology is already a solved problem for decentralized networks since most validators are on aws. unless this is for fun? theres finite space to order nodes topologically speaking tbh
Graphs theory, like in general? Just as one example, an awful lot of numerical linear algebra research is devoted to the handling of sparse matrices (ones where most of the entries are zeroes), which can also be looked at as graphs. Likely any CAD program with a finite element analysis tool uses some graph theory under the hood.
For fun. All knowledge is beneficial, including what may not directly help with your job, but nonetheless will make you smarter and better at solving problems. This over-technical approach to knowledge is actually sad...
We have experienced that adverserial review cycles is the only way to really guarantee good outputs from coding agents - best modelled as a cyclic graph.
I don't think modelling this as a graph adds anything that you wouldn't get from the phrase 'adversarial review cycles' already. So graph theory is pretty much useless for this application.
I’ve been using graph theory for years professionally. A good example of practical uses of graph theory is any routing software. It is basically graphs all the way down.
For starters the whole street network is represented as a directed graph. The most widely used algorithm is the venerable A* to find paths through the vertices of the graph, not necessarily the shortest distance but the most optimal distance given all the trade-offs you wish based on the heuristics you define. There are lots of variations of A* and today most implementations would use its faster cousin: bidirectional A* which attacks the point-to-point calculation from both ends at the same time.
Then you have Dijkstra which is used for flood searches to e.g. give the best cost back home from every vertex so you know when to turn back the search if you have a search budget.
Menger’s theorem I’ve used in order to determine whether we can create a loop back. Basically search outwards, then search back without visiting those same edges.
Tarjan to ensure we identify all subnetworks so we don’t get stuck in a disconnected island of vertices with no way out to join the wider network.
A lot of these algorithms were conceived decades ago and are still the backbone of modern routing software.
One thing that’s constantly been in the back of my mind is, since routing is a highly deterministic problem space, it doesn't seem plausible that LLMs can take this over. It seems to me that it's a good example of a tool that LLMs would call out to rather than implement themselves.
In fact, see this convo I had with @simonw wherein he had Astra generate a jogging route. It setup a whole GIS stack and took about half an hour. That seems like a boil the ocean kind of approach and I’m not sure if that’s ever going to be optimal. https://x.com/baz_shkara/status/2099118620647305630
A problem I didn’t even conceive of a year ago was whether or not a book was written by a human.
This author has done nothing to deserve that scrutiny, but I can’t escape the feeling now of having to be guarded when I see a new book online with a relatively short history (spring 2026 is the earliest version of this text), as I can’t be sure it’s either “AI-enhanced” or AI-written.
I don’t like this feeling and it dampers any enthusiasm I once had for being excited about stuff like this.
That aside, if the author did write this themselves without AI, kudos to them and their acheivement!
There was not a single real tangable way of determining this before AI Slop.
For sure it was less to review, less options but still.
So what did you use? I used things like Reviews, skimming through, getting a referal through a blog or hn and buying from reputational sources.
HN is a filter. Same as all the other things we have.
What is the problem if it is AI written? Properly guided AI writes better than most human expositors.
I spot-checked a few random chapters, and it looks clearly human-written to me. But I share your general worry.
This is what we are supposed to have book and movie reviewers for. Just to check for slop regardless if the slop is AI or human.
But who reviews the reviewers?
I've been doing a lot with graphs over the past couple of years. Basically since I started using neo4j, although not everything involves neo4j directly. I've developed a number of really interesting graph algorithms, but I'm always a bit disappointed by how little use I get out of my graph theory knowledge. I've never needed a Hamilton path or do something with the degrees of my vertices. It's all just logic and intuition.
But maybe I should read this to see if there's anything that applies to my current work.
My personal experience has been that the simpler undergrad algorithms are the most applicable. That’s probably also why you learn them first.
IMO, it’s much more practical to thoroughly learn and understand the simpler techniques. There is often more depth to it, than you’d think.
Analogy: Many (most?) MMA matches are won with techniques you learn in the first year.
Aside: I’ve gotten much more mileage out of simple statistics in the 16 years since I graduated, than advanced algorithms.
Cool. I am applying to jobs and it seems graph theory is popular in the "Leet Code" questions pace. So very timely, thank you! And clever domain name :)
I have studied algorithms in college. I believe the goals of leetcode vs the goals of graph theory may be against each other.
A good graph theory course abstracts away the details of code and pursues the goal of understanding how many problems can be expressed concisely and clearly through graphs.
A good leetcode practice ... honestly just hones how patient you are in debugging and memorising various code patterns.
If you want to pursue money, it's almost always better to pursue leetcode exclusively
Graphs are fantastic - PageRank [1] that powered Google Search (still does to some extent), TextRank for extractive text summarisation [2], Louvain for neighbourhood detection [3] all use graphs, as well as tonnes of others like belief propagation, Markov clustering, A*, and so on. So yeah, learn it.
[1] https://en.wikipedia.org/wiki/PageRank
[2] https://aclanthology.org/W04-3252.pdf
[3] https://en.wikipedia.org/wiki/Louvain_method
not super fond of my memories of having to come up with a graph demonstration on a fixed time on a paper exam, but at least I can say I was once a person that could do that!
If you like graph theory Dijkstra’s in Disguise is a great read: https://blog.evjang.com/2018/08/dijkstras.html
Related HN thread: https://news.ycombinator.com/item?id=17745779
It's unfortunate that the book doesn't have solutions for practice problems. Which makes it hard to use for self-learning.
The book you want in this case is Gross, Yellen & Anderson, Graph Theory and its Applications, 3rd Edition.
There are plenty of ways to get a copy.
You can ask Claude for the solutions?
Sure I can. But from my experience solutions in math books usually continue learning process and can provide even more insight to a problem. Solutions from ChatGPT or Claude barely can replace that.
(Edit) But I understand that goal of a book can be completely different. So it's just problem of my expectations.
For elaborating something unclear they're great tho.
If you don't have the solutions, how do you verify Claude's work?
Everything, except the bleeding edge and situations requiring the context window to be more than 60% filled, are elementary to Opus 5.5 . If you provide the questions completely, you can be very sure that Claude’s solutions will be correct. The world has changed; AI is reliable; we need to adapt.
I get a lot of obviously wrong or slightly wrong answers from all LLMs across the board. If you don't double-check you just don't know or you might miss it.
And for the bleeding edge part: My godchild wanted to know the name of a Pokémon from his licensed shirt. One of the first ones, found in every training set. Couldn't get it right, was certain it was the wrong one.
> The world has changed; AI is reliable; we need to adapt.
Yes, but I think it's important to state that it's only reliable for things that are very well known and extensively written about.
?
You don't ask for proofs to print them out, put them in your drawer, and brag around that you own the proofs for these exercises.
You ask Claude for proofs to help your understanding. Understanding is the exact same activity as verifying.
If you don’t understand the solutions, how can you verify textbook solutions? And sometimes they’re wrong, maybe subtle typos, causing hours of grief and feelings of inferiority.
According to current practices, you ask ChatGPT or DeepSeek to verify it.
Turtles all the way down, I guess.
It seems the "Web server is down" for this link.
I prefer to do matrices. Thanks though.
that background is so annoying to my eyes when scrolling the content, would be great if author can fix it
what applications is this useful for? node topology is already a solved problem for decentralized networks since most validators are on aws. unless this is for fun? theres finite space to order nodes topologically speaking tbh
Graphs theory, like in general? Just as one example, an awful lot of numerical linear algebra research is devoted to the handling of sparse matrices (ones where most of the entries are zeroes), which can also be looked at as graphs. Likely any CAD program with a finite element analysis tool uses some graph theory under the hood.
For fun. All knowledge is beneficial, including what may not directly help with your job, but nonetheless will make you smarter and better at solving problems. This over-technical approach to knowledge is actually sad...
This is great, graphs is also the answer to autonomous coding :D
How so?
We have experienced that adverserial review cycles is the only way to really guarantee good outputs from coding agents - best modelled as a cyclic graph.
I am even more confused after this answer: Are the nodes actual reviews or something else?
I don't think modelling this as a graph adds anything that you wouldn't get from the phrase 'adversarial review cycles' already. So graph theory is pretty much useless for this application.
Please prove me wrong.
what does neuron topology have to do with autonomous coding? MLP problem? doesn't make any sense