2
$\begingroup$

I am having difficulty mixing the new post-Combinatorica graph data structure, with functionality apparently only in Combinatorica.

I have constructed a graph using Graph[], e.g.,

n = 4; g = Graph[Range[n], {}] (* isolated vertices *)

The documentation on Automorphisms[] says:

Needs["Combinatorica`"]

But then I cannot apply it to g:

grp = Automorphisms[g]

And in fact after the Needs[] statement, the meaning of Graph[] changes (it turns red).

Is there some standard way to handle this situation? I am currently focussed on just that one function Automorphisms[], but clearly the issue can arise for many Combinatorica functions. (In fact, what I really want is the order of the automorphism group of a graph.)

Thanks for your guidance!


Addendum. I ended up following Szabolcs recommendation, and connected to the IGraph library in R from Mathematica via RLink to count the automorphisms. One application of this may be found at this MathOverflow question. The set up and installation necessary is nontrivial. I thank Szabolcs for his guidance throughout, as I could never had gotten it all to work without his help.

$\endgroup$
5
  • $\begingroup$ Let me know if that other question doesn't help. Out of the three solutions presented there, I currently prefer the RLink based one for its performance, but it does need some initial setup. $\endgroup$
    – Szabolcs
    Commented Nov 7, 2013 at 1:20
  • $\begingroup$ @Szabolcs: Oy, is it really that complicated? $\endgroup$ Commented Nov 7, 2013 at 1:21
  • 1
    $\begingroup$ I don't think it's complicated. You just need to convert the built-in Graph type to a COmbinatorica graph using GraphUtilities`ToCombinatoricaGraph and then you can apply the Combinatorica functions. The complicated part for me is keeping Combinatorica out of the context path. That nasty ToCombinatoricaGraph keeps re-adding it. $\endgroup$
    – Szabolcs
    Commented Nov 7, 2013 at 1:26
  • 1
    $\begingroup$ If you only need the order of the group, and especially if performance is important, take a look at the RLink based answer (the last one). That one shows how to get the order. The setup there is really a bit complicated, but only the first time you do it. $\endgroup$
    – Szabolcs
    Commented Nov 7, 2013 at 1:27
  • $\begingroup$ @Szabolcs: Thanks. I shouldn't have reacted that way when you were trying to help me! :-) For my application, the RLink route is the best, even if it requires installation. Thanks. $\endgroup$ Commented Nov 7, 2013 at 1:36

0

Browse other questions tagged or ask your own question.