Combinatorica`
Combinatorica`

AllPairsShortestPath

As of Version 10, most of the functionality of the Combinatorica package is built into the Wolfram System. »

AllPairsShortestPath[g]

gives a matrix, where the ^(th) entry is the length of a shortest path in g between vertices and .

AllPairsShortestPath[g,Parent]

returns a three-dimensional matrix with dimensions 2*V[g]*V[g], in which the ^(th) entry is the length of a shortest path from to and the ^(th) entry is the predecessor of in a shortest path from to .

Details

Examples

Basic Examples  (2)

AllPairsShortestPath has been superseded by GraphDistanceMatrix:

Wolfram Research (2012), AllPairsShortestPath, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html.

Text

Wolfram Research (2012), AllPairsShortestPath, Wolfram Language function, https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html.

BibTeX

@misc{reference.wolfram_2020_allpairsshortestpath, author="Wolfram Research", title="{AllPairsShortestPath}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html}", note=[Accessed: 14-May-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_allpairsshortestpath, organization={Wolfram Research}, title={AllPairsShortestPath}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html}, note=[Accessed: 14-May-2021 ]}

CMS

Wolfram Language. 2012. "AllPairsShortestPath." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html.

APA

Wolfram Language. (2012). AllPairsShortestPath. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html