Using obscure graph theory to solve programming languages problems

matt_d | 77 points

Problem solvers based on graphs are hard to get your head around at first, but then you get extremely elegant and powerful solutions to seemingly unsolvable problems.

The only gotchas are: 1) time to get your head around 2) algorithmic complexity of the resulting solution.

Graph theory is probably the most fulfilling math application in the computer science. In a way, graph-based algorithms do magic similar to AI but in a fully determined manner. If you think about it more broadly, a graph resembles a subset of a neural network but only with {0, 1} weights.

garganzol | 9 hours ago

If you like reasoning about a program in terms of expression trees/graphs, I recently discovered that Wolfram Language has built-ins for this:

https://reference.wolfram.com/language/ref/ExpressionTree.ht...

georgewsinger | 13 hours ago

This seems, at least upon first read, analogous to global value numbering (GVN). Or, depending on how you look at it, common subexpression elimination (CSE). I am mostly wondering why they are not mentioned in the article.

tekknolagi | 14 hours ago

A great example of the value of academia and scientific research.

anonymousDan | 4 hours ago

Yivycy

lifelesson701 | 3 hours ago