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 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.
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.
all of the books I had in university basically just gave me the final result at the back of the book with no explanation, so I am quite jealous if this was your experience with textbooks. Could you name some of these books? They might be nice to buy!
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
Graph theory and algorithm engineering overlap a great deal. And not only in the directly graph theoretic terms like BFS, Dijkstra, Flow, etc, but also in that you need a good grasp of greedy algorithms, dynamic programming, divide and conquer, and several other general techniques.
You don't need to be a good algorithm engineer to secure a high-paying job though. In fact high-paying jobs regularly turn away strong algorithm engineers because they can't pass leetcode challenges.
The advice is sound -- if you want money focus on the flashy buzzword thing, not the actually useful thing.
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.
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.
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
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...
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.
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 are a few issues if it’s AI-written/edited/drafted:
1. AI generated text works off of whatever model it came from, whatever prompt was used, and probabilities. It’s been described as a “next token predictor” and that, for the purposes of this answer, is how I’m describing it as well. First problem: it’s only as good as the above.
2. Because of the above, its accuracy relies on probabilities. It can confidently give me wrong information, and as someone who would read this book to learn a topic I don't already know, I have no frame of reference to know whether I’m being fed accurate information.
3. Since it greatly speeds up the time it takes to physically write material, there is a possibility the author didn’t closely vet the information provided by the LLM as a next token predictor. That means it could be wrong in subtle ways, and the only way for me to know is to rely on knowledge I don’t have.
4. Had AI not been used, I could conceivably go on the past work of the author, rely on the person who has the expertise who wrote the forward, or the fact that physically writing a book takes prohibitively long enough that the dopamine from having written a book doesn’t outweigh the amount of time it takes, and if you are going to take months to years to write a book, you’re going to not want that effort to be in vain. You’re going to do your diligence and not just “wing it”.
AI makes it relatively trivial to appear knowledgeable and to get that dopamine rush from saying “I’m an author” and appearing to be an expert in a field without being an expert in a field. For some, that temptation is too great and there’s no way to know without the passage of time. Time for folks to review the book who know the subject matter. Time for reviews. Time for folks to put signs up that say “don’t trust this material.” In the meantime we still have that content out there, further infecting new AI models and people into believing it’s accurate.
That’s why the use of AI is dangerous, and is especially dangeorus without disclosure.
Sure, but you can build an agentic system which verifies outputs and fact corrects, with probably better accuracy than a human would.
As well, if people were a bit less anti-AI then maybe we can get disclaimers that things are written by AI that don't immediately torpedo any value the writing has.
As a professional mathematician it seems that AI is already at the point where, when well guided, it both does better research and writes better exposition than run if the mill mathematicians.
> What is the problem if it is AI written? Properly guided AI writes better than most human expositors.
I don't understand why HN cannot ever say the first sentence without the second one.
Most people agree that using AI for research or finding better words is fine, but then can't upvote or have a meaningful conversation because of the performative politics and wild delusions about a scifi future.
Dude, all we have with LLMs is an NLP search engine. Get over it. It's been around half a decade of this nonsense.
That's not a fair comparison: I choose what I read not from the middle of humanity. I choose skilled writers. They write far better than AI. I'm through the opening volley of this book, and it is far better than the best AI prose I've read.
Tangent: I use AI for code, but I've had to ban it from writing readmes and doc comments; the AI models I've used produce text I'm unable to parse, and assume my readers would not be able to either.
I think a lot of it actually comes down to the perception of where the content came from. I brainstorm and riff with AI all the time, but I know what I am communicating with, I don't get the same sense of ickyness. Blogs and books and all these things that are claimed be to written by a human, but are actually just AI, is frustrating. Honestly, the content may be perfectly fine, but I feel something irritates humans when they think they have been deceived.
The author seems to have published math papers (as one can see on DBLP and other websites) and a PhD in maths. It gives me confidence that it's written by a human and also reading chapter 1 and chapter 2 I think there is a human behind it, not an LLM.
If it makes you feel better, I've known the author personally for over ten years, and he is both a human being and an excellent teacher. I'm about as confident as I could imagine being that he wrote this book himself. (In order for this to completely reassure you, you of course have to trust me, but I thought I'd add my vote of confidence just in case it helps even a little.)
This book aside, though, the fact that writing is no longer definitive evidence of human thought is one of the things I dislike the most about the LLM era. I very much share your sadness about that.
Perhaps we’ll reach a point where humans might have to record themselves writing the things and publish this next to the work itself to prove it was human made.
My anecdotal experience has been that is is very reliable on inputs over 500 words. There are a number of third party evaluations that corroborate. Pangram is pretty easy to test for yourself if you are a skeptic.
Reading through the first chapter, I got the feeling that it is more human than a lot of the books you might find on O'Reilly or wherever. I totally support the use of AI to help with organizing material in better ways or creating different modalities for representation. I really hate when the book is very clearly just copy pasting the output of the LLM.
I have just taken this in stride but it has struck me a few times recently that everything I see now.. I basically have to classify it as to be immediately discarded or worth my time to even begin reading, and even if I do continue reading then I still have to be constantly evaluating if a person bothered to struggle with (write) it or not.
Quite frankly this is.. fucking terrible? Even worse, the end of something for humanity..?
IMO if i can learn from/enjoy the content then it makes no difference who/what wrote it. I'll even pay for it if I feel the content is equal in value to the price.
This is what I'm grappling with myself. I'm building out a bunch of materials for things I'm learning and feel like others can benefit from my trudging through and correcting or getting AI clarification.
I think we're quickly getting to a point where AI is going to be able to do a better job teaching things than humans can (especially stuff with heavy associations with paper/screens, like programming and math). AI can augment for personal styles and spin up whole entire educational widgets on demand. Human's can't scale like that.
While the author and book here seem trustworthy, the issue is real and likely more upon all of us. Nothing that we output will escape the same scrutiny, at least for a while until we will probably have own dedicated AI to scrutinize everything that gets in front of us
Putting aside whether or not the author used AI to write this - the concern here is that the content is accurate and correct, right? So suppose they did use AI to write it - your end goal is actually the same - you want a trustworthy, accurate, source of information.
In this sense AI does not actually detract from that - so long as there IS an author associated to the book, that author can build a reputation for thoroughly reviewed and high quality textbooks. So in the end, some authors will be known for a reputation for making good books, and the use of AI should give us access to a larger quantity of books, addressing more and more niche topics, for lower costs. So, this should be a good thing for education?
I'm very much just writing my thoughts down, but curious to know if others agree or disagree with this.
> the concern here is that the content is accurate and correct, right?
I think there's more, we just take it for granted because it's usually included. Imagine a teacher--perhaps at a whimsical institution in a children's story--who is always correct, but teaches things in a way that actually cripples students' future progress and understanding.
Most human communication involves some level of simulating the mind you expect was/will-be at the other end. This aspect becomes extra-important when teaching, because teaching about trying to change how that student-mind operates. Imparting accurate facts is secondary.
I get your sentiment, though the problem is older than AI, the convenience and market penetration has just ramped up the visibility in this arena.
Many books pre-ai were garbage but not at the rate they could be today. If anything people operate on greater discretion now than in the past because even the worst garbage still had a non-trivial barrier to entry, either sitting down to regurgitate your own garbage or paying someone to make some garbage for you.
There's also some historic precedence of this, the rise of Photoshop/CG and digital manipulation certainly led to a "is this photo real" to similar effect despite manipulations going back to the origins of photography. That acute concern was not as prevalent in my mind before editing became common and accessible.
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
> seems like a boil the ocean kind of approach and I’m not sure if that’s ever going to be optimal
Finding the most optimal traveling salesman problem for 20 cities by brute force will take a few universes lifetimes and you still won’t be halls way. You’ll need to compromise with heuristics but that usually leads to near optimal
Hah Ok, added to Zenodo. I historically struggle with disciplines which have "Theory" in the name. The materials feel to me as an easy intro, then rapid cliff. We'll see! (I think my brain is genetically or otherwise not good at this level of abstracting)
Oh this was a descent into past memories. I had the pleasure to take Graph Theory at UC Santa Cruz with Gerhard Ringel [1] way back when. Excellent instructor with some great stories.
comment section looks like it's filled with bots, a lot of commenters looking like they are giving their opinion as if they had read the whole pages, sometimes irrelevant
Looks like an excellent book, and the author is right that graph theory is a very useful and practical branch of mathematics. If only I could persuade my son to read it.
I remember to this day the exact location I was when being introduced to construct hypercubes, to the exact bench in our uni cafeteria. It changed my understanding of multidimensionality completely.
Feel like there's so much opportunity to combine great educational material with more interactive visualizations, given how easy it is to create great visualizations (with Claude, etc) nowadays. Especially in graph theory.
78 comments
[ 0.32 ms ] story [ 6.4 ms ] threadThere are plenty of ways to get a copy.
You don't ask for proofs to print them out, put them in your drawer, and brag around that you own the proofs of these exercises.
You ask Claude for proofs to help your understanding. Understanding is the exact same activity as verifying.
(Assuming it's a proof or something - if it's just a number - oh well).
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
Graph theory and algorithm engineering overlap a great deal. And not only in the directly graph theoretic terms like BFS, Dijkstra, Flow, etc, but also in that you need a good grasp of greedy algorithms, dynamic programming, divide and conquer, and several other general techniques.
The advice is sound -- if you want money focus on the flashy buzzword thing, not the actually useful thing.
Kind of like how being good at relational-databases and SQL is different than being good at coding up B-tree implementations.
But maybe I should read this to see if there's anything that applies to my current work.
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.
[1] https://en.wikipedia.org/wiki/PageRank
[2] https://aclanthology.org/W04-3252.pdf
[3] https://en.wikipedia.org/wiki/Louvain_method
Related HN thread: https://news.ycombinator.com/item?id=17745779
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!
But who reviews the reviewers?
1. AI generated text works off of whatever model it came from, whatever prompt was used, and probabilities. It’s been described as a “next token predictor” and that, for the purposes of this answer, is how I’m describing it as well. First problem: it’s only as good as the above.
2. Because of the above, its accuracy relies on probabilities. It can confidently give me wrong information, and as someone who would read this book to learn a topic I don't already know, I have no frame of reference to know whether I’m being fed accurate information.
3. Since it greatly speeds up the time it takes to physically write material, there is a possibility the author didn’t closely vet the information provided by the LLM as a next token predictor. That means it could be wrong in subtle ways, and the only way for me to know is to rely on knowledge I don’t have.
4. Had AI not been used, I could conceivably go on the past work of the author, rely on the person who has the expertise who wrote the forward, or the fact that physically writing a book takes prohibitively long enough that the dopamine from having written a book doesn’t outweigh the amount of time it takes, and if you are going to take months to years to write a book, you’re going to not want that effort to be in vain. You’re going to do your diligence and not just “wing it”.
AI makes it relatively trivial to appear knowledgeable and to get that dopamine rush from saying “I’m an author” and appearing to be an expert in a field without being an expert in a field. For some, that temptation is too great and there’s no way to know without the passage of time. Time for folks to review the book who know the subject matter. Time for reviews. Time for folks to put signs up that say “don’t trust this material.” In the meantime we still have that content out there, further infecting new AI models and people into believing it’s accurate.
That’s why the use of AI is dangerous, and is especially dangeorus without disclosure.
As well, if people were a bit less anti-AI then maybe we can get disclaimers that things are written by AI that don't immediately torpedo any value the writing has.
Well guided is a qualifier that matters.
I don't understand why HN cannot ever say the first sentence without the second one.
Most people agree that using AI for research or finding better words is fine, but then can't upvote or have a meaningful conversation because of the performative politics and wild delusions about a scifi future.
Dude, all we have with LLMs is an NLP search engine. Get over it. It's been around half a decade of this nonsense.
Tangent: I use AI for code, but I've had to ban it from writing readmes and doc comments; the AI models I've used produce text I'm unable to parse, and assume my readers would not be able to either.
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.
This book aside, though, the fact that writing is no longer definitive evidence of human thought is one of the things I dislike the most about the LLM era. I very much share your sadness about that.
Quite frankly this is.. fucking terrible? Even worse, the end of something for humanity..?
I think we're quickly getting to a point where AI is going to be able to do a better job teaching things than humans can (especially stuff with heavy associations with paper/screens, like programming and math). AI can augment for personal styles and spin up whole entire educational widgets on demand. Human's can't scale like that.
In this sense AI does not actually detract from that - so long as there IS an author associated to the book, that author can build a reputation for thoroughly reviewed and high quality textbooks. So in the end, some authors will be known for a reputation for making good books, and the use of AI should give us access to a larger quantity of books, addressing more and more niche topics, for lower costs. So, this should be a good thing for education?
I'm very much just writing my thoughts down, but curious to know if others agree or disagree with this.
I think there's more, we just take it for granted because it's usually included. Imagine a teacher--perhaps at a whimsical institution in a children's story--who is always correct, but teaches things in a way that actually cripples students' future progress and understanding.
Most human communication involves some level of simulating the mind you expect was/will-be at the other end. This aspect becomes extra-important when teaching, because teaching about trying to change how that student-mind operates. Imparting accurate facts is secondary.
Like is there a concrete issue with the book you have?
Can we not do this? I understand your sentiment, but ... can we not do this?
Many books pre-ai were garbage but not at the rate they could be today. If anything people operate on greater discretion now than in the past because even the worst garbage still had a non-trivial barrier to entry, either sitting down to regurgitate your own garbage or paying someone to make some garbage for you.
There's also some historic precedence of this, the rise of Photoshop/CG and digital manipulation certainly led to a "is this photo real" to similar effect despite manipulations going back to the origins of photography. That acute concern was not as prevalent in my mind before editing became common and accessible.
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
Finding the most optimal traveling salesman problem for 20 cities by brute force will take a few universes lifetimes and you still won’t be halls way. You’ll need to compromise with heuristics but that usually leads to near optimal
[1] - https://en.wikipedia.org/wiki/Gerhard_Ringel
I remember to this day the exact location I was when being introduced to construct hypercubes, to the exact bench in our uni cafeteria. It changed my understanding of multidimensionality completely.