Hi, I have to admitt I am just starting to work with the language more that just interactively calling one function after another. But now for graph theory I need to investigate a whole series of graphs which represent natural numbers and divisors.
I need to create graphs Dn = (Vn, An) with n in N >1 and arcs (directed edges) in Vn times Vn (v,w) with weight 0 if v divides w and 1 if not. So D3 would be
d03 = Graph[{2 [DirectedEdge] 2, 2 [DirectedEdge] 2,
2 [DirectedEdge] 3, 3 [DirectedEdge] 2, 3 [DirectedEdge] 3,
3 [DirectedEdge] 3}, EdgeWeight -> {0, 0, 1, 1, 0, 0},
VertexLabels -> "Name", EdgeLabels -> "EdgeWeight"];
the problem is I need to investigate some medium size n for which I hardly can create the graph typing all vertices and edge weights.
Anyone feeling extremly generous throwing in some directions how to tackle this in Mathematica (sadly I am only fluent in Java and C++)? Help would be much appreciated - I'll spend some time reading the documentation in the meantime. About time to get some grip on functional programming anyways...
edit: just upgraded to V10 so all the pretty graph theory stuff added lately is available - not that I know how to properly apply it yet :|