求一个无向连通有权图的最大树

hanchileilei 2002-06-04 04:14:07
我想请求一个问题:求一个无向连通有权图的最大树。使用相邻矩阵存储图,怎样由该矩阵得到最大生成树?我看到好多树上都有关于最小生成树的算法,但我试着把它应用到最大生成树时行不通,有没有一个简单易行的方法通过相邻矩阵得到最大树呢?谢谢
...全文
41 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
one_add_one 2002-06-04
  • 打赏
  • 举报
回复
在论坛的左边有一个“我的问题”。

选择这个帖子最右边的管理。
里面有一个帖子加分。

如果要给分就在每个人的回复右边填上分数

输入密码,就可以给分了。
hanchileilei 2002-06-04
  • 打赏
  • 举报
回复
好,让我再试一试,可能我哪里出了错误。我正做:一个由数组存储的无向图,用vb求出其最大树,并且用vb表示出该树的结构,并且要把每条边的权值表示出来,所以能不能帮我想一个最简单的方法?原来想用line方法画出树的结构图,但我实现不了,所以改用treeview简单的表示出树的结构,谢谢!
还有一个问题:我想给你们加分,怎么加呢?(不好意思,我是新成员 ;> )
one_add_one 2002-06-04
  • 打赏
  • 举报
回复
我觉得行得通啊。

你把每一条边的权都变成它的相反数。

然后用最小生成数的算法,求得一棵树。

这棵树就是原图的最大生成树。

你能举一个反例吗?
starfish 2002-06-04
  • 打赏
  • 举报
回复
和最小生成树一样的方法,对边按照从大到小排序,然后一条一条地加入生成树中,并保证不出现圈。
amber大牛的论总结 1. 论 Graph Theory 1.1. 定义与术语 Definition and Glossary 1.1.1. 与网络 Graph and Network 1.1.2. 的术语 Glossary of Graph 1.1.3. 路径与回路 Path and Cycle 1.1.4. 连通性 Connectivity 1.1.5. 论中特殊的集合 Sets in graph 1.1.6. 匹配 Matching 1.1.7. 树 Tree 1.1.8. 组合优化 Combinatorial optimization 1.2. 的表示 Expressions of graph 1.2.1. 邻接矩阵 Adjacency matrix 1.2.2. 关联矩阵 Incidence matrix 1.2.3. 邻接表 Adjacency list 1.2.4. 弧表 Arc list 1.2.5. 星形表示 Star 1.3. 的遍历 Traveling in graph 1.3.1. 深度优先搜索 Depth first search (DFS) 1.3.1.1. 概念 1.3.1.2. 无向连通中的桥 Finding bridges in undirected graph 1.3.2. 广度优先搜索 Breadth first search (BFS) 1.4. 拓扑排序 Topological sort 1.5. 路径与回路 Paths and circuits 1.5.1. 欧拉路径或回路 Eulerian path 1.5.1.1. 无向 1.5.1.2. 有向 1.5.1.3. 混合 1.5.1.4. 无权 Unweighted 1.5.1.5. 有权 Weighed — 中国邮路问题The Chinese post problem 1.5.2. Hamiltonian Cycle 哈氏路径与回路 1.5.2.1. 无权 Unweighted 1.5.2.2. 有权 Weighed — 旅行商问题The travelling salesman problem 1.6. 网络优化 Network optimization 1.6.1. 最小生成树 Minimum spanning trees 1.6.1.1. 基本算法 Basic algorithms 1.6.1.1.1. Prim 1.6.1.1.2. Kruskal 1.6.1.1.3. Sollin(Boruvka) 1.6.1.2. 扩展模型 Extended models 1.6.1.2.1. 度限制生成树 Minimum degree-bounded spanning trees 1.6.1.2.2. k小生成树 The k minimum spanning tree problem(k-MST) 1.6.2. 最短路Shortest paths 1.6.2.1. 单源最短路 Single-source shortest paths 1.6.2.1.1. 基本算法 Basic algorithms 1.6.2.1.1.1. Dijkstra 1.6.2.1.1.2. Bellman-Ford 1.6.2.1.1.2.1. Shortest path faster algorithm(SPFA) 1.6.2.1.2. 应用Applications 1.6.2.1.2.1. 差分约束系统 System of difference constraints 1.6.2.1.2.2. 有向无环上的最短路 Shortest paths in DAG 1.6.2.2. 所有顶点对间最短路 All-pairs shortest paths 1.6.2.2.1. 基本算法 Basic algorithms 1.6.2.2.1.1. Floyd-Warshall 1.6.2.2.1.2. Johnson 1.6.3. 网络流 Flow network 1.6.3.1. 最大流 Maximum flow 1.6.3.1.1. 基本算法 Basic algorithms 1.6.3.1.1.1. Ford-Fulkerson method 1.6.3.1.1.1.1. Edmonds-Karp algorithm 1.6.3.1.1.1.1.1. Minimum length path 1.6.3.1.1.1.1.2. Maximum capability path 1.6.3.1.1.2. 预流推进算法 Preflow push method 1.6.3.1.1.2.1. Push-relabel 1.6.3.1.1
Amber 大牛关于论的总结 ,1.1M 大小.... 1. 论 Graph Theory 1.1. 定义与术语 Definition and Glossary 1.1.1. 与网络 Graph and Network 1.1.2. 的术语 Glossary of Graph 1.1.3. 路径与回路 Path and Cycle 1.1.4. 连通性 Connectivity 1.1.5. 论中特殊的集合 Sets in graph 1.1.6. 匹配 Matching 1.1.7. 树 Tree 1.1.8. 组合优化 Combinatorial optimization 1.2. 的表示 Expressions of graph 1.2.1. 邻接矩阵 Adjacency matrix 1.2.2. 关联矩阵 Incidence matrix 1.2.3. 邻接表 Adjacency list 1.2.4. 弧表 Arc list 1.2.5. 星形表示 Star 1.3. 的遍历 Traveling in graph 1.3.1. 深度优先搜索 Depth first search (DFS) 1.3.1.1. 概念 1.3.1.2. 无向连通中的桥 Finding bridges in undirected graph 1.3.2. 广度优先搜索 Breadth first search (BFS) 1.4. 拓扑排序 Topological sort 1.5. 路径与回路 Paths and circuits 1.5.1. 欧拉路径或回路 Eulerian path 1.5.1.1. 无向 1.5.1.2. 有向 1.5.1.3. 混合 1.5.1.4. 无权 Unweighted 1.5.1.5. 有权 Weighed — 中国邮路问题The Chinese post problem 1.5.2. Hamiltonian Cycle 哈氏路径与回路 1.5.2.1. 无权 Unweighted 1.5.2.2. 有权 Weighed — 旅行商问题The travelling salesman problem 1.6. 网络优化 Network optimization 1.6.1. 最小生成树 Minimum spanning trees 1.6.1.1. 基本算法 Basic algorithms 1.6.1.1.1. Prim 1.6.1.1.2. Kruskal 1.6.1.1.3. Sollin(Boruvka) 1.6.1.2. 扩展模型 Extended models 1.6.1.2.1. 度限制生成树 Minimum degree-bounded spanning trees 1.6.1.2.2. k小生成树 The k minimum spanning tree problem(k-MST) 1.6.2. 最短路Shortest paths 1.6.2.1. 单源最短路 Single-source shortest paths 1.6.2.1.1. 基本算法 Basic algorithms 1.6.2.1.1.1. Dijkstra 1.6.2.1.1.2. Bellman-Ford 1.6.2.1.1.2.1. Shortest path faster algorithm(SPFA) 1.6.2.1.2. 应用Applications 1.6.2.1.2.1. 差分约束系统 System of difference constraints 1.6.2.1.2.2. 有向无环上的最短路 Shortest paths in DAG 1.6.2.2. 所有顶点对间最短路 All-pairs shortest paths 1.6.2.2.1. 基本算法 Basic algorithms 1.6.2.2.1.1. Floyd-Warshall 1.6.2.2.1.2. Johnson 1.6.3. 网络流 Flow network 1.6.3.1. 最大流 Maximum flow 1.6.3.1.1. 基本算法 Basic algorithms 1.6.3.1.1.1. Ford-Fulkerson method 1.6.3.1.1.1.1. Edmonds-Karp algorithm 1.6.3.1.1.1.1.1. Minimum length path 1.6.3.1.1.1.1.2. Maximum capability path 1.6.3.1.1.2. 预流推进算法 Preflow push method 1.6.3.1.1.2.1. Push-relabel 1.6.3.1.1.2.2. Relabel-to-front 1.6.3.1.1.3. Dinic method 1.6.3.1.2. 扩展模型 Extended models 1.6.3.1.2.1. 有上下界的流问题 1.6.3.2. 最小费用流 Minimum cost flow 1.6.3.2.1. 找最小费用路 Finding minimum cost path 1.6.3.2.2. 找负权圈 Finding negative circle 1.6.3.2.3. 网络单纯形 Network simplex algorithm 1.6.4. 匹配 Matching 1.6.4.1. 二分 Bipartite Graph 1.6.4.1.1. 无权-匈牙利算法 Unweighted - Hopcroft and Karp algorithm 1.6.4.1.2. 带权-KM算法 Weighted –Kuhn-Munkres(KM) algorithm 1.6.4.2. 一般General Graph 1.6.4.2.1. 无权-带花树算法 Unweighted - Blossom (Edmonds) 1.

33,008

社区成员

发帖
与我相关
我的任务
社区描述
数据结构与算法相关内容讨论专区
社区管理员
  • 数据结构与算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧