Professional Documents
Culture Documents
Assignment-4 Final - Solutions
Assignment-4 Final - Solutions
4. Consider the graph given below. The initial partition is done as shown in the figure.
How many iterations are needed to complete one pass of the KL algorithm for partitioning the
given graph? ___
Answer: We have 8 nodes in the given graph. In each iteration, we will fix two nodes. ∴ 8/2 = 4
iterations are needed to complete one pass of the KL algorithm for partitioning the given graph.
5. The values of cost function D(1), D(3), D(6), and D(8) defined in the KL algorithm in the graph
given in question 4 are _____, respectively.
a. 1, 0, 0, 1
b. 0, 1, 1, 0
c. 0, 1, 0, -2
d. 1, 0, 0, -2
e. 0, 0, 1, -1
Answer: The definition of the cost function used in the KL algorithm is D(a) = Ec(a) – Enc(a)
Where Ec(a) is the set of a’s incident edges that are cut by the cut line, and
Enc(a) is the set of a’s incident edges that are not cut by the cut line.
D(1) = 1 – 0 = 1
D(3) = 1 – 1 = 0
D(6) = 2 – 2 = 0
D(8) = 0 – 2 = -2
6. The sum of gains Δg(2,5) and Δg(3,7) defined in the KL algorithm in the first iteration of the
KL algorithm for the graph given in question 4 is _____.
Answer: The definition of the gain used in the KL algorithm is Δg(a,b) = D(a) + D(b) – 2c(a,b)
7. Number of times Δg is calculated in the first pass of the KL algorithm for the graph given in
question 4? _______
Answer: In the first iteration (k=1), there are 4 nodes in each partition. So, you need to calculate
Δg between each node in partition A and each node in partition B. ∴ In the first iteration, Δg is
calculated 42 times. In the successive iterations, one node in each partition is fixed.
8. Consider the following graph with the initial partition as shown in the figure. This graph is
provided as input to the FM algorithm.
Node Area
a 3
b 2
c 3
d 1
e 4
f 5
g 2
Perform the FM algorithm on the given graph. The value of gain, Δg(d), defined in the FM
algorithm, is ____.
Where FS(c) is the number of nets connected to c but not connected to any other cells within c’s
partition, i.e., cut nets that connect only to c, and
9. Which of the following is the correct balance criterion for the graph given in question 8?
a. 4 ≤ Area(A) ≤ 13
b. 3 ≤ Area(A) ≤ 12
c. 3 ≤ Area(A) ≤ 13
d. 4 ≤ Area(A) ≤ 12
Where area(V) = sum of areas of all nodes = 20 and areamax(V) = area of largest
node = 5.
3 ≤ area(A) ≤ 13.
10. Choose the base cell(s) for the first iteration of the FM algorithm for the graph given in
question 8.
a. a
b. b
c. c
d. d
e. e
f. f
g. g
Answer: A base cell is a cell c with the greatest cell gain ∆g(c), among all free cells whose move
does not violate the balance criterion.
Node FS TE ∆g
a 0 0 0
b 0 0 0
c 1 0 1
d 1 1 0
e 1 0 1
f 0 2 -2
g 0 1 -1