![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图论
文章平均质量分 76
Sunrise0929
这个作者很懒,什么都没留下…
展开
-
算导3(BellmanFord)
3. Single-source shortestpaths. The following is theadjacency matrix, vertex A is the source.A B C D E A -1 3 B 3 2 2 C D 1原创 2013-08-13 10:57:21 · 980 阅读 · 0 评论 -
算导2(原点终点最短路)
5. Shortestpath in multistage graphs. Find the shortest path from 0 to 15 for the followinggraph.A multistagegraph is a graph (1) G=(V,E) with V partitioned into K>= 2 disjoint subsets such that原创 2013-08-13 10:57:08 · 1462 阅读 · 0 评论 -
纪念----国赛
Go on…… 相信自己能做到啊能做到,默念100遍啊100遍。。 交巡警服务平台的设置与调度 摘要本文根据图论中的相关理论,将该城市交通网络抽象为无向图。综合考虑了时限约束、出警时间、巡警平台的均衡度、巡警平台的覆盖率以及发案率等指标,建立了相应的数学规划模型,并利用瞎子爬山法、匈牙利算法、二分答案法、最小费用最大流、深度优先搜索等最优化方法对相应的模型原创 2013-08-13 10:57:01 · 1226 阅读 · 0 评论 -
SLOW(FASTER)-ALL-PAIRS-SHORTEST-PATHS
这个算法的核心思想是给定矩阵l和u,返回矩阵w。也就是它把已经计算出来的最短路径延长一条边。每次和最初L矩阵结合。#include #include #define N 9999using namespace std;//这个题目需要申请三个矩阵,l矩阵一直不变即为原始矩阵,w矩阵是需要不断进行更新的,u矩阵为w矩阵赋给的值,以供后面修改w。 int l[5][5] = {{0,原创 2013-08-13 10:57:17 · 1228 阅读 · 0 评论 -
实验四:图的基本存储结构及图的遍历运算
用临接矩阵存储图,输出深度优先遍历的顶点序列:#include #include using namespace std;typedef struct{ int n,e;}Graph;Graph G;int Adj[50][50];int visited[50];int dfs(Graph G,int v){ int w; visited[v]原创 2013-08-13 10:56:32 · 1334 阅读 · 0 评论