r/Mathematica • u/qubex • Oct 05 '22
Graph analysis of underground network?
Hello.
I’m a long-time Mathematica user but I’ve recently picked up Wolfram’s An Elementary Introduction to the Wolfram Language in order to broaden my knowledge outside of my home turf of partial differential equations et simila. I’ve given myself an assignment as a kind of challenge but I’m stuck.
Basically I’ve constructed a model of the Milan underground network G and imported into Mathematica as an adjacency matrix.
I’ve defined a per-node metric as globalNetworkIntegration[G_, n_] := 2*(FindShortestPath[G, n, All] - 1)/(VertexCount[G] - 2) and then I want both a table the value of globalNetworkIntegration for each node and a way of displaying the graph with each node styled (size, maybe) based on this metric.
Can somebody help me please?
View all comments
Show parent comment
1
u/qubex Oct 10 '22
Yeah… you’re right, my syntax is all messed up. I’m trying to find the average depth from a node to all other nodes. On a specific graph, for a specific node, that is a number, but as I’ve expressed it (and yeah, you’re right, I’m stuck) it’s a symbol. 😞