这篇随笔是对算法导论(Introduction to Algorithms, 3rd. Ed.)第26章 Maximum Flow的摘录。

------------------------------------------------------------------------------------------------------

1. A flow network G = (V, ) is a directed graph in which each edge (u, v) ∈ E has a nonnegative capacity c(u, v) ≥ 0.

2. We further require that if E contains an edge (u, v) then there is no edge (v, u) in the reverse direction.

3. We distinguish two vertices in a flow network: a source s and a sink t.

4. If (u, v) ∉ E, then for convenience we define (u, v) = 0, and we disallow self-loops, hence, capacity can be viewed as a function c: V × V R.

5. A flow in G is a real-valued function : V×V → R that satisfies the following two properties:

#Capacity constraint: For all u, v ∈ V, we require  0 ≤  (u, v) ≤ c (u, v)

#Flow conservation: For all u ∈ V - {s, t}, we require

   ∑ (v, u) : v ∈ V =  ∑ (u, v) : v ∈ V  

6. The value | | of a flow f is defined as | f | =  ∑ (s, v) -  ∑ (v, s).

7. In the maximum-flow problem, we are given a flow network G with source s and sink t, and we wish to find a flow of maximum value.

8. A cut (S, ) of flow network G = (V, ) is a partion of V into S and T = V - S such that s S and t ∈ T.

9. If  f  is a flow, then the net flow (S, ) across the cut (S, ) is defined to be

  (S, ) = ∑uS ∑v f (u, v) - ∑uS ∑vT (v, u).

10. The capacity of the cut (S, T)  is defined to be

  (S, ) = ∑uS ∑vT (u, v).

11. A minimum cut of  a network is a cut whose capacity is minimum over all cuts of the network.

12. Given a flow network G = (V, ) with source s and sink t. Let  f  be a flow in G, and consider a pair of vertices u, v ∈ V. We difine the residual capacity (induced by ) cf  (u, v) by

  cf  (u, v) =

        (u, v) - (u, v),  if (u, v) ∈ E

        (u, v),        if (v, u) ∈ E

        0,        otherwise

13. Given a flow network G = (V, ) and a flow f, the residual network of G induced by f is Gf  = (V, Ef ) where

  Ef  = {(u, v) ∈ V × Vcf  ( u, v) > 0}

14.  If  f  is a flow in G and f '  is a flow in  the corresponding residual network Gf, we define ff ', the augmentation of flow f  by f ', to be a function from V × V to R, defined by

(f ' ) (u, v) =

        f (u, v) + f ' (u, v) - f ' (v, u)  if (u, v) ∈ E ,

        0                otherwise .

15.(Lemma 26.1, pp. 717)

Let G = (V, E) be a flow network with source s and sink t, and let  f  be a flow in G . Let Gf be the residual network of G induced by f , and let  f ' be a flow in Gf . Then, the function  f ↑ f ' defined above is a flow in G with value | f ↑ f ' | = | f | + | f | + | f ' |.

Proof   We first verify that f ' obeys the capacity constraint for each edge in and flow conservation at each vertex in V - {, t}.

For the capacity constraint, first observe that if (u, v) ∈ E, then cf (v, u) = f (u, v). Therefore, we have f ' (vu) ≤ cf (vu) = (uv), and hence

f ↑ f ' ) (uv ) =  (uv) + f ' (uv) - f ' (v, u)

        ≥  f (u, v) + f ' (u, v) - f (u, v)

=  f ' (u, v)

       ≥  0 .

In addition,

(f ↑ f ') (u, v)

    = f (u, v) + f ' (u, v) - f ' (v, u)

    ≤ f (u, v) + f ' (u, v)

    ≤ f (u, v) + cf (u, v)

    = f (u, v) + c (u, v) - f (u, v)

    = c (u, v)

For flow conservation, because both and f ' obey flow conservation, we have that for all ∈ V - {s, t},

vVf ↑ f ' ) (u, v) = ∑vV ( f (u, v) + f ' (u, v) - f ' (v, u))

          = ∑vV f (u, v) + ∑v f ' (u, v) - ∑vV f ' (v, u)

          = ∑vV f (v, u) + ∑vV f ' (v, u) - ∑vV f ' (u, v)

          = ∑vVf (v, u) + f ' (v, u) - f ' (u, v) )

          = ∑vVf ↑ f ' ) (v, u) ,

where the third line follows from the second line by flow conservation.

Finally, = { v : (s, v) ∈ E} to be the set of vertices with edges from s, and V2 = {v : (v, s) ∈ E} to be the set of vertices to s. We have V1  ∪ V2 ⊆ V and, because we disallow antiparallel edges, V1 ∩ V2 = ∅. We now compute

| f ↑ f ' | = ∑v( f ↑ f ' ) (s, v) -  ∑v( f ↑ f ' ) (v, s)

    = ∑vV1 ( f ↑ f ' ) (s, v) - ∑vV2 ( f ↑ f ' ) (v, s) ,

where the second line follows because ( f ↑ f ' ) (w, x) is 0 if (w, x) ∉ E. We now apply the definition of f ↑ f ' to the equation above, and then reorder and group terms to abtain

f ↑ f ' |

  = ∑vV1 ( f (s, v) + f ' (s, v) - f ' (v, s)) - ∑vV2 ( f (v, s) + f ' (v, s) - f ' (s, v))

     = ∑vVf (sv) + ∑vV(sv) - ∑vV(v, s)

       - ∑vVf (vs) - ∑vV(vs) + ∑vV' (sv)

  = ∑vVf (sv) - ∑vVf (vs)

    + ∑vV(sv) + ∑vV' (sv) - ∑vV(vs) - ∑vV(vs)

  = ∑vVf (sv) - ∑vVf (vs) + ∑vV1∪V(sv) - ∑vV1∪V(vs) .

  = ∑vV f (sv) - ∑vV f (vs) + ∑v(sv) - ∑v(vs)

  = | f | + | f ' | .

Notions of Flow Networks and Flows的更多相关文章

  1. Openvswitch手册(9): Flow

    这一节我们将flow table flow table主要由ovs-ofctl命令操作 ovs-ofctl可以走和openflow controller一样的协议: ssl:ip[:port]: Th ...

  2. Spring Web Flow 入门demo(三)嵌套流程与业务结合 附源代码

    上篇博客我们说Spring web Flow与业务结合的方式主要有三种,以下我们主要介绍一下第三种的应用方式 3,运行到<action-state> 元素 SpringWeb Flow 中 ...

  3. 网络流 HDU 3549 Flow Problem

    网络流 HDU 3549 Flow Problem 题目:pid=3549">http://acm.hdu.edu.cn/showproblem.php?pid=3549 用增广路算法 ...

  4. flow

    Flow vs Stream https://wikidiff.com/flow/stream As nouns the difference between flow and stream is t ...

  5. [另开新坑] 算导v3 #26 最大流 翻译

    26 最大流 就像我们可以对一个路网构建一个有向图求最短路一样,我们也可以将一个有向图看成是一个"流量网络(flow network)",用它来回答关于流的问题. Just as ...

  6. 基于Open vSwitch的OpenFlow实践

    Open vSwitch(下面简称为 OVS)是由 Nicira Networks 主导的,运行在虚拟化平台(例如 KVM,Xen)上的虚拟交换机.在虚拟化平台上,OVS 可以为动态变化的端点提供 2 ...

  7. Open vSwitch FAQ (一)

    Basic Configuration Q: How do I configure a port as an access port? A: Add "tag=VLAN" to y ...

  8. SDN学习

    SDN & OpenFlow & Open vSwitch SDN SDN(软件定义网络)是一个概念.是一个思想.一个框架.是一种网络设计理念,它有三个特征 控制平面与转发平面分离 控 ...

  9. openvswith Frequently Asked Questions

    Open vSwitch <http://openvswitch.org> 参考地址:http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=ope ...

随机推荐

  1. poj 1458 Common Subsequence

    Common Subsequence Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 46387   Accepted: 19 ...

  2. [转]Nginx+ThinkPHP不支持PathInfo的解决办法

    FROM : http://www.4wei.cn/archives/1001174 应集团要求,公司的服务器全收到集团机房统一管理了,失去了服务器的管理配置权限. 杯具就此开始. 首先要解决文件大小 ...

  3. 【转】Python Twisted介绍

    Python Twisted介绍 作者:Jessica McKellar 原文链接 Twisted是用Python实现的基于事件驱动的网络引擎框架.Twisted诞生于2000年初,在当时的网络游戏开 ...

  4. matlab figure 窗口最大化

    http://blog.163.com/yinhexiwen@126/blog/static/6404826620122942057214/ % figure 窗口最大化,坐标轴也随着窗口变大而相应变 ...

  5. Ubuntu 16.04 LTS安装好需要设置的15件事(喜欢新版本)

    看到这篇文章说明你已经从老版本升级到 Ubuntu 16.04 或进行了全新安装,在安装好 Ubuntu 16.04 LTS 之后建议大家先做如下 15 件事.无论你是刚加入 Ubuntu 行列的新用 ...

  6. Java第一次实验

    北京电子科技学院(BESTI) 实验报告   课程: java实验    班级:1352     姓名:吕松鸿     学号:20135229  成绩: 指导教师: 娄嘉鹏    实验日期及时间:20 ...

  7. iOS开发UI篇—popoverController简单介绍(ipad)

    一.简单介绍 1.什么是UIPopoverController 是iPad开发中常见的一种控制器(在iPhone上不允许使用) 跟其他控制器不一样的是,它直接继承自NSObject,并非继承自UIVi ...

  8. Jenkins入门系列之——00答疑解惑

    写在最前的总结:Jenkins其实就是一个工具,这个工具的作用就是调用各种其他的工具来达成你的目的.比如你要获取Subversion上最新的源代码,Jenkins会去调用SVNKIT(插件的核心Jar ...

  9. 2.SQLAlchemy文档-SQLAlchemy ORM(中文版)

    接下来,我们将会对对象关系映射器进行全面的介绍和描述.如果你想用它为你的应用程序构建更高层次的SQL操作模式,以及为你的Python对象提供自动化的持久性功能,那么首先进行下列教程的学习吧. 首先请看 ...

  10. PRML读书会第一章 Introduction(机器学习基本概念、学习理论、模型选择、维灾等)

    主讲人 常象宇 大家好,我是likrain,本来我和网神说的是我可以作为机动,大家不想讲哪里我可以试试,结果大家不想讲第一章.估计都是大神觉得第一章比较简单,所以就由我来吧.我的背景是统计与数学,稍懂 ...