TLDR · PROGRAMMING, DESIGN & DATA SCIENCE

NOT ALL GRAPHS ARE TREES

buttondown.email6 min read

Summary from the TLDR newsletter

Relational algebra can easily be represented as trees as formulas are already structurally rooted trees where each operator has its inputs as children. Things get more complicated when introducing non-tree structures, like some kind of self-join. This can be resolved using inlining (simply duplicating the expression you want to reference twice) or let binding. Common methods to open up unrestricted access to represent graphs containing cycles in programs include self-referencing, using a fix point operator, and explicitly listing edges.