Skip to Content
算法技术手册(原书第2 版)
book

算法技术手册(原书第2 版)

by George T.Heineman, Gary Pollice, Stanley Selkow
August 2017
Intermediate to advanced
360 pages
8h 35m
Chinese
China Machine Press
Content preview from 算法技术手册(原书第2 版)
网络流算法
209
网络流算法
任何可行的流
f
经过网络时应满足以下准则。
容量限制
通过一条边的流量
f
(
u
,
v
)
不能为负,且不能超过边的容量
c
(
u
,
v
)
,即
0
f
(
u
,
v
)
c
(
u
,
v
)
。如果网络中不存在边
(
u
,
v
)
,则定义
c
(
u
,
v
)= 0
流量守恒
除了源顶点
s
和汇点
t
外,对于每个顶点
u
V
,必须满足所有入流等于所有出流
一准则,即所有边
(
v
,
u
)
E
(流入
u
)上的流量
f
(
v
,
u
)
必须等于所有边
(
u
,
w
)
E
(从
u
流出)上的流量之和。这确保了在网络中,除了源点和汇点之外,不存在凭空
产生流或者某个流不被消费的情况
反对称性
f
(
v
,
u
)
的数量与从顶点
u
v
的网络流刚好相反。也就是说,
f
(
u
,
v
)
必须等于
f
(
v
,
u
)
在接下来的算法中,我们提到的网络路径指的都是一条没有环的路径,它由不同的顶点
<
v
1
v
2
,
,
v
n
>
所连接的
(
v
i
,
v
j
)
n
1
条边构成。在图
8-2
所示的流网络中,
<
v
3
v
5
,
v
2
,
v
4
>
是可能的一条网络路径。网络路径会忽略边的方向,这对于正确构造增广路径是
有必要的,在接下去的算法中我们将会看到这点。图
8-2
中另一条可能的网络路径是
<
s
,
v
1
,
v
4
,
v
2
,
v
5
,
t
>
8.2 最大流
在一个流网络中,如果给定了边集
E
中所有有向边
e
= (
u
,
v
)
的容量限制
c
(
u
,
v
)
0
,我
们可以计算出顶点
s
t
之间的最大流。也就是说,在每条边都有容量限制的情况下,
从源顶点
s
输出,通过这个网络达到汇点
t
的最大流量是可以计算出来的。从一个可 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

Aurélien Géron
Go语言编程

Go语言编程

威廉·肯尼迪

Publisher Resources

ISBN: 9787111562221