Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nx = 3; ny = 5; G = GridGraph[{nx, ny}];
- w = RandomInteger[{1, 6}, EdgeCount[G]];
- GG = Graph[EdgeList[G], EdgeWeight -> w, VertexLabels -> "Name",
- VertexLabelStyle -> Directive[Blue, Italic, 10],
- EdgeLabels -> "EdgeWeight",
- EdgeStyle -> Directive[Opacity[0.65`], Blue],
- EdgeLabelStyle -> Directive[Black, Italic, 10]] ;
- k = FindSpanningTree[GG];
- HighlightGraph[GG, k, GraphHighlightStyle -> "Thick"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement