12 2017 档案
摘要:1. 引言有向无环图(Directed Acyclic Graph, DAG)是有向图的一种,字面意思的理解就是图中没有环。常常被用来表示事件之间的驱动依赖关系,管理任务之间的调度。拓扑排序是对DAG的顶点进行排...
阅读全文
摘要:欧拉回路的求解欧拉回路的求解主要有两种方法:DFS 搜索及Fleury(佛罗莱)算法。本节分别介绍这两种方法。DFS 搜索求解欧拉回路用DFS 搜索思想求解欧拉回路的思路为:利用欧拉定理判断出一个图存在欧拉通路或...
阅读全文
摘要:Tarjan 算法一.算法简介Tarjan 算法一种由Robert Tarjan提出的求解有向图强连通分量的算法,它能做到线性时间的复杂度。 我们定义:如果两个顶点可以相互通达,则称两个顶点强连通(strongl...
阅读全文
摘要:#include /* Kosaraju求强连通分量邻接矩阵 */ using namespace std; int map[511][511];int nmap[511][511];int visited...
阅读全文
摘要:#include #include #include #define N 251#define INF 0x0fffffffusing namespace std;int si,ti,ci;int V,E,ans...
阅读全文
摘要:Network flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the max...
阅读全文
摘要:#include "stdio.h"#include "iostream"#include "algorithm"#define INF 9999999using namespace std;int map[N]...
阅读全文

浙公网安备 33010602011771号