Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4115 > unrolled thread

Re: In Version 8, Combinatorial&GraphTheory functions confuse me completely

Started byHeike Gramberg <heike.gramberg@gmail.com>
First post2011-08-01 03:36 +0000
Last post2011-08-01 03:36 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: In Version 8, Combinatorial&GraphTheory functions confuse me completely Heike Gramberg <heike.gramberg@gmail.com> - 2011-08-01 03:36 +0000

#4115 — Re: In Version 8, Combinatorial&GraphTheory functions confuse me completely

FromHeike Gramberg <heike.gramberg@gmail.com>
Date2011-08-01 03:36 +0000
SubjectRe: In Version 8, Combinatorial&GraphTheory functions confuse me completely
Message-ID<j156vd$b2g$1@smc.vnet.net>
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.

On 31 Jul 2011, at 12:26, a boy wrote:

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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web