Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 57

Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.

6
votes
The style names should be between quotes (this is stated in the Style doc page, under the 'More Information' section) edges = {1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, 3 \[UndirectedEdge] 1}; Gr …
answered Aug 1 '12 by Sjoerd C. de Vries
2
votes
From the comments of Spawn1710D and Szabolcs: Save or DumpSave might be of help. With DumpSave you will have the object saved in an mx file so the size will be smaller and will load faster. You use …
answered Jan 8 '14 by Sjoerd C. de Vries
1
vote
Not an answer, but an explanation why the properties route doesn't work. I suspect that GraphLayout is an option of the Graph, and not a property. While it is possible to introduce an inert property n …
answered Apr 20 '12 by Sjoerd C. de Vries
3
votes
Precede Graph with the System` context and it should work out fine. Please note that you can't use system 8 Graphs as input in Combinatorica graph functions. They have to be converted first, for insta …
answered Nov 28 '12 by Sjoerd C. de Vries
3
votes
Though this is probably not what you're looking for, HighLightGraph can be useful to mark subgraphs in the original graph. In your case: HighlightGraph[g, NeighborhoodGraph[g, "a"]]
answered Dec 3 '12 by Sjoerd C. de Vries
2
votes
That does not seem to be possible. I just tried FindShortestTour: Undirected case: g = Graph[{UndirectedEdge[1, 2]}]; FindShortestTour[g] (* {2, {1, 2, 1}} *) Directed case: g = Graph[{1 -> 2}]; …
answered Sep 20 '15 by Sjoerd C. de Vries
1
vote
The EdgeRenderingFunction part is not that difficult. The function g that you specify in the option EdgeRenderingFunction->g gets handed three parameters: A list with begin and end points, so that's …
answered Oct 19 '12 by Sjoerd C. de Vries
1
vote
edgelist = {s -> 1, s -> 2, 1 -> 3, 2 -> 1, 2 -> 4, 3 -> 2, 3 -> t, 4 -> 3, 4 -> t}; MemberQ[edgelist, 1 -> 2] (* False *) MemberQ[edgelist, 2 -> 1] (* True *)
answered Jul 26 '15 by Sjoerd C. de Vries
0
votes
SeedRandom[31415]; n = 20; p = 1.; rm = RandomReal[{0, 5}, {n, n}]; rm = rm + rm\[Transpose]; (rm[[#, #]] = \[Infinity]) & /@ Range[n]; Do[{x, y} = RandomInteger[{1, n}, 2]; rm[[x, y]] = rm[[y, x]] …
answered Apr 17 '13 by Sjoerd C. de Vries
6
votes
The reason you get different vertex sizes is that by default the specified vertex size is interpreted in terms of the minimum distance between vertices. This is probably done so that no vertices touch …
answered Feb 24 '13 by Sjoerd C. de Vries
5
votes
I'm not sure whether I fully interpreted your initial drawing and description correctly, but would the following work for you? Your set as a Graph: g = Graph[{"T", 1, 2, 3, 4, 5, "⊥"}, {" …
answered Dec 13 '16 by Sjoerd C. de Vries
32
votes
This sounds very similar to a traveling salesman problem for which we have the built-in (as of v8) FindShortestPath function. However, this function minimizes the overall path length (which is the sum …
answered Feb 11 '13 by Sjoerd C. de Vries
3
votes
I don't think it's a bug. Directed radioactive decay graphs shouldn't have cycles by definition and AcyclicGraphQ doesn't see them either: AcyclicGraphQ@g True You don't seem to have heeded yo …
answered Aug 24 '12 by Sjoerd C. de Vries
19
votes
Update: added a version using Inset below the original answer Here's an extended version of the arrow heads customization code. There are two pieces. One is the arrow drawing routine. The other one …
answered Oct 6 '12 by Sjoerd C. de Vries
2
votes
The Details section of the DiscreteMarkovProcess documentaion states (among other things): The states of DiscreteMarkovProcess are integers between 1 and n, where n is the length of transition …
answered Jul 20 '15 by Sjoerd C. de Vries

15 30 50 per page