Message Boards Message Boards

Will Mathematica be able to create this directed graph reasonably quickly?

Posted 11 years ago
I'm trying to build a directed graph of various files, this graph will end up having roughly 15000 nodes and 75000 edges. I've been running LayeredGraphPlot on the file set for about an hour now and it has not completed, although it has been "Running..." the whole time. I'm fairly new to Mathematica and this is by far the longest it's taken on any task I've given it (this is also by far the most difficult task I've given it to be fair).

The question is whether or not I should expect Mathematica to finish this task. Is it just going to take a long time to finish, or has it hit a loop or run out of memory? 

The relevant code looks like this:

LayeredGraphPlot[{File1 -> File906281, File1 -> File912831, File 2 -> File012541 ... File992821 -> File901901}, VertexLabeling -> True]
POSTED BY: Pat Dillon
You probably trying to create a graphical output of it and that takes time. But what would you able to see in 15000 nodes and 75000 edges ? Is it useful, do you really need it? You also have VertexLabeling -> True which will be a complete mess of things visually. Large networks can be built quickly and mostly are used to run algorithms on them. It takes less than 1/10 of a second to build a random graph with 15000 nodes and 75000 edges on my machine - suppressing graphical output:
In[]:= g = RandomGraph[{15000, 75000}]; // AbsoluteTiming
Out[]= {0.032981, Null}

And it takes say 2 seconds:
In[]:= c = FindGraphCommunities[g]; // AbsoluteTiming
Out[]= {1.180309, Null}

to find 14 Communities inside that graph:
In[]:= c // Length
Out[]= 14
POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract