GRAPH-CONNECTIVITY
node_disjoint_paths
Computes node disjoint paths between source and target.
Example of usage
Assess collaboration network resilience.
Usage / limitations
+Use when: Assess network robustness, bottlenecks and alternative paths.
−Limitations: Graph topology and assumed relationships drive the result; missing links change connectivity.
Mathematical formula
See method documentation: implementation and assumptions vary.
Sample dataShow
{
"variable": "teams",
"domain": "Workforce collaboration and organisational resilience",
"feature_names": [
"employee",
"department"
],
"nodes": [
[
"Ana",
"Design"
],
[
"Ben",
"Design"
],
[
"Cara",
"Design"
],
[
"Dan",
"Engineering"
],
[
"Eva",
"Engineering"
],
[
"Finn",
"Engineering"
]
],
"edges": [
[
"Ana",
"Ben"
],
[
"Ben",
"Cara"
],
[
"Cara",
"Ana"
],
[
"Dan",
"Eva"
],
[
"Eva",
"Finn"
],
[
"Finn",
"Dan"
],
[
"Cara",
"Dan"
]
]
}
Code example (Python)
teams = {'nodes': [['Ana', 'Design'], ['Ben', 'Design'], ['Cara', 'Design'], ['Dan', 'Engineering'], ['Eva', 'Engineering'], ['Finn', 'Engineering']], 'edges': [['Ana', 'Ben'], ['Ben', 'Cara'], ['Cara', 'Ana'], ['Dan', 'Eva'], ['Eva', 'Finn'], ['Finn', 'Dan'], ['Cara', 'Dan']]}
# DataLens.ai example — collaboration network resilience.
# Copy input + code + test includes the named dataset shown above.
import networkx as nx
# Build a six-person collaboration network with two teams and one bridge.
G = nx.Graph()
G.add_nodes_from([name for name, _ in teams["nodes"]])
G.add_edges_from(teams["edges"])
# Verify the result on the example network.
paths = list(nx.node_disjoint_paths(G, "Ana", "Finn"))
assert len(paths) == 1 and paths[0][0] == "Ana" and paths[0][-1] == "Finn"
print("Expected output verified")
# DataLens.ai example — collaboration network resilience.
# Copy input + code + test includes the named dataset shown above.
import networkx as nx
# Build a six-person collaboration network with two teams and one bridge.
G = nx.Graph()
G.add_nodes_from([name for name, _ in teams["nodes"]])
G.add_edges_from(teams["edges"])
# Verify the result on the example network.
paths = list(nx.node_disjoint_paths(G, "Ana", "Finn"))
assert len(paths) == 1 and paths[0][0] == "Ana" and paths[0][-1] == "Finn"
print("Expected output verified")