随笔分类 -  Algorithm

According the Wiki and CLRS.
摘要:问题描述In graph theory, the shortest path problem is the problem of finding a path between two vertices in a graph such that the sum fo the weights of it... 阅读全文
posted @ 2015-05-17 20:31 Kinthon 阅读(299) 评论(0) 推荐(0)
摘要:背景:What is the minimum spanning tree? Given a connected , undirected graph, a spnning tree without circle of that graph is a subgraph that is a tree a... 阅读全文
posted @ 2015-05-17 10:39 Kinthon 阅读(219) 评论(0) 推荐(0)
摘要:问题描述:最大流问题的一个基本描述:如下图所示,s是源点,t为汇点,每条边上数字的含义是边能够允许流过的最大流量。可以将边看成管道,0/3代表该管道每秒最多能通过3个单位的流量,0代表当前流量。最大流问题即是说,从s点到t点,最大允许流量是多少?相关算法:Let G(V,E) be a graph,... 阅读全文
posted @ 2015-05-16 13:40 Kinthon 阅读(254) 评论(0) 推荐(0)
摘要:并查集是一种树型数据结构,主要用于处理不相交集合之间的合并和判断某一元素所在的集合(并查集中集体是用其最高父结点表示),这种数据结构维护一个数组,father[],用于记录每个元素的父亲,也就其所在的集合;其主要的操作有两种,查找和合并,查找是为了判断出指定元素所有的集合(树),对于查找算法可以用路... 阅读全文
posted @ 2015-05-02 20:28 Kinthon 阅读(233) 评论(0) 推荐(0)
摘要:资料参考:https://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9B%BD%E5%89%A9%E4%BD%99%E5%AE%9A%E7%90%86“有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二。问物几何?”这就是中国剩余定理的来源了,什么意思呢?就是说数一堆... 阅读全文
posted @ 2015-03-15 16:43 Kinthon 阅读(207) 评论(0) 推荐(0)