constructs an adjacency list representation for graph .

ToAdjacencyLists[g, EdgeWeight]
returns an adjacency list representation along with edge weights.


  • To use , you first need to load the Combinatorica Package using Needs["Combinatorica`"].
  • An option called that takes on values All or can be given.
  • Type->All is the default setting of the option, and this permits self-loops and multiple edges to be reported in the adjacency lists.
  • deletes self-loops and multiple edges from the constructed adjacency lists.
New to Mathematica? Find your learning path »
Have a question? Ask support »