# Graph measurements: length, distance, diameter, eccentricity, radius, center

Prerequisite – Graph Theory Basics – Set 1, Set 2

A **graph** is defined as set of points known as ‘Vertices’ and line joining these points is known as ‘Edges’. It is a set consisting of where ‘V’ is vertices and ‘E’ is edge.

**Vertices:** {A, B, C, D, E, F}

**Edges:** {{A, B}, {A, D}, {A, E}, {B, C}, {C, E}, {C, F}, {D, E}, {E, F}}

**Graph Measurements:** There are few graph measurement methods available:

**1. Length –**

Length of the graph is defined as the number of edges contained in the graph.

Length of the graph: 8 AB, BC, CD, DE, EF, FA, AC, CE

**2. The distance between two Vertices –**

The distance between two vertices in a graph is the number of edges in a shortest or minimal path. It gives the available minimum distance between two edges. There can exist more than one shortest path between two vertices.

Shortest Distance between 1 - 5 is21 → 2 → 5

**3. Diameter of graph –**

The diameter of graph is the maximum distance between the pair of vertices. It can also be defined as the maximal distance between the pair of vertices. Way to solve it is to find all the paths and then find the maximum of all.

Diameter:3BC → CF → FG

**4. Radius of graph –**A radius of the graph exists only if it has the diameter. The minimum among all the maximum distances between a vertex to all other vertices is considered as the radius of the Graph G.It is denoted as r(G).

Radius:2All available minimum radius: BC → CF, BC → CE, BC → CD, BC → CA

**5. Center of graph –**

It consists of all the vertices whose eccentricity is minimum. Here the eccentricity is equal to the radius. For example, if the school is at the center of town it will reduce the distance buses has to travel.

Center:A

**6. Eccentricity of graph –**

It is defined as the maximum distance of one vertex from other vertex.The maximum distance between a vertex to all other vertices is considered as the eccentricity of the vertex. It is denoted by e(V).

Eccentricity from: (A, A) = 0 (A, B) = 1 (A, C) = 2 (A, D) = 1 Maximum value is 2, So Eccentricity is2

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: **DSA Self Paced**. Become industry ready at a student-friendly price.

## Recommended Posts:

- Differences between HTML <center> Tag and CSS "text-align: center;" Property
- How to center a div within another div?
- How to horizontally center a div using CSS?
- How to vertically center text with CSS?
- CSS | border-top-right-radius Property
- How to Resize Rotation Radius using CSS ?
- CSS | -moz-outline-radius property
- How to center a popup window on screen?
- How to center absolutely positioned element in div using CSS ?
- How to make elements float to center?
- How to Align <legend> Tag Text to Center ?
- CSS | border-top-left-radius Property
- CSS | border-bottom-right-radius Property
- How to vertically and horizontally align flexbox to center ?
- How to Align modal content box to center of any screen?
- Regular Graph in Graph Theory
- CSS border-bottom-left-radius Property
- How to remove border radius from Select tag using Bootstrap ?
- How to target all Font Awesome icons and align them center?
- Minimum volume of cone that can be circumscribed about a sphere of radius R

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.