Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the pros and cons of using built-in Graph/GraphPlot (and related) types vs. types in the Combinatorica package?

share|improve this question
Use built-in whenever you can, because Combinatorica is deprecated. It actually gives you this warning when you load it, and can cause shadowing of some of the built-in functions, causing conflict. – R. M. May 6 '12 at 22:18
Nice question. I'd like to see a summary of virtues and drawbacks of each. – DavidC May 6 '12 at 22:19
Typically, I found it easier to work with labeling and styling vertices and edges with the Combinatorica graph objects. And unless I'm mistaken, there are still some operations upon graphs that are easier to do with Combinatorica than with the newer System graph objects. But as @R.M. indicates, it's better not to rely upon a deprecated package. – murray May 6 '12 at 22:51
Graph is a built-in type introduced in version 8. Since it's built-in, it can be quite efficient (at least in theory). It is clearly meant to replace all Combinatorica-related functionality because some of it conflicts with Combinatorica and now there is a warning message when loading Combinatorica. However, not all Combinatorica functions have a built-in equivalent (yet?) and there are still some bugs to be ironed out (I'm really hoping v9 will bring lots of improvement). To sum up: if you don't have the Combinatorica book, use Graph (the future) and fall back to C'ca when needed. – Szabolcs May 7 '12 at 13:28
Yet another thing: AFAIK Combinatorica has no support for graphs with unconnected vertices (I might be wrong). Graph does. GraphPlot can plot multigraphs, while Graph can't represent them. GraphPlot produces very similar layouts to Graph, but it's not always equivalent, and I still use GraphPlot on occasion. Some people (me included) don't like the Property API introduced with Graph as it's not functional, and you need to keep in mind that Graph is an atomic type that can only be accessed indirectly through this API. (It's not like other Mma expressions.) – Szabolcs May 7 '12 at 13:31

I guess it also depends on your data. In my work, I do use the Laplacian for my research which can be, in principle, related to the adjacency matrix. In order to "visualize" my network I use the following:


Since I don't want to do an additional transformation Laplacian -> Adjacency Matrix (it takes time), I never use Graph as well as Combinatorica` for such stuff.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.