Detour Index Calculator

longest path distance sum

CalculatorsFreeNo Signup
4.9(866 reviews)
All Tools

Loading tool...

About Detour Index Calculator

A detour index calculator computing ω(G) = Σ_{i<j} l(i,j) where l(i,j) is the longest path between i and j. Amić et al. (1998). Detour = anti-Wiener: uses longest paths instead of shortest. ω ≥ W always. ω captures graph 'spaciousness'. Client-side.

Detour Index Calculator Features

  • ω(G)
  • Longest paths
  • ω ≥ W
  • Anti-Wiener
  • Common graphs
Detour index ω(G) = Σ l(i,j) over all pairs, where l(i,j) = longest path between i and j. Amić et al. (1998). The 'anti-Wiener': Wiener uses shortest paths, detour uses longest. ω ≥ W always. ω = W iff graph is a tree (unique paths).

How to Use

Select graph:

  • ω: Detour index
  • Longest: Per pair
  • ω vs W: Compare

ω vs Wiener

W = Σ shortest paths. ω = Σ longest paths. For trees: ω = W (unique paths). For cycles: ω > W. The gap ω-W measures cycle 'richness' — how many alternative routes exist.

Complexity

Finding longest paths is NP-hard in general! But for small molecular graphs (n<50), exact computation is feasible. Detour matrix computation: O(n²·2ⁿ) worst case, practical for small n.

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Find longest paths.
  3. 3Sum all l(i,j).
  4. 4Compare with W.
  5. 5Measure spaciousness.

Detour Index Calculator — Frequently Asked Questions

Why longest instead of shortest?+

Shortest paths: how efficiently can you reach? Longest paths: how far apart can things be? Detour captures the 'maximum separation' aspect of topology. Useful for molecular flexibility analysis.

When does ω = W?+

ω = W ⟺ tree: every pair has exactly one path. In trees, shortest = longest = only path. Any cycle creates alternative routes making ω > W.

Is detour index practical?+

For molecular graphs (n < 100): yes. For large networks: NP-hard. Longest path finding is hard in general, but molecular graphs are small enough for exact computation.

Share this tool: