Professional Documents
Culture Documents
com
www.jntuworldupdates.org
Partitioning
D
system design
L
o m
R
. c
Decomposition of a complex system into smaller subsystems.
ld
O
Each subsystem can be designed independently speeding up
the design process.
o r
W
u w
Decomposition scheme has to minimize the interconnections
t
U
among the subsystems.
. jn
T
Decomposition is carried out hierarchically until each
w
subsystem is of managable size.
w
N
w
J
Module 1 Module 2 Module n Interface
www.specworld.in 1 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Circuit Partitioning
D
• Objective: Partition a circuit into parts such that every component is
L
within a prescribed range and the # of connections among the compo-
nents is minimized.
o m
R
– More constraints are possible for some applications.
. c
ld
O
• Cutset? Cut size? Size of a component?
o r
W
1 1
2
5
t u8 w 2
5
U
7 7
3
6
. jn 3
6
T
w
4
w
Cut size = 4
4
N
1 1
w 5 5
J
2 2
7 8 7 8
3 6 3 6
Cut size = 2
4 graph representation 4
www.specworld.in 2 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• k-way partitioning: Given a graph G(V, E), where each vertex v ∈ V
L
has a size s(v) and each edge e ∈ E has a weight w(e), the problem is
o m
to divide the set V into k disjoint subsets V1 , V2 , . . ., Vk , such that an
R
.c
objective function is optimized, subject to certain constraints.
ld
O
• Bounded
P
( v∈Vi s(v) ≤ Bi).
o r
size constraint: The size of the i-th subset is bounded by Bi
W
– Is the partition balanced?
t u w
U
jn
P
• Min-cut cost between two subsets: Minimize ∀e=(u,v)∧p(u)6=p(v) w(e),
.
where p(u) is the partition # of node u.
T
w
• The 2-way, balanced partitioning problem is NP-complete, even in its
w
N
simple form with identical vertex sizes and unit edge weights.
w
www.specworld.in 3
J 3
www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Kernighan-Lin Algorithm
D
• Kernighan and Lin, “An efficient heuristic procedure for partitioning
L
m
graphs,” The Bell System Technical Journal, vol. 49, no. 2, Feb. 1970.
R
c
• An iterative, 2-way, balanced partitioning (bi-sectioning) heuristic.
.
ld
O
• Till the cut size keeps decreasing
o r
– Vertex pairs which give the largest decrease or the smallest increase
W
in cut size are exchanged.
t u w
– These vertices are then locked (and thus are prohibited from partic-
U
jn
ipating in any further exchanges).
.
T
w
– This process continues until all the vertices are locked.
w
N
w
www.specworld.in 4
J 4
www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• Each edge has a unit weight.
L
a e a e a
o m e
R
b f b f
. c b c
ld
O
c g c d f d
or
W
d h g h g h
Step #
tu
Vertex pairw Cost reduction Cut cost
U
0
1
. j n -
{d, g}
0
3
5
2
T
w
2
w {c, f} 1 1
N
3 {b, h} -2 3
w 4 {a, e} -2 5
J
• Questions: How to compute cost reduction? What pairs to be swapped?
– Consider the change of internal & external connections.
www.specworld.in 5 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Properties
D
• Two sets A and B such that |A| P = n = |B| and A ∩ B = ∅.
• External cost of a ∈ A: Ea =P v∈B cav .
L
• Internal cost of a ∈ A: Ia = v∈A cav .
o m
R
• D-value of a vertex a: Da = Ea − Ia (cost reduction for moving a).
. c
ld
• Cost reduction (gain) for swapping a and b: gab = Da + Db − 2cab .
O
•
o r
If a ∈ A and b ∈ B are interchanged, then the new D-values, D0 , are given
W
by
u w
Dx0 = Dx + 2cxa − 2cxb, ∀x ∈ A − {a}
t
U
jn
Dy0 = Dy + 2cyb − 2cya , ∀y ∈ B − {b}.
T
A
w w A
a
B
N
B
a cxa x cxb b before after
w swap swap C
J
b
A B
b −cxa +cxa +2cxa
cxb x cxa a
Gain a B: D a− c ab
Gain b
+cxb −cxb −2cxb
A : D b− c ab
www.specworld.in 6 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
a b c d e f a 3
c d
b 2
L
a 0 1 2 3 2 4
a d
b 1 0 1 4
c 2 1 0 3
2
2
1
1
1
b
o m e
R
d 3 4 3 0 4 3
. c
2 4
ld
e 2 2 2 4 0 2
O
c f
e f 4 1 1 3 2 0
or
f
costs associated with a
W
w
Initial cut cost = (3+2+4)+(4+2+1)+(3+2+1) = 22
tu
U
j. n
• Iteration 1:
Ia = 1 + 2 = 3; Ea = 3 + 2 + 4 = 9; Da = Ea − Ia = 9 − 3 = 6
T
Ib = 1 + 1 = 2;
w
Ic = 2 + 1 = 3; w Eb = 4 + 2 + 1 = 7;
Ec = 3 + 2 + 1 = 6;
Db = Eb − Ib = 7 − 2 = 5
Dc = Ec − Ic = 6 − 3 = 3
N
Id = 4 + 3 = 7; Ed = 3 + 4 + 3 = 10; Dd = Ed − Id = 10 − 7 = 3
w
J
Ie = 4 + 2 = 6; Ee = 2 + 2 + 2 = 6; De = Ee − Ie = 6 − 6 = 0
If = 3 + 2 = 5; Ef = 4 + 1 + 1 = 6; Df = Ef − If = 6 − 5 = 1
www.specworld.in 7 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• Iteration 1:
L
Ia = 1 + 2 = 3;
Ib = 1 + 1 = 2;
Ea = 3 + 2 + 4 = 9;
Eb = 4 + 2 + 1 = 7;
o m
Da = Ea − Ia = 9 − 3 = 6
Db = Eb − Ib = 7 − 2 = 5
R
Ic = 2 + 1 = 3;
Id = 4 + 3 = 7;
Ec = 3 + 2 + 1 = 6;
Ed = 3 + 4 + 3 = 10;
. c
Dc = Ec − Ic = 6 − 3 = 3
Dd = Ed − Id = 10 − 7 = 3
ld
O
Ie = 4 + 2 = 6; Ee = 2 + 2 + 2 = 6; De = Ee − Ie = 6 − 6 = 0
If = 3 + 2 = 5; Ef = 4 + 1 + 1 = 6;
o r Df = Ef − If = 6 − 5 = 1
W
• gxy = Dx + Dy − 2cxy .
gad =
t u w
Da + Dd − 2cad = 6 + 3 − 2 × 3 = 3
U
gae = 6+0−2×2=2
gaf
. =
jn
6 + 1 − 2 × 4 = −1
T
5+3−2×4=0
w
gbd =
gbe = 5+0−2×2=1
w
N
gbf = 5 + 1 − 2 × 1 = 4 (maximum)
w gcd = 3+3−2×3=0
J
gce = 3 + 0 − 2 × 2 = −1
gcf = 3+1−2×1=2
www.specworld.in 8 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
a d f b
L
b e a d
o m
R
c f c e
. c
ld
O
r
• Dx0 = Dx + 2cxp − 2cxq , ∀x ∈ A − {p} (swap p and q, p ∈ A, q ∈ B)
o
W
Da0
Dc0
=
=
t u w
Da + 2cab − 2caf = 6 + 2 × 1 − 2 × 4 = 0
Dc + 2ccb − 2ccf = 3 + 2 × 1 − 2 × 1 = 3
U
Dd0
De0
=
. jn
Dd + 2cdf − 2cdb = 3 + 2 × 3 − 2 × 4 = 1
T
= De + 2cef − 2ceb = 0 + 2 × 2 − 2 × 2 = 0
• gxy = Dx0 +
w Dy0 − w
2cxy .
N
gad
w = Da0 + Dd0 − 2cad = 0 + 1 − 2 × 3 = −5
J
gae = Da0 + De0 − 2cae = 0 + 0 − 2 × 2 = −4
gcd = Dc0 + Dd0 − 2ccd = 3 + 1 − 2 × 3 = −2
gce = Dc0 + De0 − 2cce = 3 + 0 − 2 × 2 = −1 (maximum)
• Swap c and e! (gˆ2 = −1)
9
www.specworld.in 9 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
f b f b
L
ocm
R
e
a d
.c
ld
O
c e
o r c e
W
t u
• Dx00 = Dx0 + 2cxp − 2cxq , ∀x ∈ A − {p} w
U
jn
Da00 = Da0 + 2cac − 2cae = 0 + 2 × 2 − 2 × 2 = 0
.
T
w w
Dd00 = Dd0 + 2cde − 2cdc = 1 + 2 × 4 − 2 × 3 = 3
N
w
• gxy = Dx00 + Dy00 − 2cxy .
J
gad = Da00 + Dd00 − 2cad = 0 + 3 − 2 × 3 = −3(gˆ3 = −3)
10
www.specworld.in 10 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
P
L
o m
R
.c
ld
O
o r
W
t u w
U
. jn
T
w w
N
w
www.specworld.in 11
J www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
a b c d e f f 1
b
L
a 0 1 2 3
b 1 0 1 4
2
2
4
1 4
3
o m
R
c 2 1 0 3 2 1 a
2
. c d
ld
d 3 4 3 0 4 3 1
O
e 2 2 2 4
f 4 1 1 3
0
2
2
0
o r c e
W
u w
Initial cut cost = (1+3+2)+(1+3+2)+(1+3+2) = 18 (22−4)
t
U
. jn
• Iteration 2: Repeat what we did at Iteration 1 (Initial cost= 22−4 = 18).
T
w
• Summary: gˆ1 = gce = −1, gˆ2 = gab = −3, gˆ3 = gf d = 4.
w
N
w
• Largest partial sum = max ki=1 ĝi = 0 (k = 3) ⇒ Stop!
P
www.specworld.in 12
J 11
www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Algorithm: Kernighan-Lin(G)
Input: G = (V, E), |V | = 2n.
D
Output: Balanced bi-partition A and B with ‘‘small’’ cut cost.
L
1 begin
o m
R
c
2 Bipartition G into A and B such that |VA| = |VB |, VA ∩ VB = ∅,
.
ld
and VA ∪ VB = V .
O
3 repeat
4 Compute Dv , ∀v ∈ V .
o r
W
5 for i = 1 to n do
6
t u w
Find a pair of unlocked vertices vai ∈ VA and vbi ∈ VB whose
U
jn
exchange makes the largest decrease or smallest increase in
cut cost;
.
T
7
w w
Mark vai and vbi as locked, store the gain ĝi, and compute
N
the new Dv , for all unlocked v ∈ V ;
w
Pk
8 Find k, such that Gk = i=1 ĝi is maximized;
J
9 if Gk > 0 then
10 Move va1 , . . . , vak from VA to VB and vb1, . . . , vbk from VB to VA ;
11 Unlock v, ∀v ∈ V .
12 until Gk ≤ 0;
13 end
12
www.specworld.in 13 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Time Complexity
D
• Line 4: Initial computation of D: O(n2 )
L
• Line 5: The for-loop: O(n)
o m
R
• The body of the loop: O(n2 ).
.c
ld
O
r
– Lines 6–7: Step i takes (n − i + 1)2 time.
W
• Lines 4–11: Each pass of the repeat loop: O(n3 ).
t u w
• Suppose the repeat loop terminates after r passes.
U
. jn
• The total running time: O(rn3 ).
T
w w
N
w
www.specworld.in 14
J 13
www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• Unequal sized subsets (assume n1 < n2 )
L
1. Partition: |A| = n1 and |B| = n2 .
o m
R
2. Add n2 − n1 dummy vertices to set A.
connections to the original graph.
c
Dummy vertices have no
.
ld
O
3. Apply the Kernighan-Lin algorithm.
4. Remove all dummy vertices.
o r
W
• Unequal sized “vertices”
t u w
U
jn
1. Assume that the smallest “vertex” has unit size.
.
2. Replace each vertex of size s with s vertices which are fully connected
T
w
with edges of infinite weight.
w
N
3. Apply the Kernighan-Lin algorithm.
w
J
• k-way partition
1. Partition the graph into k equal-sized sets.
2. Apply the Kernighan-Lin algorithm for each pair of subsets.
3. Time complexity? Can be reduced by recursive bi-partition.
14
www.specworld.in 15 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• Sort the D-values in a non-increasing order:
L
Da1 ≥ Da2 ≥ . . . ≥ Dan
Db1 ≥ Db2 ≥ . . . ≥ Dbn
o m
R
• Start with a1 , compute ga1 ,bi , ∀bi
.c
ld
O
Start with a2 , compute ga2 ,bi , ∀bi
...
o r
W
t u w
whenever Dai + Dbj ≤ Maximum gain found so far (Quit!).
U
• Partition A = {a, b, c}: Da = 6; Db = 5; Dc = 3;
. jn
Partition B = {d, e, f }: Dd = 3; Df = 1; De = 0;
T
Compute g’s
w
gad = 3 → gaf = −1 → gae = 2
w
N
gbd = 0 → gbf = 4 → gbe = 1
w
gcd = 0 → No need to compute gcf (Quit!)
J
since Dc + Df ≤ gbf = 4.
• Note that the overall time complexity remains O(rn3 ).
15
www.specworld.in 16 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• The K-L heuristic handles only unit vertex weights.
L
m
– Vertex weights might represent block sizes, different from blocks to
R
blocks.
.c
ld
– Reducing a vertex with weight w(v) into a clique with w(v) vertices
O
tially.
o r
and edges with a high cost increases the size of the graph substan-
W
u w
• The K-L heuristic handles only exact bisections.
U
jn
– Need dummy vertices to handle the unbalanced problem.
T
w
• The K-L heuristic cannot handle hypergraphs.
w
N
– Need to handle multi-terminal nets directly.
w
J
• The time complexity of a pass is high, O(n3 ).
16
www.specworld.in 17 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• A hypergraph H = (N, L) consists of a set N of vertices and a set L of
L
vertices with |Ni| ≥ 2.
o m
hyperedges, where each hyperedge corresponds to a subset Ni of distinct
R
b d
. c
ld
O
a
or
f
W
c e
tu w hyperedge
• Schweikert and Kernighan, “A proper model for the partitioning of elec-
U
. j n
trical circuits,” 9th Design Automation Workshop, 1972.
• For multi-terminal nets, net cut is a more accurate measurement for cut
T
w
cost (i.e., deal with hyperedges).
w
N
– {A, B, E}, {C, D, F } is a good partition.
w
J
– Should not assign the same weight for all edges.
17
www.specworld.in 18 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
net 1
D
A B C D A B D
C
net 2 net 3 net 4 net 5
L
E F E F
o m
R
cost = 1
.
cost = 4?
c
ld
O
o r
W
t u w
U
. jn
T
w w
N
w
www.specworld.in 19
J www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Net-Cut Model
D
• Let n(i) = # of cells associated with Net i.
L
• Edge weight wxy = 2
n(i)
for an edge connecting cells x and y.
o m
R
net 1
. c cost = 2
ld
1/2
O
o r
D
W
A B C A B D
C
net 2 net 3
t u
net 4
w net 5 1 1
1/2
1 1
U
E
. jn F E
cost = 2
F
T
w w
• Easy modification of the K-L heuristic.
N
w
www.specworld.in 20
J 18
www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
A B
Dx : gain in moving x to B
D
x y
Dy : gain in moving y to A
L
o m
R
.
gxy = D x + D y− Correction(x, y)
c
ld
O
o r
W
t u w
U
. jn
T
w w
N
w
www.specworld.in 21
J www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• Min-cut balanced partitioning: Yang and Wong, ICCAD-94.
– Based on max-flow min-cut theorem.
L
o m
R
P1
. c
ld
O
o r
W
P2
t u w P3
U
. jn
• Gate replication for partitioning: Yang and Wong, ICCAD-95.
T
w
• Performance-driven multiple-chip partitioning: Yang and Wong, FPGA’94,
w
N
ED&TC-95.
w
J
• Multi-way partitioning with area and pin constraints: Liu and Wong,
ISPD-97.
• Multi-resource partitioning: Liu, Zhu, and Wong, FPGA-98.
• Partitioning for time-multiplexed FPGAs: Liu and Wong, ICCAD-98.
19
www.specworld.in 22 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Flow Networks
LD
• A flow network G = (V, E) is a directed graph in which
o m
R
each edge (u, v) ∈ E has a capacity c(u, v) > 0.
.c
ld
O
r
• There is exactly one node with no incoming (outgoing) edges,
o
W
called the source s (sink t).
t u w
U
jn
• A flow f : V × V → R satisfies
T
w
– Capacity constraint: f (u, v) ≤ c(u, v), ∀u, v ∈ V .
w
N
– Skew symmetry: f (u, v) = −f (v, u), ∀u, v ∈ V .
w
J
– Flow conservation: v∈V f (u, v) = 0, ∀u ∈ V − {s, t}.
P
20
www.specworld.in 23 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
source s and sink t, find a flow of maximum value from s
to t.
L
X X
o m
R
v1 12/12
v2
19/20
. c
ld
16/16 flow/capacity
O
or
s 4/10 0/4 7/7 t
0/9 max flow |f| = 16 + 7 = 23
W
7/13
v3
11/14
v4
tu w
4/4
U
. j n
T
w w
N
w
www.specworld.in 24
J www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Max-Flow Min-Cut
D
• A cut (X, X̄) of flow network G = (V, E) is a partition of V
L
into X and X̄ = V − X such that s ∈ X and t ∈ X̄.
o m
R
P
– Capacity of a cut: cap(X, X̄) = u∈X,v∈X̄ c(u, v). (Count
. c
ld
O
only forward edges!)
o r
W
• Max-flow min-cut theorem Ford & Fulkerson, 1956.
t u w
U
– f is a max-flow ⇐⇒ |f | = cap(X, X̄) for some min-cut
(X, X̄).
. jn
T
X
w w X
N
v1 12/12
v2
16/16
w 19/20 flow/capacity
J
s 4/10 0/4 7/7 t
0/9 max flow |f| = 16 + 7 = 23
7/13
cap(X, X) = 12 + 7 + 4 = 23
v3 v4 4/4
11/14
21
www.specworld.in 25 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
• An augmenting path p is a simple path from s to t with the
L
following properties:
o m
R
– For every edge (u, v) ∈ E on p in the forward direction (a
. c
ld
O
forward edge), we have f (u, v) < c(u, v).
– For every edge (u, v) ∈ E on p in the reverse direction (a
o r
W
backward edge), we have f (u, v) > 0.
t u w
U
• f is a max-flow ⇐⇒ no more augmenting path.
. jn
T
12 12/12 v1 12/12
w
v1 v2 v1 v2 v2
16 20 12/16 12/20 16/16 16/20
w
N
s 10 4 t s 10 4 t s 4/10 4 t
9 7 9 7 9 4/7
13
w
13 4 13 4 4
v3 v4 v3 v4 v3 v4
14 14 4/14
J
v1 12/12 v1 12/12 v1 12/12
v2 v2 v2
16/16 19/20 16/16 19/20 16/16 19/20
22
www.specworld.in 26 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
polynomial-time algorithm by Edmonds & Karp in 1969:
O(|E|2|V |); Goldberg & Tarjan in 1985: O(|E||V | lg(|V |2/|E|)),
L
etc.
o m
R
.c
ld
O
o r
W
t u w
U
. jn
T
w w
N
w
www.specworld.in 27
J www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
LD
• Why was the technique not wisely used in partitioning?
o m
R
– Works on graphs, not hypergraphs.
.c
ld
O
r
– Results in unbalanced partitions; repeated min-cut for bal-
o
W
t u w
ance: |V | max-flows, time-consuming!
U
• Yang & Wong, ICCAD-94.
. jn
T
w
– Exact net modeling by flow network.
w
N
w
– Optimal algorithm for min-net-cut bipartition (unbalanced).
J
– Efficient implementation for repeated min-net-cut: same
asymptotic time as one max-flow computation.
23
www.specworld.in 28 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Min-Net-Cut Bipartition
LD
• Net modeling by flow network:
o m
R
OO
c
X’ X’
X X v1 OO
ld . v1
O
OO
o r v
OO
n1
1
n2 OO
W
v2 v2
t u w OO
U
. jn
• A min-net-cut (X, X̄) in N ⇐⇒ A min-capacity-cut (X 0, X̄ 0)
T
in N 0.
w w
N
w
• Size of flow network: |V 0| ≤ 3|V |, |E 0| ≤ 2|E| + 3|V |.
J
• Time complexity: O(min-net-cut-size) ×|E| = O(|V ||E|).
24
www.specworld.in 29 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
OO
OO
X’ OO
X’
X X g c OO g c1 c2
D
OO
OO OO 1
r t r b1 b2 OO t
b OO 1
L
m
s s d1 d2 OO
OO 1
OO
R
d
.
OO
c OO
ld
OO
O
N N’
o r
W
t u w
U
. jn
T
w w
N
w
www.specworld.in 30
J www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
(FBB)
L
o m
R
• Allow component weights to deviate from (1 − )W/2 to (1 +
. c
ld
)W/2.
O
a
b
o r b
W
f h
w
f h
s e g t s e g
u
t
i
t
l
2 i l
U
jn
(X1, X1) j k
j k
.
(X2, X2)
T
w w
N
b b
a
w f f h
s e
t s e
J
g t
2 i i l
4
j k j k
25
www.specworld.in 31 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
Incremental Flow
LD
• Repeatedly compute max-flow: very time-consuming.
o m
R
c
• No need to compute max-flow from scratch in each iteration.
.
ld
O
• Retain the flow function computed in the previous iteration.
o r
• Find additional flow in each iteration. Still correct.
W
u w
• FBB time complexity: O(|V ||E|), same as one max-flow.
t
U
. jn
– At most 2|V | augmenting path computations.
T
w
∗ At each augmenting path computation, either an aug-
w
N
w
menting path is found, or a new cut is found, and at
J
least 1 node is collapsed to s or t.
∗ At most |f | ≤ |V | augmenting paths found, since bridg-
ing edges have unit capacity.
26
www.specworld.in 32 www.smartzworld.com
www.jntuworld.com
www.jntuworld.com
www.jntuworldupdates.org
D
b
b
f h
f
L
s e
m
g t s e
t
o
2 i l
2 i
R
j k (X2, X2)
. c j k
4
ld
O
r
(X3, X3)
W
t u w
U
. jn
T
w w
N
w
www.specworld.in 33
J www.smartzworld.com
www.jntuworld.com