Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

In Version 8, Combinatorial&GraphTheory functions confuse me completely

196 views
Skip to first unread message

a boy

unread,
Jul 31, 2011, 7:29:25 AM7/31/11
to
1. Mathematica8 says Combinatorica Graph and Permutations
functionality has been superseded by preloaded functionaliy. But "
preloaded functionaliy" seems to be not completed yet. There are only
a few "preloaded functionaliy". At now, how to use Combinatorica &
GraphUtilities package?

<< 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

Heike Gramberg

unread,
Jul 31, 2011, 11:36:13 PM7/31/11
to
Which functionality from the Combinatorica package are you missing? I
don't know if you have
read the entry Compatibility/tutorial/Combinatorica in the Document
Center in Mathematica, but it explains
how you can achieve some of the functionality of the Combinatorica
package with the new built in symbols.

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.

Ralph Dratman

unread,
Aug 3, 2011, 7:28:47 PM8/3/11
to
Since the documentation for Symbolica is said to be best encountered
in the form of a relatively expensive, out-of-print book, I'd like to
know if that book will be compatible with the new built-in (but
limited) functionality.

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

0 new messages