Graphy Math Magic — Simplify Hard Problems

Amy Hodler
knowledge-bytes
Published in
2 min readJul 26, 2022

Graphy math lets you do some cool tricks but can be tricky. For example, the traveling salesman (person) problem (TSP) is a classic graph problem that asks, “Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?”

TSP-like questions are found in areas from logistics and scheduling to DNA sequencing. Solving these problems are powerful but you can imagine the number of comparisons you’d have to make to find all the possible shortest paths and find an anwer! That makes these problems very computationally challenging but there are some ways to speed things up.

A recent post, Loopy Lattices, by my colleague @Max.DeMarzi explains how a system built with recursive logic reduced the time to calculate these multi-path calculations by orders of magnitude. He states, “Once you are able to think recursively, many problems become a lot easier.”

Then in his next post, Loopy Latices and Recursion, he walks through how the logic in RelationalAI actually works to do this. This is a fun and insightful post, but if you’re like, you just gotta get paper and pen out to follow along. Do this yourself, and you’ll see how a system built on iteration and recursion can simplify even the ‘NP-Hardest’ of problems.

--

--