Topology · multi_path
Multi-Path Graph
k parallel paths, stress-testing multi-path transitive closure.
Evaluation
Linear · T ∘ E–iterations (left / right recursion)
Doubling · T ∘ T–iterations (double recursion)
iteration 1new pairs per iteration
Point at a node (or tab to the drawing and use the arrow keys) to see every node it reaches, wave by wave. Those pairs are its rows of the closure.
Nodes · edges40 · 30
Closure |TC|60
Closure / edges2.0×
A small instance from the generator the benchmark runs with n from 100 upwards.
Definition
Symbol
M_{n,k}
Edges
\{(i,i+k) \mid i \in 1..(n-1) \cdot k\}
Generator
engine.data_generator.DataGenerator.generate_multi_path_graphgenerate_db.py
def generate_multi_path_graph(self, n: int) -> Generator[tuple[int, int], None, None]:
"""Generate a multi path graph with n nodes."""
logging.info(f'Generating multi path graph for n={n}')
for i in range(1, (n - 1) * self.k + 1):
yield (i, i + self.k)