Вы находитесь на странице: 1из 6

E),

V , E
G = (V,
. () (i, j) E
c(i, j) (capacity). : s , t .
G .
f : E R,
f (i, j) c(i, j);
1. (i, j) E,
P
P

2. i V \ {s, t},
f (i, j)
f (j, i) = 0.
j:(i,j)E
j:(j,i)E
P
P
f
f (s, i) =
f (i, t).
i:(s,i)E

i:(i,t)E

f , .

st- V S T (S T = V,
S T = ), s S, t T .
P
st- , S T :
c(i, j).
(i,j)E
jS, jT

st- (S, T ),
.
- ,
st-.
, st- . -
.
, ,
: , S ,
(f (i, j) < c(i, j)). , .
. -, (push-relabel)
: (. .) [1].
, ,

i
i (0)

i (1)

ij (0,1)

ij (1,0)

j (0)

j (1)

j
. 1: , xi , xj . , xi = 1, xj = 0.
i (1) + j (0) + ij (1, 0).
: - [2]1 , IBFS [3]2 .
IBFS O(|V|2|E|) ( ,
). - IBFS ,
, , .

-
G = (V, E). i V xi {0, 1}. E (
E : {0, 1}|V| R ):
X
X
E(x) =
i (xi ) +
ij (xi , xj ) + 0 .
(1)
iV

{i,j}E

i (xi ) , ij (xi , xj ) , 0 . ,
, , -.
E x = {xi }iV ,
E(x) . ,
0 , ,
.
(1) NP-.
, V -
, (i, j) V i < j.


(1), :
: i V i (0) 0, i (1) 0;
0 :
{i, j}E ij (0, 0) = ij (1, 1) = 0, ; ij (0, 1) 0, ij (1, 0) 0.
1
2

http://pub.ist.ac.at/~vnk/software/maxflow-v3.02.src.tar.gz
http://www.cs.tau.ac.il/~sagihed/ibfs/

(1) :
X
X
E(x) =
(xi i (1) + (1 xi )i (0)) +
(xi (1 xj )ij (1, 0) + xj (1 xi )ij (0, 1)) + 0 .
iV

(2)

{i,j}E

E),
(2) G = (V,
x:
V = V {s, t}, s t .
E : {i, j} E
(i, j) (j, i) ( ), i V
(s, i) (i, t) ( ).
, S 0, T 1.
: c(s, i) = i (1), c(i, t) = i (0), i V.
: c(i, j) = ij (0, 1), c(j, i) = ij (1, 0), (i, j) E, , , i < j.
st- V S T . :
i S xi = 0, i T xi = 1. (2)
x. , (2) G.
, 2- , . 1.

,
( (2)).
E(x) .
(1). E(x),
, , . :
: i (0) := i (0) , i (1) := i (1) ,
0 := 0 + . i V, R.
: ij (p, 0) := ij (p, 0) , ij (p, 1) := ij (p, 1) , i (p) :=
i (p) + . ij (0, p) := ij (0, p) , ij (1, p) := ij (1, p) , j (p) := j (p) + .
{i, j} E, R, p {0, 1}.
, E(x) .
- (1)
- (2). , c = min(i (0), i (1))
. , (2).
, .
{i, j} E : ij (0, 0) = a, ij (1, 1) = b, ij (0, 1) =
c, ij (1, 0) = d. :
1. ij (0, 0) := ij (0, 0) a, ij (0, 1) := ij (0, 1) a, i (0) := i (0) + a;
2. ij (0, 1) := ij (0, 1) c + a, ij (1, 1) := ij (1, 1) c + a, j (1) := j (1) + c a;
3

3. ij (1, 1) := ij (1, 1) b + c a, ij (1, 0) := ij (1, 1) b + c a, i (1) := j (1) + b c + a;


, {i, j}: ij (0, 0) = ij (1, 1) = ij (0, 1) = 0, ij (1, 0) = d + c a b.
,
(2), d + c a b 0.
ij (0, 0) + ij (1, 1) ij (0, 1) + ij (1, 0)

(3)

- (1).
.

- K
G = (V, E). i V yi {1, . . . , K} = K. EM
( EM : K|V| R ):
X
X
EM (y) =
i (yi ) +
ij (yi , yj ) + 0 .
(4)
iV

{i,j}E

i (yi ) , ij (yi , yj ) , 0 . ,
, , -.
EM y = {yi }iV ,
EM (y) .
(4) NP- K = 3 : ij (yi , yj ) = cij [yi 6= yj ], cij 0 [4].
[4] (4): -
(-expansion) - (-swap).

-
- (4) y, .
(1). y ,
( ).
Tsukuba . (2).
-. y 0 K. K-
y . E(x) (1) EM (y) (4).
E(x) E(y) : G = (V, E).
xi = 0 yi = yi0 ( yi
); xi = 1 yi = .
4

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

. 2: - . (a) ; (b)-(h) .
: i (0) = i (yi0 ), i (1) = i ().
: ij (0, 0) = ij (yi0 , yj0), ij (1, 1) = ij (, ), ij (0, 1) = ij (yi0, ),
ij (1, 0) = ij (, yj0).

(3). K- :
ij (, ) + ij (, ) ij (, ) + ij (, ),

(5)

, , K. , ij (, ) = 0 ij (, ) = ij (, ).
(5) , ij .
- - 3.
(5) .
K- [5]:
ij (min(yi1 , yi2), min(yj1 , yj2)) + ij (max(yi1, yi2), max(yj1, yj2)) ij (yi1 , yj1) + ij (yi2, yj2 ),
yi1 , yi2, yj1 , yj2 .
K 3 .

(. [5]).


G = (V, C). C 2V ( ).
i V xi {0, 1}.
E ( E : {0, 1}|V| R ):
X
X
E(x) =
i (xi ) +
(xC ).
(6)
iV

CC

http://vision.csd.uwo.ca/code/gco-v3.0.zip

i (xi ) , C (xC ) , xC
x, C.
(6) .
(6) - .
:
!
Y
X

xi = min z(|C| 1)
zxi .
iC

z{0,1}

iC

, ,
z , x z . , (x z) x.
- [6].


[1] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction To Algorithms, 3rd ed.
MIT Press, 2009.
[2] Y. Boykov and V. Kolmogorov, An experimental comparison of Min-Cut/Max-Flow algorithms
for energy minimization in vision, IEEE Transactions on Pattern Analysis and Machine
Intelligence (PAMI), vol. 26, no. 9, pp. 11241137, 2004.
[3] A. V. Goldberg, S. Hed, H. Kaplan, R. E. Tarjan, and R. F. Werneck, Maximum ows by
incremental breadth-rst search, in 19th European Symposium on Algorithms (ESA 2011), 2011.
[4] Y. Boykov, O. Veksler, and R. Zabih, Fast approximate energy minimization via graph cuts,
IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), vol. 23, no. 11, pp.
12221239, 2001.
[5] J. Darbon, Global optimization for rst order Markov random elds with submodular priors,
Discrete Applied Mathematics, vol. 157, no. 16, pp. 34123423, 2009.
[6] H. Ishikawa, Transformation of general binary MRF minimization to the rst order case, IEEE
Transactions on Pattern Analysis and Machine Intelligence (PAMI), vol. 33, no. 6, pp. 12341249,
2011.

Вам также может понравиться