图论中最小生成树Kruskal算法 及画图程序 M
图论中最小生成树Kruskal算法 及画图程序 M-函数
格式 [Wt,Pp]=mintreek(n,W):n为图顶点数,W为图的带权邻接矩阵,不构成边的两顶点之间的权用inf表示。显示最小生成树的边及顶点, Wt为最小生成树的权,Pp(:,1:2)为最小生成树边的两顶点,Pp(:,3)为最小生成树的边权,Pp(:,4)为最小生成树边的序号 附图,红色连线为最小生成树的图
例如
n=6 w=inf*ones(6)
w(1,[2,3,4])=[6,1,5] w(2,[3,5])=[5,3]
w(3,[4,5,6])=[5,6,4] w(4,6)=2 w(5,6)=6
[a,b]=mintreek(n,w)
-Graph theory Kruskal minimum spanning tree algorithm and Paint program M-function format [Wt, Pp] = mintreek (n, W): n for the map Vertices, W for weighted graph adjacency matrix, does not constitute the edge of the two vertices of between the right to express with inf. Show the minimum spanning tree of edges and vertices, Wt right for the Minimum Spanning Tree, Pp (:, 1:2) for the minimum spanning tree edges of the two vertices, Pp (:, 3) for the minimum spanning tree of the right side, Pp ( :, 4) For the minimum spanning tree graph edge serial number, red connection for the minimum spanning tree of graph such as n = 6 w = inf* ones (6) w (1, [2,3,4]) = [ 6,1,5]
- 2022-01-30 21:32:39下载
- 积分:1
FORTRAN 90手册是一个明确的和全面的FORTRAN 90指南…
The Fortran 90 Handbook is a definitive and comprehensive guide to Fortran 90
and its use. Fortran 90, the latest standard version of Fortran, has many
excellent new features that will assist the programmer in writing efficient,
portable, and maintainable programs. The Fortran 90 Handbook is an informal
description of Fortran 90, developed to provide not only a readable
explanation of features, but also some rationale for the inclusion of features
and their use. In addition, “models” give the reader better insight as to why
things are done as they are in the language.-The Handbook is a definitive and comprehensive guide to Fortran 90 and its use. F ortran 90. the latest standard version of Fortran, has many excellent new features that will Assis t the programmer in writing efficient, portable, and maintainable programs. The Fortran 90 Hand book is an informal description of Fortran 90, developed to provide not only a readable explan ation of features, but also some ration
- 2023-04-04 07:20:03下载
- 积分:1
[什么是数学:对思想和方法的基本研究(增订版)],它连续23次蝉联互动出版网数学类图书月销售排行第一名,英文原版. 20世纪杰出的数学家,哥廷根学派重要成员,曾...
[什么是数学:对思想和方法的基本研究(增订版)],它连续23次蝉联互动出版网数学类图书月销售排行第一名,英文原版. 20世纪杰出的数学家,哥廷根学派重要成员,曾任纽约大学数学系和数学科学研究院的主任,西方公认的数学权威――R・柯朗(Richard Courant)等三位数学大师亲自执笔.对我们编程人员的思维训练非常有帮助. 之前找到好多地方都没有找到这样一本书,现在找到了,不敢独占,拿出来分享给大家.-[What is Mathematics: The ideas and methods of basic research (updated version)], it won 23 consecutive interactive mathematical books published on net sales ranked first in the original English edition. The 20th century, an outstanding mathematician, G?ttingen school an important member, a former New York University Department of Mathematics and Mathematical Sciences Research Institute Director, the West recognized the authority of mathematics- R Courant (Richard Courant), such as mathematical master of the three written. of our programmers have a very intensive way of thinking help. before finding a lot of places do not find such a book, now found, they dare not exclusive, and show to share with everyone.
- 2022-03-06 16:27:29下载
- 积分:1