<< Combinatorica`
Needs["GraphUtilities`"]
ModMatrix[n_, list_] :=
Table[If[MemberQ[list, Mod[j - i, n]], 1, 0], {i, 1, n}, {j, 1, n}]
QuadraticModMatrix[n1_, list1_, n2_, list2_] :=
ModMatrix[n1, list1] + ArrayPad[ModMatrix[n2, list2], {0, n1 - n2}]
General::compat: Combinatorica Graph and Permutations functionality
has been superseded by preloaded functionaliy. The package now being
loaded may conflict with this. Please see the Compatibility Guide for
details.
2. Both GraphPlot[g] and ShowGraph[g] doesn't work! How to plot these
Graphs as below?
In[71]:= n = 1;
While[n++ < 10,
g = Graph[Table[i \[UndirectedEdge] Mod[i + 1, 2], {i, 20}]]
];
g
Essentially, you can still load and use the package as before; the
message is just a warning that some of the
symbols in the loaded package may clash with the built-in symbols. After
loading the package, the symbols in
the Combinatorica package will shadow the built-in symbols meaning that
if you call for example Graph, Mathematica
will use the one in the Combinatorica package, instead of the built-in
one. Luckily, both symbols exist in their own
context, so you can distinguish between them by calling them with their
full Context name. For example
System`Graph[{1 -> 2}]
will call the built in function Graph, and
Combinatorica`Graph[{{{1, 2}}}, {{{0, 0}}, {{1, 0}}}]
the function Graph defined in the Combinatorica package (provided the
package is loaded). So for the second part of your
post, you could do something like
g = System`Graph[Table[i \[UndirectedEdge] Mod[i + 1, 2], {i, 20}]]
Heike.
If the book will not be compatible, will there be more Symbolica
functions, and more matching documentation (!), added to Mathematica
over time?
Thank you.
Ralph Dratman