12 2017 档案

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