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


ToAdjacencyLists
ToAdjacencyLists[g]
constructs an adjacency list representation for graph .
ToAdjacencyLists[g,EdgeWeight]
returns an adjacency list representation along with edge weights.
Details and Options
- ToAdjacencyLists functionality is now available in the built-in Wolfram Language function AdjacencyList.
- To use ToAdjacencyLists, you first need to load the Combinatorica Package using Needs["Combinatorica`"].
- An option called Type that takes on values All or Simple 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.
- Type->Simple deletes self-loops and multiple edges from the constructed adjacency lists.
Tech Notes
Related Guides
-
▪
- Graph Construction and Representations ▪
- Graphs & Networks ▪
- Graph Visualization ▪
- Computation on Graphs ▪
- Graph Construction & Representation ▪
- Graphs and Matrices ▪
- Graph Properties & Measurements ▪
- Graph Operations and Modifications ▪
- Statistical Analysis ▪
- Social Network Analysis ▪
- Graph Properties ▪
- Mathematical Data Formats ▪
- Discrete Mathematics
Text
Wolfram Research (2012), ToAdjacencyLists, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/ToAdjacencyLists.html.
CMS
Wolfram Language. 2012. "ToAdjacencyLists." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/ToAdjacencyLists.html.
APA
Wolfram Language. (2012). ToAdjacencyLists. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/Combinatorica/ref/ToAdjacencyLists.html
BibTeX
@misc{reference.wolfram_2025_toadjacencylists, author="Wolfram Research", title="{ToAdjacencyLists}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/ToAdjacencyLists.html}", note=[Accessed: 14-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_toadjacencylists, organization={Wolfram Research}, title={ToAdjacencyLists}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/ToAdjacencyLists.html}, note=[Accessed: 14-August-2025]}