12 votes

Combinatorica Functionality in Vers. 11.1.1

The problem is that you defined the Graph using M syntax and not Combinatorica syntax. For your example you should do: ...
Carl Woll's user avatar
  • 130k
10 votes

How many graphs are there on 4 nodes with degrees 1, 1, 2, 2?

I had an old program lying around that will generate all realizations of a degree sequence. The first vertex will have degree equal to the first element in the input list, the 2nd degree equal to the ...
Szabolcs's user avatar
  • 234k
10 votes
Accepted

Is there a Mathematica function that generates all ordered partitions?

You can use the resource function KSetPartitions as follows: ...
kglr's user avatar
  • 392k
9 votes
Accepted

Testing for Symmetry and Regularity in (Graph-Theoretic) Graphs

In general, if we first use GraphAutomorphismGroup to find the automorphism group of a graph, it is not hard to figure out if it acts transitively on vertices, ...
Misha Lavrov's user avatar
9 votes
Accepted

Replacement for GraphJoin

GraphComputation`GraphJoin ...
kglr's user avatar
  • 392k
9 votes

How can I compute the chromatic number of a graph?

The IGraph/M package has an implementation of this. Example: << IGraphM` g = RandomGraph[{10, 20}] Compute the chromatic number: ...
Szabolcs's user avatar
  • 234k
9 votes
Accepted

FindShortestPathTree superseded by FindSpanningTree?

My IGraph/M package provides replacements for most of the graph theory functions of Combinatorica. It includes IGShortestPathTree: Example use on a weighted graph, ...
Szabolcs's user avatar
  • 234k
8 votes

Testing for Symmetry and Regularity in (Graph-Theoretic) Graphs

IGraph/M 0.3.111 now has fast functions to test for all of these. Please look under Isomorphism -> Properties related to the automorphism group in the documentation. Regular: ...
Szabolcs's user avatar
  • 234k
7 votes
Accepted

Counting k-colorings of a graph

The function FindProperColorings is now in the Wolfram Function Repository, and it lists all the proper k-colorings of a graph. https://resources.wolframcloud.com/FunctionRepository/resources/...
Daniel McDonald's user avatar
7 votes

Combinatorica Functionality in Vers. 11.1.1

Apparently, they killed it off without making an equivalent, so you'd have to re-implement an algorithm. documentation link is here: Upgrading from: Combinatorica In some cases, parameterized ...
Gregory Klopper's user avatar
7 votes

Replacement for GraphJoin

The function you reference still works fine, but it is part of the Combinatorica package. You need to load the package first, and work with Combinatorica's own graph datatype. Combinatorica precedes ...
Szabolcs's user avatar
  • 234k
6 votes
Accepted

Find independent tensor products using Young Tableaux

For those who are facing a similar problem, there is a beautiful package xTras which gives all possible contractions taking into account the symmetries of the ...
apt45's user avatar
  • 1,648
6 votes
Accepted

How many graphs are there on 4 nodes with degrees 1, 1, 2, 2?

4X4 adjacency matrices: am = Tuples[{0, 1}, {4, 4}]; 4X4 adjacency matrices with no self-loops: ...
kglr's user avatar
  • 392k
6 votes

FindShortestPathTree superseded by FindSpanningTree?

Thanks for that. Impressive. An alternative that might be better reflected in the documentation is to use FindShortestPath. ...
user46831's user avatar
  • 633
5 votes

Counting k-colorings of a graph

Counting k-colorings of a graph Are you looking for https://en.wikipedia.org/wiki/Chromatic_polynomial of a graph? It can be computed with ChromaticPolynomial. <...
Szabolcs's user avatar
  • 234k
5 votes

Find independent tensor products using Young Tableaux

Although xTras package is everything you need, I made a function (just for fun) that finds all the contraction of the product of 2-ranked tensors. It uses sort of ...
Vasily Mitch's user avatar
5 votes
Accepted

How can one calculate the co-normal (disjunctive/or) product of two graphs in Wolfram Language?

As noted in this Community post, the conormal/disjunctive product can be implemented like so for unweighted graphs: ...
4 votes
Accepted

Cycle index of a graph automorphism group

You can use CycleIndexPolynomial like so: ...
Szabolcs's user avatar
  • 234k
4 votes

How can I compute the chromatic number of a graph?

Without loading any packages: g = RandomGraph[{30, 60}] ResourceFunction["ChromaticNumber"][g]
M.R.'s user avatar
  • 31.4k
4 votes

Orbits of a set $X$ under the action of cyclic permutation $T$

GroupOrbits[CyclicGroup[5], {{1, 1, 2, 3, 3}}, Permute] ...
kglr's user avatar
  • 392k
4 votes
Accepted

Up-to-date way to access Derangements (and other Combinatorica)

Please see Computational Discrete Mathematics by Pemmaraju and Skiena, pages 106 and 107. ...
KennyColnago's user avatar
  • 15.2k
3 votes
Accepted

Coloring ladder rung graphs

The function FindProperColorings in the Wolfram Function Repository generates all proper k-colorings of a graph. https://resources.wolframcloud.com/FunctionRepository/resources/FindProperColorings
Daniel McDonald's user avatar
3 votes

How can I compute the chromatic number of a graph?

Very simple: ChromaticPolynomial[g]
David G. Stork's user avatar
3 votes

Non-trivial partitions of numbers using Combinatorica

Here's a generic answer: ...
Feyre's user avatar
  • 8,587
2 votes

Combinatorica Functionality in Vers. 11.1.1

IGraph/M already has replacements for most graph-related Combinatorica functions that are not yet covered by built-in functionality. Since IGraph/M 0.3.98, you can use ...
Szabolcs's user avatar
  • 234k
2 votes
Accepted

Change VertexSize in ShowGraph from Combinatorica

The same way as in, e.g., ListPlot: ...
corey979's user avatar
  • 23.9k
2 votes

Multiple colors on a single graph edge?

trg = TransitiveReductionGraph[RelationGraph[UnsameQ@## && SubsetQ@##&, Subsets[Range@3]], VertexLabels -> "Name", EdgeShapeFunction->"Line"] <...
kglr's user avatar
  • 392k
2 votes
Accepted

How do I visualize the result of EdgeColoring[g]?

With IGraph/M, you can do the following: ...
Szabolcs's user avatar
  • 234k
2 votes

Combinatorica and DualPartition function (for a Young diagram)

The function Partitions[] in Combinatorica`, which the author (Rodger) of http://web.science.uu.nl/itf/Teaching/2013/R.J.Rodger....
Michael E2's user avatar
  • 234k
2 votes

How can directed graphs be constructed from a list of lists of vertex pairs in Mathematica 7 by Graph or by MakeGraph?

Mathematica 7 has no built-in support for graphs. You are probably referring to the separate Combinatorica package, which is described in the book Computational Discrete Mathematics. Do not confuse ...
Szabolcs's user avatar
  • 234k

Only top scored, non community-wiki answers of a minimum length are eligible