Skip to content

Calculates reachability of nodes in graphs and distances between them

Notifications You must be signed in to change notification settings

riskfirst/Warshall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warshall

Calculates reachability of nodes in graphs and distances between them

This C# .NET Core project gives a simple implementation of the Warshall algorithm for determining connectivity between nodes in a graph, yielding the so-called reachability matrix. A variation of this algorithm, the Floyd-Warshall algorithm, yields the distances between nodes, the graph distance matrix.

This work has applicability in LAZULUM for determining the set of assets which affect other assets, and vice versa. This has relevance in calculating the impacts of corporate actions and contingent lifecycle transactions in extracts.

Example

The graph (actually two seperate subgraphs):

alt

... has an adjacency matrix of

alt

... has a reachability matrix of

alt

... and a graph distance matrix of

alt

Documentation

See pdf'd Mathematica notebook in docs, or the Mathematica notebook itself. Mathematica has been used as the reference implementation for comparisons. The C# code is basically commented and demonstrates the example shown here and in the notebook.

Did you know ...

The problem of determining the reachability matrix is technically referred to as determining the transitive closure of the binary relation. Catchy!

About

Calculates reachability of nodes in graphs and distances between them

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages