I wanted to visualize an Interval Graph.Documentation says there exists a function IntervalGraph in Global which used to be in package Combinatorica before Mathematica 10.0. However I don't see any function named "IntervalGraph" available in 11.1. When I try to Import Package Combinatorica I get an warning

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.

SetDelayed::write: Tag Element in a_List[Element]{index___} is Protected.

After importing Combinatorica package (with the warnings) when I try to use the function IntervalGraph I get a Text result

In[2]:= IntervalGraph[{{1,10},{4,18}}]
Out[2]= - Graph:< 1,2,Undirected > -

Is it a mathematica bug ? is the function IntervalGraph not-existent now ? is the documentation wrong ? or is there any other ways to visualize the graph ?

  • $\begingroup$ Do not use bugs as a tag until your observations have been verified to be a bug. $\endgroup$ – J. M.'s ennui May 26 '17 at 14:08
  • $\begingroup$ Where exactly does the documentation say that there is a built-in function called IntervalGraph? I do not believe it says such a thing. However, you can easily replicate that functionality using RelationGraph. $\endgroup$ – Szabolcs May 26 '17 at 14:40
  • $\begingroup$ @Szabolcs IntervalGraph shows up in the documentation for versions 10.4.1 and 11.1.1 (Windows 7). $\endgroup$ – JimB May 26 '17 at 14:55
  • 1
    $\begingroup$ @JimBaldwin Yes, in the Combinatorica documentation. Not as a builtin. $\endgroup$ – Szabolcs May 26 '17 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.