Diameter of a ring network

The diameter of a ring network is calculated by n/2:

https://www.phy.ornl.gov/csep/ca/node22.html

The diameter is defined as:
“the longest of all the calculated shortest paths in a network” (source: https://www.phy.ornl.gov/csep/ca/node22.html)
or
“the maximum distance between any pair of nodes” (source: a professor’s slides; I cannot give a link, I cannot give you the professor’s name due to privacy reasons; but I can show you a screenshot)

In the picture below, there is a ring network and there are 6 nodes:

(alternative mirror: https://i.ibb.co/Dkv4Tmm/330px-Network-Topology-Ring.png)

I tried to demonstrate the longest link between the top left and top right node. According to the description(s) of the diameter, the diameter of this ring network should be 6/2 = 3. But I cannot understand why it is (node number)/2 (i.e. 6/2=3). I tried to describe the longest link the picture (the way that I understand the longest link). What am I doing wrong?

I think you depict a digraph, in which a node A links to node B, but not necessarily vice versa. The others are assuming that links are mutual, i.e. that the network is a graph, not just a digraph.

You pictured not even the longest path; the message could have gone around the ring several times and bounced back and forth! What you want is the maximum, over all pairs of vertices, of the shortest path between the two vertices. This should equal the diameter of the network considered as a graph.

I think I’ve got the definition wrong.

Diameter is the longest among all the shortest paths between any 2 nodes.

Which means in this case with this ring:

  1. the shortest distance between thee selected nodes will be 1.
  2. however, between the opposite nodes, the shortest distance will be always 3.
  3. it is the longest of all shortest paths in the graph.

In a more verbose way, say you calculate the shortest distances between all pair of nodes, if we enumerate them 1-6 then it would mean to calculate the shortest distances between (1, 2), (1,3), …, (1,6), (2,1), …, (5, 6). You will find out that the shortest distances are:

shortest(1,2) = 1
shortest(1,3) = 2
shortest(1,4) = 3
shortest(1,5) = 2
shortest(1,6) = 1

similarly for all the pairs (it will be the same since the ring is symmetric), and all you need to do now is to find the longest of these paths, which is 3 in this case.

Is this homework?

It isn’t. Exercise with a solution. But the solution only includes the result. No explanation. So, I was confused.

For what it’s worth, this definition of “diameter” is also used for other geometric figures. For instance, the “diameter of a square” is the length of its diagonal, and the “diameter of a triangle” is its longest side.