Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use the Combinatorica package in a Mathematica version 8 in the following code:

gp = Graph[{1-> 3, 1 -> 2, 3 ->1}]
<< Combinatorica`

But this gives me an error message:

General::compat: Combinatorica Graph and Permutations functionality has been superseded by preloaded functionality. The package now being loaded may conflict with this. Please see the Compatibility Guide for details.

I have checked the guide but, the recommendation given could not solve this problem.

Any suggestion please?

share|improve this question
Do not load Combinatorica, it's mostly obsolete for graphs and if you're not careful, it'll conflict with built-in functionality in v8. Just use ConnectedGraphQ[gp]. – Szabolcs Feb 17 '14 at 17:58
@John: Welcome to the site! Please consider registering your account! – Dr. belisarius Feb 17 '14 at 19:04

This is the way to do it if you really need to use the Combinatorica package:

<< Combinatorica`
gpc = Combinatorica`FromOrderedPairs[{{1, 3}, {1, 2}, {3, 1}}];
(* {{1, 3}, {2}}*)
share|improve this answer
BTW, don't even try to learn how to use Combinatorica from the docs. Better get a book like this one… – Dr. belisarius Feb 17 '14 at 21:40

Combinatorica is mostly obsoleted by version 8's built-in Graph data structure and the related functions. Do not load Combinatorica in v8 or later, unless you need functionality that is not available built-in and you know how to work around the name conflicts between Combinatorica and built-in functions.

In this case just use

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.