Start Doing Graph Theory
323 points by ibobev 6 days ago | 73 comments

gortok 4 hours ago
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!

reply
nicf 2 hours ago
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.

reply
gortok 2 hours ago
I feel the need to be clear; I have no reason to suspect the author of using AI; and am even a bit irritated for the author that I have to entertain these suspicions writ large now. It is unfair to the author who hasn’t done anything to warrant that suspicion, but it’s the world we live in at the moment.

I vocalize this feeling I have, not because the author has done anything to warrant it, but here, in this forum, we commonly have folks saying “so what if it’s AI?”, and by bringing up these feelings we have around the industry, we can have the conversation and (hopefully) have other folks think twice about whether they would use AI to write their book.

I want to read this book and have added it to my list of things to read; and your vouching for the author does help. One underlying issue I have (that is a me problem) is that I know nothing about this particular area, and therefore know nothing about the experts in this area, so I rely on human vouching.

reply
likoya 56 minutes ago
I don't mind if it is written by a human or a machine, but AI has a way of writing things that are exasperating, with unnecessary detours around the point that have lately made me very intolerant of stuff for which in the past I had more patience. As soon as I see content that reads like AI slop, I feel like I am wasting my time watching paint dry, and I throw it away.
reply
ndriscoll 2 hours ago
Well, if we're going to have the conversation: so what if it were AI? Shouldn't the question be around correctness and good pedagogy? Shouldn't the question always be about vouching for those things? If it's actually done well (e.g. they were able to generate better illustrations than they otherwise could've), why exactly should someone think twice?

The author put his name and reputation to it. If it's excellent work, it's excellent work. If it's slop, it's slop.

reply
nicf 50 minutes ago
I'm not the OP, but I can give my answer to this question, or at least one of my answers.

This book is presented as being written by a human. (In this case, a human I happen to know, which would add another dimension to my complaint, so let's imagine that weren't the case.) Maybe someday we'll live in a world where sticking a person's name at the top of a book doesn't carry the implication that they wrote the words in the book. That would make me sad for other reasons, but in any event, we don't live in that world right now, so for now, if you put a person's name on your book, you are claiming that that person wrote the book. If that's not true, you are lying, and like most people, I don't like being lied to.

reply
lgas 56 seconds ago
Why does putting your name on it have to imply you wrote every word, and not instead, just attach your reputation to it, and say that you stand behind the words that are in it, regardless of who/what wrote the words? If we look at things that way, we can continue as we always have evaluating the content, pedagogy, etc. and associate good and bad content, pedagogy, etc with the author and know that when we see that author's name we'll know what we should expect (regardless of who wrote the individual words).
reply
soulofmischief 24 minutes ago
Human expertise and appeal to authority have long been a proxy for correctness and soundness in a body of work.

It's not a perfect proxy, but I'm usually going to trust a domain expert over the confident idiot who constantly lies to me, hides and downplays mistakes, and flits around opposing positions like a drunken moth.

At this time, if I see a text is AI generated, I have to assume it is unsound and possibly even nefarious. There is way too much information assailing my daily life that I have no other rational choice.

reply
random3 5 minutes ago
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
reply
tripleee 9 minutes ago
There has been plenty of crap released in the past, and even in the AI age we should be able to look at the same signals to filter through it today.
reply
costco 2 hours ago
You know this is easily verifiable right…. I just put 10 random pages into Pangram and they all came back 100% human. And now I feel bad for making an even greater proportion of comments on this thread not about graph theory.
reply
wy1981 2 hours ago
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.
reply
chasd00 20 minutes ago
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.
reply
gravity13 8 minutes ago
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.

reply
4b11b4 22 minutes ago
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..?

reply
layer8 4 hours ago
I spot-checked a few random chapters, and it looks clearly human-written to me. But I share your general worry.
reply
jiehong 2 hours ago
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.
reply
mym1990 2 hours ago
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.

Also, saw your comment response, I do feel this very same guarding and unfortunately my instinct is to assume the content is AI, which is a disservice to all the people who are putting their hard effort into putting out quality things.

reply
origini 3 hours ago
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.

reply
ImHereToVote 3 hours ago
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?

reply
contubernio 3 hours ago
What is the problem if it is AI written? Properly guided AI writes better than most human expositors.
reply
gortok 2 hours ago
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.

reply
the__alchemist 2 hours ago
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.

reply
mym1990 2 hours ago
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.
reply
layer8 2 hours ago
I’d be surprised to see current LLMs write as well (and as non-annoying) as the writing in this book.
reply
foobarbecue 3 hours ago
Because it will absolutely have hidden errors.
reply
pixl97 2 hours ago
Thank goodness human books never have hidden errors.
reply
sublinear 2 hours ago
> 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. There is no "step change". There is no "hockey stick" curve. The models have not "dramatically improved compared to last year" regardless of what year it currently is. There is no big bad overlord coming for you. Nobody is getting replaced by AI. Even frontier AI can't replace local AI. It's just the logical next step towards better search that assumes you want the "I'm feeling lucky" button a little too often.

reply
mcv 4 hours ago
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.

reply
throw-qqqqq 3 hours ago
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.

EDIT:

IMO, theories and techniques can be easy enough to learn. Figuring out applications can be much more difficult. It requires some creativity.

reply
ianbooker 22 minutes ago
https://vertex.degree/beginning/degrees#the-hypercube-graphs

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.

reply
wholinator2 14 minutes ago
Thanks for that, i was initials skeptical i would understand but this very clearly resembles the candidate paths for walkers in variatonal monte carlo simulation of spin systems. The edge set can be different, requiring "half filled" and flipping both a 1 and a 0 simultaneously. I'd not thought of these processes in terms of a graph, much less graphs which denote very high dimensional cubes with strange edges.
reply
basil 3 hours ago
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

reply
alfiedotwtf 2 hours ago
> 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

reply
emil-lp 24 minutes ago
It depends on what you mean by brute force, you can easily do 20 cities with dynamic programming, which essentially is brute force with pruning.
reply
hackerbrother 5 hours ago
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 :)
reply
PandaRider 3 hours ago
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

reply
emil-lp 20 minutes ago
This is not true.

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.

reply
armcat 4 hours ago
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

reply
igleria 6 hours ago
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!
reply
satnhak 2 hours ago
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.
reply
jmspring 2 hours ago
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.

[1] - https://en.wikipedia.org/wiki/Gerhard_Ringel

reply
the__alchemist 3 hours ago
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)
reply
vorobeez 6 hours ago
It's unfortunate that the book doesn't have solutions for practice problems. Which makes it hard to use for self-learning.
reply
OgsyedIE 5 hours ago
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.

reply
eru 5 hours ago
You can ask Claude for the solutions?
reply
vorobeez 4 hours ago
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.

reply
karmakurtisaani 4 hours ago
For elaborating something unclear they're great tho.
reply
Gormo 5 hours ago
If you don't have the solutions, how do you verify Claude's work?
reply
DecoPerson 5 hours ago
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.
reply
V__ 3 hours ago
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.

reply
chasd00 7 minutes ago
> wanted to know the name of a Pokémon from his licensed shirt.

how did you even ask an AI this question? Took a picture of the shirt, uploaded it, and asked the AI what it was? That's a different class of problem than "answer this graph theory question and include your references: <paste text here>"

reply
adamddev1 4 hours ago
> 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.

reply
bmacho 3 hours ago
?

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.

reply
deredede 5 hours ago
According to current practices, you ask ChatGPT or DeepSeek to verify it.
reply
Gormo 4 hours ago
Turtles all the way down, I guess.
reply
russfink 3 hours ago
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.
reply
matt_daemon 4 hours ago
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

reply
GL26 2 hours ago
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
reply
throwaw12 6 hours ago
that background is so annoying to my eyes when scrolling the content, would be great if author can fix it
reply
yandrypozo 2 hours ago
agreed, even as a graph background :(
reply
dominicrose 3 hours ago
It seems the "Web server is down" for this link.
reply
offmutegame 2 hours ago
This is so cool! love it
reply
ultimaterr 4 hours ago
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
reply
hei-lima 3 hours ago
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...
reply
bee_rider 3 hours ago
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.
reply
ImHereToVote 3 hours ago
I prefer to do matrices. Thanks though.
reply
learntoplaypitc 2 hours ago
[flagged]
reply
anaszewail1 2 hours ago
[flagged]
reply
patrick_rtk 59 minutes ago
[flagged]
reply
rdevilla 6 hours ago
[dead]
reply
cedarbyte482 6 hours ago
This is great, graphs is also the answer to autonomous coding :D
reply
roarcher 6 hours ago
How so?
reply
cedarbyte482 5 hours ago
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.
reply
sandos 5 hours ago
I am even more confused after this answer: Are the nodes actual reviews or something else?
reply
eru 5 hours ago
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.

reply
ultimaterr 4 hours ago
what does neuron topology have to do with autonomous coding? MLP problem? doesn't make any sense
reply
Krea8ly 3 hours ago
[flagged]
reply