Search over Algebraic Graphs
Summary
This article explains how to run Dijkstra’s algorithm over algebraic graph expressions used by the alga library, without expanding to an adjacency map. It introduces a lazily-built index and demonstrates graph compression techniques (DAG compression and switching graphs) to preserve correct distances while operating directly on the expression. It also provides Haskell code snippets illustrating the index builder and the Dijkstra implementation.