使用Dijkstra的找到一个最小生成树?

编程入门 行业动态 更新时间:2024-10-25 18:31:45
本文介绍了使用Dijkstra的找到一个最小生成树?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Dijkstra的的通常用于找到在两个节点之间的最短距离图形。它可以用来寻找最小生成树?如果是这样,怎么样?

Dijkstra's is typically used to find the shortest distance between two nodes in a graph. Can it be used to find a minimum spanning tree? If so, how?

编辑:这不是功课,但我想了解在一个旧练习考试的问题

This isn't homework, but I am trying to understand a question on an old practice exam.

推荐答案

严格来说,答案是否定的。 Dijkstra算法发现2个顶点上的曲线图之间的最短路径。然而,一个非常小的变化的算法产生另一种算法,并有效地产生MST。

Strictly, the answer is no. Dijkstra's algorithm finds the shortest path between 2 vertices on a graph. However, a very small change to the algorithm produces another algorithm which does efficiently produce an MST.

的算法设计手册是最好的书,我发现来回答类似这样的问题。

The Algorithm Design Manual is the best book I've found to answer questions like this one.

更多推荐

使用Dijkstra的找到一个最小生成树?

本文发布于:2023-11-30 21:25:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1651515.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:最小   Dijkstra

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!