graph-theory - 网络的直径是什么意思?

标签 graph-theory terminology shortest-path

this link上显示的图表“具有 6 个顶点和 7 个边的图,其中最左侧的第 6 个顶点是叶顶点或悬垂顶点。”有直径 4 吗?对还是错?

定义是

The diameter of a graph is the maximum eccentricity of any vertex in the graph. That is, it is the greatest distance between any pair of vertices. To find the diameter of a graph, first find the shortest path between each pair of vertices. The greatest length of any of these paths is the diameter of the graph.

Diameter, D, of a network having N nodes is defined as the maximum shortest paths between any two nodes in the network

Diameter, D, of a network having N nodes is defined as the longest path, p, of the shortest paths between any two nodes D ¼ max (minp[pij length( p)). In this equation, pij is the length of the path between nodes i and j and length (p) is a procedure that returns the length of the path, p. For example, the diameter of a 4 4 Mesh D ¼ 6.

最佳答案

维基百科示例

根据定义,直径对我来说似乎是 3。

alt text

最长最短路径的长度为 3 条边,例如之间6-16-2 .

网格示例

这是您的第二个定义,并进行了一些排版更正以使其有意义:

Diameter D of a network is defined as the longest path of the shortest paths between any two nodes. For example, the diameter of a 4x4 mesh D = 6



我们来看看 4x4 mesh例子:
A---B---C---D
|   |   |   |
E---F---G---H
|   |   |   |
I---J---K---L
|   |   |   |
M---N---O---P

最长最短路径的长度为 6 条边,即在 A-P 之间和 M-D .

引用
  • Mathworld - Wolfram/Graph Diameter

    The length of the "longest shortest path" between any two graph vertices of a graph.

  • Graph and Digraph Glossary - cudenver.edu

    Diameter: The diameter of a graph is the length of the longest chain you are forced to use to get from one vertex to another in that graph. You can find the diameter of a graph by finding the distance between every pair of vertices and taking the maximum of those distances.


  • 也可以看看
  • Computing Distances and Diameter
  • 有关于加权图的例子
  • 关于graph-theory - 网络的直径是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3174569/

    相关文章:

    algorithm - 给定多个图,找到两个节点之间的最短距离

    gis - PostGIS中的ST是什么?

    algorithm - 不变量的定义是什么?

    language-agnostic - 工厂和模式如何关联?

    javascript - 如何从加权图中的顶点找到长度为 k 的最短路径?

    algorithm - 如何通过归纳法证明强连通有向图至多有2n -2条边?

    将有向无环图转换为序列的算法

    java - 样本有向图和拓扑排序代码

    python - 当两点之间存在视线时,如何计算父节点和邻居节点之间的距离?

    algorithm - 如何在添加最少数量的新节点的情况下找到图中的最短路径?