A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/ref/GraphDiameter.html below:

GraphDiameter—Wolfram Language Documentation

WOLFRAM Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technology expertise.

WolframConsulting.com

BUILT-IN SYMBOL

GraphDiameter[g]

gives the greatest distance between any pair of vertices in the graph g.

Examplesopen allclose all Basic Examples  (1)

Give the graph diameter for a complete graph:

Scope  (7)

GraphDiameter works with undirected graphs:

Directed graphs:

Weighted graphs:

Multigraphs:

Mixed graphs:

Use rules to specify the graph:

GraphDiameter works with large graphs:

Applications  (2)

Illustrate the diameter in two Petersen graphs:

For a CompleteGraph, the diameter is 1:

For a PathGraph of size , the diameter is :

For a CycleGraph of size , the diameter is :

For a WheelGraph of size 5 or more, the diameter is 2:

A WheelGraph of size 4 is a complete graph, so the diameter is 1:

For a GridGraph of size {m,n}, the diameter is :

For a CompleteKaryTree tree of depth , the diameter is :

Find the largest number of steps separating two people at a family gathering network:

Properties & Relations  (3)

For a connected graph, the diameter can be computed by VertexEccentricity:

If a simple graph has diameter greater than 3, then its complement has diameter less than 3:

The graph diameter is unchanged when reversing every edge:

Wolfram Research (2010), GraphDiameter, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphDiameter.html (updated 2015). Text

Wolfram Research (2010), GraphDiameter, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphDiameter.html (updated 2015).

CMS

Wolfram Language. 2010. "GraphDiameter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphDiameter.html.

APA

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

BibTeX

@misc{reference.wolfram_2025_graphdiameter, author="Wolfram Research", title="{GraphDiameter}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GraphDiameter.html}", note=[Accessed: 11-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_graphdiameter, organization={Wolfram Research}, title={GraphDiameter}, year={2015}, url={https://reference.wolfram.com/language/ref/GraphDiameter.html}, note=[Accessed: 11-July-2025 ]}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4