({{, (RefLink[GraphPeriphery, paclet:ref/GraphPeriphery])[g] 
gives vertices that are maximally distant to at least one vertex in the graph g.}, {, (RefLink[GraphPeriphery, paclet:ref/GraphPeriphery])[{v->w,…}]
uses rules v->w to specify the graph g.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[GraphPeriphery, paclet:ref/GraphPeriphery]) is also known as peripheral vertices.

The following options can be given:

With the default setting (RefLink[EdgeWeight, paclet:ref/EdgeWeight])->(RefLink[Automatic, paclet:ref/Automatic]), the edge weight of an edge is taken to be the (RefLink[EdgeWeight, paclet:ref/EdgeWeight]) of the graph g if available; otherwise, it is 1.

Possible (RefLink[Method, paclet:ref/Method]) settings include "Dijkstra", "FloydWarshall", "Johnson", and "PseudoDiameter".

OpenersPrimaryExamplesSection(Spacer1)Examples  (17)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Give the graph periphery for a graph:

g=WheelGraph[6];

GraphPeriphery[g]

Highlight the graph periphery:

HighlightGraph[g,%,VertexSize->Small]

OpenersExampleSection1(Spacer1)Scope  (7)

(RefLink[GraphPeriphery, paclet:ref/GraphPeriphery]) works with undirected graphs:

GraphPeriphery[]

Directed graphs:

GraphPeriphery[]

Weighted graphs:

GraphPeriphery[]

Multigraphs:

GraphPeriphery[]

Mixed graphs:

GraphPeriphery[]

Use rules to specify the graph:

GraphPeriphery[{1->2,2->3,3->1,3->4,4->5,5->3}]

(RefLink[GraphPeriphery, paclet:ref/GraphPeriphery]) works with large graphs:

g=GridGraph[{10,10,10,10}];

GraphPeriphery[g]//Length//Timing

OpenersExampleSection3(Spacer1)Applications  (1)

Find the people who are least related to everybody at a family gathering network:

g=ExampleData[{"NetworkGraph","FamilyGathering"}];

GraphPeriphery[g]

HighlightGraph[g,%]

OpenersExampleSection4(Spacer1)Properties & Relations  (8)

In a connected graph, the periphery can be found using (RefLink[VertexEccentricity, paclet:ref/VertexEccentricity]):

g=GridGraph[{3,4}]

VertexEccentricity[g,#]&/@VertexList[g]

Flatten[Position[%,Max[%]]]

GraphPeriphery[g]

Undirected connected graphs have at least two vertices on the periphery:

Select[RandomGraph[BernoulliGraphDistribution[7,0.6],9],ConnectedGraphQ]

Length[GraphPeriphery[#]]&/@%

And@@Thread[%≥2]

For a (RefLink[CompleteGraph, paclet:ref/CompleteGraph]), the periphery includes all vertices:

HighlightGraph[#,GraphPeriphery[#]]&/@Table[CompleteGraph[n,VertexSize->Small],{n,3,6}]

For a (RefLink[PathGraph, paclet:ref/PathGraph]) with positive weights, the periphery consists of the endpoints:

HighlightGraph[#,GraphPeriphery[#]]&/@Table[PathGraph[Range[n],VertexSize->Large],{n,5,8}]

With non-negative weights, the periphery forms two paths ending at the respective endpoints:

HighlightGraph[#,GraphPeriphery[#]]&[PathGraph[Range[8],VertexSize->Large,EdgeWeight->{0,1,1,0,1,0,0}]]

For a (RefLink[CycleGraph, paclet:ref/CycleGraph]), all vertices are at the periphery:

HighlightGraph[#,GraphPeriphery[#]]&/@Table[CycleGraph[n,VertexSize->Small],{n,3,6}]

For a (RefLink[WheelGraph, paclet:ref/WheelGraph]) of size 5 or more, all vertices but the hub are at the periphery:

HighlightGraph[#,GraphPeriphery[#]]&/@Table[WheelGraph[n,VertexSize->Small],{n,5,8}]

For a (RefLink[GridGraph, paclet:ref/GridGraph]), the periphery consists of the vertices at the corners:

HighlightGraph[#,GraphPeriphery[#]]&/@Table[GridGraph[dim,VertexSize->Small,ImageSize->{Tiny,Tiny}],{dim,{{3,3},{3,4},{4,3},{4,4}}}]

For a (RefLink[CompleteKaryTree, paclet:ref/CompleteKaryTree]), the periphery consists of the leaves:

HighlightGraph[#,GraphPeriphery[#]]&/@Table[CompleteKaryTree[n,VertexSize->Large],{n,3,5}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[VertexEccentricity, paclet:ref/VertexEccentricity])  ▪  (RefLink[GraphCenter, paclet:ref/GraphCenter])  ▪  (RefLink[GraphRadius, paclet:ref/GraphRadius])  ▪  (RefLink[GraphDiameter, paclet:ref/GraphDiameter])  ▪  (RefLink[GraphDistanceMatrix, paclet:ref/GraphDistanceMatrix])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Paths, Cycles, and Flows, paclet:guide/GraphPathsCyclesAndFlows])}})}})