# Compressing Forwarding Tables for Datacenter Scalability

Save this PDF as:

Size: px
Start display at page:

Download "Compressing Forwarding Tables for Datacenter Scalability"

## Transcription

4 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 4 Definition 2 Prefix Encoding. For a set of elements S, an encoding σ is an injective mapping σ : S B, where B is a set of binary codewords of size B = S. An encoding is called a prefix encoding if no binary codeword in B is a prefix start of any other binary codeword in B. Definition 3 FIB Encoding Scheme. An encoding scheme C A of a FIB Table A is an ordered set of d prefix encodings C A = σ 1,..., σ d. That is, each σ j encodes column j, and is constrained to be a prefix encoding. Definition 4 FIB Encoding Width. Let C A = σ 1,..., σ d be a FIB encoding scheme of the FIB table A. The encoding width lc A of C A is defined as the maximal sum of the lengths of the d codewords representing the d elements in a row of A, i.e. d lc A = max lσ j a i j. 1 i [1,h] Example 2. Let A be the FIB table from Example 1 with h = 7, d = 3, also described in Table I.A. Likewise, let C A = σ 1, σ 2, σ 3 be the FIB encoding scheme of A. Then, as shown in Table I.C, σ 1 Te12/1 = 0, σ 1 Gi11/8 = 10, σ 1 Gi11/24 = 11. As described in Table I.B, lc A = d max i [1,h] lσ ja i j = max 5, 5, 4, 5, 5, 5, 5 = 5. Let s compare this scheme with a fixed-length encoding of each column. Since the number of distinct elements in the d = 3 columns of A are n 1 = 3, n 2 = 5 and n 3 = 2, if I A a fixed-length encoding of A then the elements in the j th column are encoded in log 2 n j bits, and li A = d log 2 n j = = 6. B. Optimal FIB Table Encoding Scheme For each FIB table A, we denote by OP T A the optimal encoding width of A, i.e. the smallest possible encoding width of any encoding scheme of A such that OP T A = min lc A. 2 C A =σ 1,...,σ d Our goal is to find an encoding scheme C A that minimizes the encoding width lc A, and therefore reaches this minimum. A. Optimization Problem III. GENERAL FIB TABLES We first want to rewrite the problem of finding the optimal encoding scheme for any FIB table A as an optimization problem. First, it is well known that the set of codeword lengths in a prefix encoding exists iff it satisfies Kraft s inequality [6]. Property 1 Kraft s inequality. There exists a prefix encoding σ of the elements in a set S with codeword lengths {lσa a S} iff 2 lσa 1. 3 a S Therefore, we can now formally present the problem of finding an optimal FIB table encoding scheme for table A = a 1 1,..., a 1 d,..., ah 1,..., a h d as the following optimization problem. min s.t. P d lσ j a i j P i [1, h] 4a a S j 2 lσja 1 j [1, d] 4b lσ j a 0 j [1, d], a S j 4c lσ j a Z j [1, d], a S j 4d In this optimization problem, we try to minimize the maximal encoding width of a row denoted here by P while having four sets of constraints. The first set 4a represents the limitation on the total width of each row. The second set of constraints 4b requires that each of the encodings σ 1,..., σ d should satisfy Kraft s inequality. The last two sets 4c, 4d illustrate the fact that the codeword length of any element should be a non-negative integer the constraints 4b and 4c together guarantee that if the number of distinct elements in a column is at least two, the codeword lengths are positive. For an optimal solution to this optimization problem, the equality P = OP T A is satisfied. The optimization problem can be also described as being dependent only on the codeword lengths. To do so, we replace for j [1, d], a S j the value of lσ j a by a corresponding variable. In addition, as explained later, it is easy to derive the sets of codewords given their lengths. We also denote by the relaxed FIB encoding problem the problem achieved by omitting the fourth set of constraints 4d. In this relaxed problem, the codeword lengths are not necessarily integers. B. Approximation of the Optimal Encoding We now show how to find for each FIB table A of d columns a solution to the FIB encoding problem that is guaranteed to be within a fixed additive approximation of the optimal encoding width OP T A. More specifically, we find an encoding scheme C A with encoding width lc A that satisfies lc A OP T A + d 1, i.e. its encoding width is larger than the optimal encoding width in bits by at most the number of columns in A minus one. We emphasize that this bound on the additive error of d 1 depends neither on the number of distinct elements n j 2 Wj for j [1, d] in each of the columns, nor on the number of rows h in A. To obtain such an encoding, we consider the relaxed FIB encoding problem defined above, in which the codeword lengths are not necessarily integers. We show that this optimization problem is convex, and thus its solution can be found by one of several known algorithms for such problems. We then build as a solution to the original optimization problem, an encoding with codeword lengths achieved by taking the ceiling of each of the codeword lengths in the solution of the relaxed problem.

5 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 5 We show that these new codeword lengths lead to an encoding that satisfies the additive approximation from above. Theorem 1. Let l σj s j,1,..., l σ j s j,nj for j [1, d] be the codeword lengths of an optimal solution to the relaxed FIB encoding problem. Further, let C A = σ 1,..., σ d be an encoding scheme satisfying lσ j s j,i = l σ j s j,i for all j [1, d], i [1, n j ]. Then we have: i The relaxed FIB encoding problem is convex. ii The encoding width lc A of the encoding scheme C A satisfies lc A OP T A + d 1. 5 Proof: We first examine the convexity of the relaxed problem. Clearly, its simple objective function is convex. We would like to show that each of the inequality constraint functions as a function of the codeword lengths is convex as well. Simply, constraints in the first and the third sets of inequality constraints 4a, 4c are convex due to their linearity. In addition, we would now like to examine the convexity of the second set of constraints 4b representing Kraft s inequality. To do so, we define d functions f 1,..., f d for the constraints on each of the d prefix encodings. The function f j for j [1, d] receives as a parameter the set of codeword lengths of the elements in S j. The function f j lσj s j,1,..., lσ j s j,nj is defined as a S j 2 lσja = n j 2 lσ js j,i. We consider two arbitrary encoding schemes σ 1,..., σ d, ˆσ 1,..., ˆσ d with codeword lengths l σj s j,1,..., l σ j s j,nj, lˆσj s j,1,..., lˆσ j s j,nj for the elements in S j for j [1, d], respectively. We would like to show that f j α σ + β ˆσ α f j σ + β f j ˆσ for all j [1, d] and α, β [0, 1] with α + β = 1. Here, when performing linear operations on the set of codeword lengths, we refer to a new set of codeword lengths, so that each of its codeword lengths is obtained by performing the linear operations on the corresponding length in the original set. Based on the convexity of the function gx = 2 x, we have n j f j α σ + β ˆσ = 2 α l σ j s j,i +β lˆσ j s j,i n j α 2 l σ js j,i + β 2 lˆσ js j,i n j = α 2 l σ js j,i + β n j 2 lˆσ js j,i = α f j σ + β f j ˆσ. 6 Based on these properties, we can finally deduce that the relaxed FIB encoding problem is convex. With this observation, an optimal solution, i.e. a generalized encoding with nonnecessarily integer codeword lengths can be found by using one of the several known polynomial time algorithms for such convex problems e.g. the ellipsoid algorithm [20]. Let us denote by l σj s j,1,..., l σ j s j,nj the codeword lengths of an optimal solution to the relaxed d problem. Let OP T r A = max i [1,h] l σ ja i j be the maximal encoding width of a row in this optimal solution of the relaxed problem. Again, OP T r A is not necessarily integer. Clearly, since the set of constraints in the relaxed problem is a subset of the constraints in the FIB encoding problem, the inequality OP T r A OP T A holds. Further, since OP T A is an integer, we have that OP T r A OP T A, i.e. OP T r A is a lower bound for OP T A. Clearly, since lσ j s j,i = l σ j s j,i l σ j s j,i, all the d constraints representing Kraft s inequality, satisfied by the solution of the relaxed problem, are also satisfied by the set of codeword lengths in C A = σ 1,..., σ d. We now show that the encoding width of the encoding scheme C A is within a guaranteed additive approximation of the optimal encoding width of A, OP T A. Directly from the definition of C A, we can have that lc A = max i [1,h] < max i [1,h] = max i [1,h] d lσ j a i j = max i [1,h] d l σj a i j + 1 d d l σj a i j l σ j a i j + d = OP T r A + d OP T A + d. 7 Finally, since lc A as well as OP T A are both integers, we can deduce from the strong inequality lc A < OP T A + d that lc A OP T A + d 1. C. Upper Bound on the Optimal Encoding We now present a simple upper bound on the optimal encoding of any FIB table with an arbitrary number d of columns. Consider a fixed-length encoding scheme I A that encodes each column j using a fixed-length encoding as seen in Example 2. Then in each column j, it uses codewords of size W j = log 2 n j, since it needs at least n j > 2 Wj 1 codewords to represent the n j different values. As a consequence, the total width of each row in also fixed, and we have li A = d W j = d log 2 n j. 8 The fixed-length encoding yields an upper bound on the optimal encoding width of the FIB table. Property 2. Let A be a FIB table of d columns such that the set of distinct elements in the j th column is S j with S j = n j 2 Wj. Then, OP T A d W j. 9

6 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 6 D. NP-HARDNESS We conclude the section by considering the complexity of finding an optimal encoding scheme of a given FIB table. We show that the above problem is NP-hard for tables with at least seven columns. The proof can be found in the Appendix. Theorem 2. Given a FIB table A with d 7 columns, finding an optimal encoding scheme of A is NP-hard. IV. TWO-COLUMN FIB TABLES In datacenters, a popular class of FIB tables are simple L2 MAC tables that contain two columns. The first describes the Target Port, while the second can be viewed as an aggregation of columns representing a collection of other attributes. Indeed, we see in real-life table traces that these additional attributes are hardly ever used. Thus their aggregation has a relatively small set of possible values. Therefore, from now on, we consider the special case of two-column FIB tables, i.e. FIB tables that satisfy d = 2. We would like to fundamentally study this case to obtain some intuition on the problem. We show that in this case, in order to find its optimal encoding scheme, a FIB table A can be simply represented as a bipartite graph. We also suggest an analysis of the optimal encoding width of such two-column FIB tables. For the sake of simplicity, we assume, unless mentioned otherwise, that the number of distinct elements in each of the d = 2 columns of A is the same, and that it is a power of two, i.e. S 1 = S 2 = n = 2 W. A. The Optimal Encoding Width of a Two-Column FIB Table Directly from Property 2, we can deduce that OP T A 2W. We would like to present an example that shows the tightness of this upper bound by suggesting a two-column FIB table A that satisfies OP T A = 2W. Earlier, we present the simple following bound on the codeword lengths in any prefix encoding. Its simple proof follows directly from basic considerations in information theory. Lemma 3. Let σ be a prefix encoding of the elements of a set S that satisfies S = n = 2 W. Then, the codeword lengths {σa a S} of σ satisfy lσa n W. 10 a S In other words, the average length of a codeword of an element is at least W. We now show the tightness of the bound upper bound on OP T A. Example 3. For W 2 and n = 2 W, let S 1 = {s 1,1,..., s 1,n } and S 2 = {s 2,1,..., s 2,n }. Consider the twocolumn FIB table A = a 1 1, a 1 2,..., a h 1, a h 2 for h = n 2 such that a i n+j 1, a i n+j 2 = s 1,i, s 2,j for i, j [1, n]. Let = σ 1, σ 2 be a FIB encoding scheme of A. Clearly, C A by Lemma 3 i [1, n]lσ 1 s 1,i W and j [1, n]lσ 2 s 1,j W. Then, lc A = max lσ 1 a k 1 + lσ 2 a k 2 k [1,h] lσ 1 a i n+j 1 + lσ 2 a i n+j 2 = lσ 1 s 1,i + lσ 2 s 2,j W + W = 2W. 11 Since this inequality is correct for any C A then OP T A = min CA =σ 1,...,σ d lc A 2W. The next lemma suggests a lower bound on the FIB encoding width of A = a 1 1, a 1 2,..., a h 1, a h 2 for W 2. Lemma 4. Let A be a two-column FIB table with S 1 = S 2 = n = 2 W for W 2. Then, the encoding width of A satisfies W + 2 OP T A. Proof: We have to show that any FIB table encoding scheme C A of A satisfies lc A W +2. Let C A = σ 1, σ 2 be an arbitrary FIB table encoding scheme of A. We consider two options for C A and show that in both of them lc A W + 2. First, if σ 1 is a fixed-length encoding i.e. a S 1 lσ 1 a = W then consider an element b S 2 that satisfies lσ 1 b 2. By Kraft s inequality, there must exist such an element when W 2. Without loss of generality, let a k 1, a k 2 for k [1, h] be a row such that a k 2 = b. Then, lσ 1 a k 1 + lσ 2 a k 2 W + 2. Likewise, if σ 1 is not a fixed-length encoding, again by Kraft s inequality a S 1 lσ 1 a W +1. Let a k 1, a k 2 for k [1, h] be a row such that a k 1 = a for such a. Clearly, for any encoding σ 2, lσ 2 a k 2 1. Then, lσ 1 a k 1 + lσ 2 a k 2 W + 2. Finally, in both cases lc A = max i [1,h] lσ 1a i 1 + lσ 2 a i 2 lσ 1 a k 1 + lσ 2 a k 2 W Since the last inequality holds for any encoding scheme C A, the result follows. The next example demonstrates that the last lower bound OP T A W + 2 is tight for W 2. To show that, we present, for W 2, a two-column FIB table A that satisfies OP T A = W + 2. Example 4. For W 2 and n = 2 W, let again S 1 = {s 1,1,..., s 1,n } and S 2 = {s 2,1,..., s 2,n }. Consider the twocolumn FIB table A = a 1 1, a 1 2,..., a h 1, a h 2 for h = 2n 1 such that a i 1, a i 2 = s 1,1, s 2,i for i [1, n] and a i 1, a i 2 = s 1,i n 1, s 2,n for i [n, 2n 1]. Clearly, S j = h {ai j } for j [1, 2]. To show that OP T A = W + 2, we suggest a FIB table encoding scheme C A = σ 1, σ 2 that satisfies lc A = W + 2. Let σ 1 satisfy lσ 1 s 1,1 = 1 and lσ 1 s 1,i = W + 1 for i [2, n]. Likewise, let σ 2 satisfy lσ 2 s 2,i = W + 1 for i [1, n 1] and lσ 2 s 2,n = 1. Clearly, since n 1 2 W = 2 W 1 2 W < 2 W 2 W = 1, both σ 1 and σ 2 satisfy Kraft s inequality. Then, for i [1, n 1] we have that lσ 1 a i 1+lσ 2 a i 2 = lσ 1 s 1,1 +lσ 2 s 2,i = 1 + W + 1 = W + 2. We can also see that lσ 1 a n 1 +

7 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 7 tools from graph theory. The next theorem relates the existence of an independent set of a specific size in the bipartite graph G A to the value of OP T A. a Fig. 2. A two-column forwarding table with h = 6 entries and n = 2 W = 4 for W = 2 distinct elements in each column with a the table, and b its corresponding bipartite graph. The number of edges in the graph equals the number of distinct entries in the forwarding table. lσ 2 a n 2 = lσ 1 s 1,1 + lσ 2 s 2,n = = 2. Likewise, for i [n + 1, 2n 1], lσ 1 a i 1 + lσ 2 a i 2 = lσ 1 s 1,i n 1 + lσ 2 s 2,n = W = W + 2. We can then have that lc A = max i [1,h] 2 lσ ja i j = W + 2. Finally, OP T A lc A = W + 2 and the lower bound of W + 2 is tight. Finally, we summarize the lower and upper bounds from Lemma 4 and Property 2 in the following theorem. Theorem 5. Let A be a two-column FIB table with S 1 = S 2 = n = 2 W for W 2. Then, the encoding width of A satisfies W + 2 OP T A 2W. Any two-column FIB table A = a 1 1, a 1 2,..., a h 1, a h 2 can be represented by a corresponding bipartite graph G A as follows. The two disjoint sets are the sets of distinct elements in each of the two columns. Thus, if an element appears in both of the two columns, it is represented by two different vertices in each of the two disjoint sets. Edges connect elements in the two sets if they appear at least once on the same row of the FIB table. Formally, we define the graph G A =< L + R, E > such that L = S 1, R = S 2 and E = {x, y i [1, h], a i 1, a i 2 = x, y}. Therefore, duplicated rows have no influence on the construction of the bipartite graph, and the graph does not contain parallel edges. It is also easy to see the independence in the order of the rows of the FIB table. Example 5. Figure 2a presents an example of a two-column forwarding table with h = 6 entries and n = 2 W = 4 for W = 2 distinct elements in both columns. The corresponding bipartite graph appears in Figure 2b. The vertices on the left side of the graph represent the n = 4 distinct elements in the first column, while the vertices on the right side represent the n distinct elements in the second column. The number of edges in the graph equals the number of distinct entries in the forwarding table. Given a FIB encoding scheme C A = σ 1,..., σ d of A = a 1 1, a 1 2,..., a h 1, a h 2, we can present its FIB encoding width based on G A as lc A = max x,y E lσ 1 x + lσ 2 y. From the construction of G A, we can clearly see that the last equation is compatible with Definition 4. The representation of a FIB table as a bipartite graph can help us to further understand the FIB encoding width based on b Theorem 6. Let A be a two-column FIB table with S 1 = S 2 = n = 2 W and let G A =<L + R, E> be its corresponding bipartite graph. If there does not exist an independent set of vertices U = U 1 U2 in G A, so that U 1 L = S 1, U 2 L = S 2 and U 1 = U 2 = n 2 + 1, then the optimal encoding width of A necessarily satisfies OP T A = 2W. Namely, the optimal encoding width is achieved by the fixedlength encoding and it cannot be improved by any variablelength encoding. Proof: Let C A = σ 1, σ 2 be an arbitrary FIB table encoding scheme of A. As mentioned earlier, by Property 2, OP T A 2W. We would like to show also that lc A 2W and therefore OP T A 2W. By Kraft s inequality, there are at least n elements in S 1 whose codeword lengths in σ 1 are at least W bits. Let U 1 denote the set of their corresponding vertices in L. Likewise, let U 2 R denote the similar set of vertices representing the elements in S 2 with codeword lengths of at least W in σ 2. We then have that U 1, U 2 n If lc A < 2W, then i [1, h], lσ 1 a i 1 + lσ 2 a i 2 2W 1. Since x U 1, y U 2, lσ 1 x + lσ 2 y W + W = 2W, then necessarily, x U 1, y U 2, x, y / E. Thus U = U 1 U2 is an independent set in G A. Since U 1, U 2 n 2 + 1, we have a contradiction, and can deduce that indeed lc A 2W and OP T A = 2W. B. Optimal Conditional Encoding of the Second Column We now consider the conditional problem of finding an optimal two-column encoding given that the encoding of the first column is known. Formally, given a two-column FIB table A and a known prefix encoding of one of its columns σ 1 := σ 1, we want to find a prefix encoding σ 2 of the second column such that the encoding width lc A of the FIB encoding scheme C A = σ 1 := σ 1, σ 2 is minimized. We denote the FIB encoding width of such scheme by OP T A σ 1 := σ 1, i.e. OP T A σ 1 := σ 1 = min lc A. 13 C A =σ 1 := σ 1,σ 2 We would like to suggest an algorithm to find such an optimal conditional encoding. Let A be a two-column FIB table with two sets of distinct elements in each of the columns S 1, S 2 and an encoding of the first column σ 1 := σ 1. For y S 2, we denote by ϕ σ1 y the maximal codeword length l σ 1 x of an element x S 1 that shares a row with y in A. ϕ σ1 y = max{l σ 1 x x S 1, x, y E}. 14 We observe that in order to calculate the optimal encoding σ 2 given that σ 1 := σ 1, it is enough to know ϕ σ1 y for any y S 2 while the exact values of l σ 1 s 1,1,..., l σ 1 s 1,n

8 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 8 are not necessarily required. This is because OP T A σ 1 := σ 1 = min lc A C A =σ 1 := σ 1,σ 2 = min max l σ 1 a i 1 + lσ 2 a i 2 C A =σ 1:= σ 1,σ 2 i [1,h] = min max ϕ σ1 y + lσ 2 y. 15 C A =σ 1 := σ 1,σ 2 Before presenting the algorithm, we suggest the following lemma. Lemma 7. There exists a prefix encoding σ 2 of S 2 such that σ 1, σ 2 = σ 1, σ 2 achieves the minimal encoding width of all the FIB encoding schemes {σ 1, σ 2 σ 1 := σ 1 } and satisfies y S 2, ϕ σ1 y + l σ 2 y = OP T A σ 1 := σ Proof: Let Ĉ A = σ 1 := σ 1, σ 2 be a FIB encoding scheme that satisfies lĉa = OP T A σ 1 := σ 1. If y S 2, ϕ σ1 y + l σ 2 y = OP T A σ 1 := σ 1 then σ 2 = σ 2 can be the requested encoding. Otherwise, by the definition of lĉa, y S 2, ϕ σ1 y + l σ 2 y lĉa = OP T A σ 1 := σ 1. For y S 2 we use the notation qy = OP T A σ 1 := σ 1 ϕ σ1 y+l σ 2 y. We define an encoding σ 2 of S 2 based on σ 2 as σ 2 y = σ 2 y 0 qy where the sign is used to represent the concatenation operation. In particular, if for y S 2, ϕ σ1 y + l σ 2 y = OP T A σ 1 := σ 1 then σ 2 y = σ 2 y 0 qy = σ 2 y. We can see that y S 2, ϕ σ1 y + l σ 2 y = ϕ σ1 y + l σ 2 y + qy = OP T A σ 1 := σ 1. Thus σ 2 satisfies the required equality. To complete the proof we have to show also that σ 2 is indeed a prefix encoding. We can first verify that the n 2 = S 2 codewords of σ 2 are different. If for any x, y S 2 s.t. x y, σ 2 x = σ 2 x 0 qx = σ 2 y 0 qy = σ 2 y then necessarily σ 2 x is a prefix of σ 2 y if qx qy or σ 2 y is a prefix of σ 2 x if qx qy, a contradiction since σ 2 is a prefix encoding. σ 2 also preservers the prefix property since if σ 2 x = σ 2 x 0 qx is a prefix of σ 2 y = σ 2 y 0 qy then again either σ 2 x is a prefix of σ 2 y or σ 2 y is a prefix of σ 2 x. Based on the last lemma we can deduce from Kraft s inequality, the exact value of OP T A σ 1 := σ 1. Theorem 8. The optimal conditional FIB encoding width of A satisfies OP T A σ 1 := σ 1 = log 2 2 ϕ σ1 y. 17 Proof: We first would like to show that OP T A σ 1 := σ 1 log 2 2 ϕ σ 1 y. Consider a FIB encoding σ 1, σ 2 = σ 1, σ 2 that has an encoding width of OP T A σ 1 := σ 1 and y S 2 satisfies ϕ σ1 y + l σ 2 y = OP T A σ 1 := σ 1. The last equality can be presented also as l σ 2 y = OP T A σ 1 := σ 1 ϕ σ1 y. Such an encoding exists by Lemma 7. By Kraft s inequality σ 2 satisfies 1 2 l σ2y = 2 2 OP T A σ 1:= σ 1 OP T A σ 1 := σ 1 2 ϕ σ1 y log 2 OP T A σ 1 := σ 1 ϕ σ1 y 2 ϕ σ1 y, 18 where the last inequality is obtained since OP T A σ 1 := σ 1 is of course an integer. To complete the proof we would also like to show that OP T A σ 1 := σ 1 log 2 2 ϕ σ 1 y by finding a FIB encoding scheme σ 1, σ 2 = σ 1, σ 2 whose encoding width satisfies this upper bound. To do so, we denote by v σ1 the term log 2 2 ϕ σ 1 y. Then, 2 v σ1 ϕ σ1 y = 2 ϕ σ1 y v σ1 = 2 ϕ σ1 y 2 v σ1 1 2 ϕ σ1 y 2 ϕ σ1 y = Thus there exists a prefix encoding σ 2 with codeword lengths l σ 2 y = v σ1 ϕ σ1 y for y S 2. The FIB encoding scheme C A = σ 1, σ 2 satisfies lc A = max ϕ σ1 y + l σ 2 y 20 = max ϕ σ1 y + v σ1 ϕ σ1 y = max v σ1 = v σ1. Then, OP T A σ 1 := σ 1 v σ1 = log 2 2 ϕ σ 1 y. Now, when the codeword lengths of the elements of S 2 are known from Lemma 7 and Theorem 8, it is easy to find such an encoding. To do so, we can find the codewords of the elements of S 2 in an increasing order of their required lengths. For each element y S 2, we allocate an arbitrary codeword σ 2 y in the required length such that none of the previously allocated codewords is a prefix of the current codeword. It is easy to verify that Kraft s inequality guarantees that such allocation is always possible. V. LOWER BOUNDS ON THE OPTIMAL ENCODING WIDTH OF TWO-COLUMN FIB TABLES We would like now to suggest additional lower bounds on the optimal encoding width of a given two-column FIB table A as defined above. We can calculate this bound without solving the relaxed FIB encoding problem. Let again G A =<L + R, E>=<S 1 + S 2, E> with S 1 = S 2 = n = 2 W. We first recall an additional definition from graph theory. Definition 5 Edge Cover. For an undirected graph G =< V, E>, a set of edges S E is called an edge cover of G if

9 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 9 x,y S{x, y} = V, i.e. each of the vertices in V is incident on at least one of the edges in S. Clearly, G A does not include any isolated vertices, i.e. any vertex is connected to at least one vertex and the value it represents appears in at least one of the rows of A. Therefore, an edge cover always exists. For a graph G, we denote by ρg the edge covering number of G, i.e. the minimal number of edges in an edge cover of G. We first show a simple property of ρg A. Lemma 9. The edge covering number ρg A of G A satisfies n ρg A 2 n 1. Proof: Consider the edges in a minimal edge cover in an arbitrary order. The first edge covers two vertices. Any additional edge adds one or two vertices to the set of vertices covered by previous edges in the edge cover. Since there are 2n vertices in G A then clearly n ρg A 2n 1. To show that ρg A 2n 2, we show that there must be two independent edges in G A, i.e. edges that do not share any vertex. Consider an edge s 1,i, s 2,j for i, j [1, n]. If all the other edges in E share at least one vertex with this edge, we must have that E = {s 1,i, s 2,k k [1, n]} {s 1,k, s 2,j k [1, n]}. Then, for instance the edges s 1,i, s 2,k, s 1,k, s 2,j for k i, j are independent. Finally, the two independent edges can contribute two covered vertices to the edge cover and necessarily ρg A 2n 2 = 2 n 1. Let α = ρg A /n. The next theorem suggests a lower bound on the optimal encoding width of A based on the value of ρg A. Theorem 10. The optimal encoding width of A satisfies 2 W + α 1 OP T A. 21 α Proof: For G A =<S 1 + S 2, E>, let S E be an edge cover of G A of size ρg A = α n. Let C A = σ 1, σ 2 be an arbitrary FIB table encoding scheme of A. We will show that max lσ 1x + lσ 2 y x,y S Thus, since S E then necessarily lc A = max lσ 1x + lσ 2 y x,y E 2 W + α 1 α W + α 1 α. 23 To do so, we consider the subset of the rows of A represented by the edge cover S. Let D = d 1 1, d 1 2,..., d ρg A 1, d ρg A 2 represent these rows, s.t. D = ρg A = α n. By Definition 5 of the edge cover, S 1 = ρg A {d i 1} and S 2 = ρg A {d i 2}, i.e. all the elements of S 1 appear at least once in the first column of the rows of D as well as all the elements of S 2 in the second. Let X D C A denote the total sum of codeword lengths of the elements in D using the encoding C A = σ 1, σ 2, s.t. X D C A = ρg A lσ 1 d i 1 + lσ 2 d i 2. By manipulating Kraft s inequality, we can have that the total sum of codeword lengths of the n distinct elements in each column is at least n W. Of course, the other α n n = a Fig. 3. Two examples of bipartite graphs with n = 2 W = 8 for W = 3 vertices in each graph side representing two two-column FIB tables A 1 and A 2. In the first graph a, there is a perfect match and the size of the minimal edge cover is 8 = n = α n with α = 1 and OP T A 1 = 2W = 6. In the second b, the size of the edge cover is 14 = α n with α = 1.75 and OP T A 2 5. α 1 n elements in each column are encoded in at least one bit each. Thus, X D C A = = ρg A ρg A b lσ 1 d i 1 + lσ 2 d i 2 ρg A lσ 1 d i 1 + lσ 2 d i 2 n W + α 1 n + n W + α 1 n = 2n W + 2α 1 n. 24 We recall that the total number of rows is α n and thus there is at least one row in D that is encoded in at least XD C A α n bits. Thus the encoding width of C A satisfies lc A = max lσ 1x + lσ 2 y x,y E max lσ XD C A 1x + lσ 2 y x,y S α n 2n W + 2α 1 n α n 2 W + α 1 2W =. 25 α α Finally, Since C A is an arbitrary encoding scheme, we can deduce the result. Example 6. Figure 3 illustrates the two corresponding bipartite graphs for two-column FIB tables A 1 and A 2, with n = 2 W = 8 for W = 3 distinct elements in each column. For A 1, the bipartite graph includes a perfect match and the size of the edge cover is 8 = n = α n with α = 1. 2 W +α 1 α Theorem 10 implies that OP T A 1 = 2W. For A 2, the size of the minimal edge cover is 14 = 2 n 1 = α n with α = Thus OP T A = 5. Further, by encoding the first element in a column in a single bit and others in four bits, we have that indeed OP T A 2 = 5. The above lower bound can be slightly improved in some cases. We first recall a well known property from graph theory. In a bipartite graph of two pairs of n vertices, there exists a minimal edge cover of size α n iff there exists a maximum matching of size 2n α n = 2 α n. Let β = 2 α. To improve the last presented lower bound, we calculate the average encoding of a the β n rows in a maximum matching. Let k = log 2 β n s.t. 2 k β n < 2 k+1.

11 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 11 Fig. 4. Effectiveness of the encoding algorithm on synthetic FIB tables with d = 2 columns and W = 8, as a function of the Zipf parameter. Elements are selected according to the Zipf distribution with the given parameter. By Theorem 5, the optimal encoding width is at least W + 2 = 10 and at most 2W = 16. Since d = 2, our suggested convex scheme takes at most d 1 = 1 bit more than the theoretical lower bound. In comparison, the fixed-length encoding has a fixed width of 2W = 16 bits, while the Huffman encoding sometimes achieves a greater width. Fig. 5. a Effectiveness of the encoding algorithm as a function of the number of columns with 2 W = 32 distinct elements per column. b Effectiveness of the encoding algorithm as a function of the number of distinct elements per column with d = 10 columns. Analysis of the encoding algorithm as a function of table parameters. encoded version of existing entries. It is possible to endow the table encoding algorithm with better update capabilities by choosing an encoding with a slightly larger value of P that guarantees short codeword lengths for possible future inserted elements. Meanwhile, between two offline processes, any lookup should consider the encoded entries in the FIB and the unencoded entries in the small dedicated memory. VII. EXPERIMENTAL RESULTS We now turn to conducting experiments to examine the distribution of the optimal encoding width and the performance of our suggested encoding algorithm from Section III-B. In the experiments, we rely on both synthetic and real-life FIB tables. A. Effectiveness on Synthetic FIB tables We first evaluate our suggested scheme on synthetic twocolumn FIB tables. Each table has 1000 entries with 2 W = 256 for W = 8 distinct elements in each of the d = 2 columns. To generate the table, we first make sure that each element appears at least once in each column by adding an entry containing it with an additional random element in the other column. This additional random element is selected according to a Zipf distribution of parameter s. Then, we add additional entries with d = 2 random elements selected according to the same distribution. Intuitively, a Zipf distribution with a lower parameter s is closer to the uniform distribution. First, in Fig. 4, we compare our suggested scheme, denoted convex, with the fixed-length and Huffman encoding schemes. The results are based on the average of 10 simulations. We present the lower bound given by the fractional solution of the relaxed optimization problem Section III-B. We also show our suggested scheme, which takes the ceiling of the fractional solution of the relaxed problem, unless it exceeds 2W, in which case it simply uses fixed-length encoding. As suggested by Theorem 1, our scheme is always within d 1 = 1 bit of the fractional-optimum lower bound. For instance, for a Zipf parameter s = 4, the widths for the Huffman, fixed-length, and our suggested encodings are respectively 17.6, 2W = 16, and 12.1, while the lower bound is More generally, the lower the Zipf parameter, the closer the lower bound to 2W. Next, in Fig. 5, we plot the encoding efficiency as a function of the number of columns a and of the number of elements appearing in each column b. In both plots we take h = 1000 entries and a Zipf parameter s = 2. In Fig. 5a the number of elements is 32, i.e. W = 5, and in Fig. 5b the number of columns is d = 10. We can see that in a, Huffman becomes better for the worst-case entry width. Intuitively, it is because the ratio of the standard deviation of the sum of the encodings 1 of d columns to the expected sum decreases with d as d. We want to stress that while our scheme performs better, it is also much slower to run than the simpler schemes. As mentioned in the implementation section, it is destined to offline or background use. For instance, in Fig. 5a, an unoptimized implementation of our scheme on a basic Intel i5 core respectively took 0.82 seconds and 23.1 seconds for the two-column and ten-column tables, while the Huffmann scheme ran in the respectively- negligible times of 7 and 11 milliseconds. B. Real-Life FIB tables We also conduct experiments on three typical real-life enterprise-network tables. The tables are collected from three different switches of three different switch vendors, each switch using a different number of columns. All tables were collected in enterprise networks, the first in the United States with 2790 entries and the other in China with 903 and 428 entries. For each table, we present the size of the original raw table without compression. We compare it to the total size of the compressed table, including the dictionary for three compression algorithms: the fixed-length encoding, the

14 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 14 3 For every 1 i n and every 1 j 2 k, add the following six entries: A i, Bi, C 0, D j, E 0, F 0, G 0 35a Āi, B i, C 0, D j, E 0, F 0, G 0 35b A i, B 0, Ci, D j, E 0, F 0, G 0 35c Āi, B 0, C i, D j, E 0, F 0, G 0 35d A 0, B i, Ci, D j, E 0, F 0, G 0 35e A 0, Bi, C i, D j, E 0, F 0, G 0. 35f 4 For every 1 j 2 2k 1, add the following special three entries: A 1, B 0, C 0, D 0, E 0, F 0, G j 36a A 0, B 1, C 0, D 0, E 0, F 0, G j 36b A 0, B 0, C 1, D 0, E 0, F 0, G j. 36c 5 Finally, for every clause C that contains the literals x i, x j and say x k we will have a single entry of the form A i, B j, C k, D 0, E 0, F 0, G 0 37 This also applies equally to clauses with 0, 2 or 3 negated variables. The order of the variables will not matter for us. Let s now provide some intuition for the naming and ideas behind the reduction, before proving it formally. Note that only entries of the form of Equation 37 actually depend on the input. The rest of the entries are used to reduce from 3 SAT to encoding matrices. The symbols S 0, with S {A, B, C, D, E, F, G}, represent dummy blanks, and must be encoded with just one character in an encoding scheme of width 3k + 6. The symbols S i and S i where S {A, B, C} represent the literals x i and x i respectively. We will later explain why in an encoding scheme of width 3k +6 if one exists it must be the case that one of S i, S i is encoded by a codeword of length k, and the other has length k+1. We will interpret the one which has codeword length k as the value of the truth assignment. In entries of the form of Equation 37, we essentially require that at least one of the literals of the clause has a short codeword, which would correspond to the literal being satisfied. The following lemma proves the easy direction of the result: Lemma 12. If the formula is satisfiable, there is an encoding scheme with an encoding width of 3k + 6. Proof: Let T be some truth assignment. We present the encoding scheme C M = σ 1,..., σ d for d = 7 that satisfies lc M = 3k Each blank symbol S 0 will be encoded by one bit, for any S {A, B,... G}. 2 Each symbol E j, F j will be encoded by 3k bits. Note that there are 2 3k 1 such symbols. 3 Each symbol G j will be encoded by 2k bits. Note that there are 2 2k 1 such symbols. 4 Each symbol D j will be encoded with k + 1 bits. Note that there are 2 k such symbols. 5 Each special symbol A 1, B 1, C 1 will be encoded by k + 1 bits. 6 For every S {A, B, C}, if T x i is true then S i is encoded with k bits and S i is encoded in k + 1 bits. In addition, if T x i is false then S i is encoded with k + 1 bits and S i is encoded in k bits. We can verify that each of the d = 7 encodings of C M satisfy Kraft s inequality. For instance, in the first three columns we have for j [1, 3] and respectively S {A, B, C} 2 lσ js lσ js 0 + n 2 lσjsi + 2 lσj S i = 2 k n 2 k + 2 k+1 = 2 k k 1 2 k+1 = 1. In addition, the encodings width of all entries is at most 3k + 6. For example, since in a truth assignment at least one literal is satisfied, we have that each entry in the last set of entries 37 is encoded in at most 2 k k + 4 = 3k + 6 bits. We would like to suggest another property showing the other direction. To do so, we present several lemmas. Lemma 13. Suppose that there is an encoding scheme of width 3k +6. Then every symbol S 0 has to be encoded with just one bit, for every S {A, B,..., G}. Proof: There are 2 3k 1 symbols of the form E j and F j in addition to E 0, F 0. By Kraft s inequality, at least one of these symbols in both columns is encoded by at least 3k bits. Encoding them in entries 33a and 33b requires that all S 0 symbols including E 0 and F 0 have a codeword of 1 bit. Lemma 14. Each symbol S 1, S i and S i is encoded by at most k + 1 bits, for every S {A, B, C} and 1 i n. Proof: There are 2 2k 1 symbols of the form G j in addition to G 0. At least one of them is encoded in at least 2k bits. Consider entries 34a-34f and 36a-36c. Even if all the S 0 are encoded with one bit as we know they are, if any S i is encoded with more than k + 1 bits the obtained encoding width will be larger than 3k + 6. Now, again by Kraft s inequality, we must have that for S {A, B, C}, besides S 0 that is encoded in a single bit, at most n symbols out of {S i, S i, S 1 } have codeword lengths of at most k, and at least n + 1 signals have codeword lengths of k + 1. This is because otherwise, n k + n 2 k+1 = n+2 2 k+1 = k +1 2 k+1 > 1. We now add some definitions. For S {A, B, C}, define: L S = {i : both S i and S i have codeword lengths of at most k}, H S = {i : both S i and S i have codeword lengths of k + 1}, and T S = {i : exactly one of S i and S i has codeword length of at most k}. Lemma 15. In any encoding scheme of width 3k + 6 we have H S = L S = for every S {A, B, C}. Proof: By the upper bound from above on the number of symbols encoded in at most k bits, we have H S L S. For every i H A, both A i and Āi have codeword lengths

15 TECHNICAL REPORT TR12-03, TECHNION, ISRAEL 15 of k + 1. But in this case entries 35a - 35f require that B i, B i, C i and C i all have codeword lengths of at most k, that is i L B, L C. By a similar argument for H B and H C we get that 2 H A + 2 H B + 2 H C = L A + L B + L C which can only be true if H S = L S = 0 for every S {A, B, C}. The following lemma lets us derive a truth assignment. Lemma 16. A i has a codeword length of k iff B i has a codeword length of k iff C i has a codeword length of k. Proof: By contradiction. Suppose that A i has a codeword length of k but B i has a codeword length of k +1. By Lemma 15, Ā i also has a codeword length of k + 1. There are 2 k symbols of the form D j in addition to D 0, thus at least one of them is encoded in at least k +1 bits. Then, the entry of the form 35b with this symbol and Āi, B i must have a width of at least 3 k = 3k + 7. Contradiction to the encoding width of the scheme. The rest of the cases follow similarly. We can now elicit a truth assignment which satisfies the formula: T i = true if and only if A i has an a codeword length k. Lemma 17. The assignment T satisfies the formula. Proof: Consider some clause. As the corresponding entry 37 has an encoding width of at most 3k + 6, at least one of three symbols in this entry must be encoded in k bits. The corresponding literal will satisfy the clause under the truth assignment T. Directly from the last lemma, we can deduce the requested property. Property 3. Suppose that there is an encoding scheme of width 3k + 6. Then the original formula is satisfiable. Finally, we can present the proof of Theorem 2 by combining both lemmas. Proof of Theorem 2: Combining Lemma 12, Lemma 3, and the hardness of the 3 SAT decision problem, we deduce the hardness of finding the optimal encoding width of a FIB table with d = 7, and therefore the hardness of finding an optimal encoding scheme as well. To show the hardness for a table M with d > 7 columns, we can simply add to a table M with 7 columns, d 7 additional columns, each with exactly two distinct elements. Since all the elements in the additional columns can be encoded in a single bit we must have that OP T M = 3k d 7 if and only if OP T M = 3k + 6.

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

### Approximation Algorithms: LP Relaxation, Rounding, and Randomized Rounding Techniques. My T. Thai

Approximation Algorithms: LP Relaxation, Rounding, and Randomized Rounding Techniques My T. Thai 1 Overview An overview of LP relaxation and rounding method is as follows: 1. Formulate an optimization

### Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

### Fairness in Routing and Load Balancing

Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

### On the effect of forwarding table size on SDN network utilization

IBM Haifa Research Lab On the effect of forwarding table size on SDN network utilization Rami Cohen IBM Haifa Research Lab Liane Lewin Eytan Yahoo Research, Haifa Seffi Naor CS Technion, Israel Danny Raz

### Xiaoqiao Meng, Vasileios Pappas, Li Zhang IBM T.J. Watson Research Center Presented by: Payman Khani

Improving the Scalability of Data Center Networks with Traffic-aware Virtual Machine Placement Xiaoqiao Meng, Vasileios Pappas, Li Zhang IBM T.J. Watson Research Center Presented by: Payman Khani Overview:

### SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,

### Diversity Coloring for Distributed Data Storage in Networks 1

Diversity Coloring for Distributed Data Storage in Networks 1 Anxiao (Andrew) Jiang and Jehoshua Bruck California Institute of Technology Pasadena, CA 9115, U.S.A. {jax, bruck}@paradise.caltech.edu Abstract

### Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

### Algorithm Design and Analysis

Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

### Load Balancing and Switch Scheduling

EE384Y Project Final Report Load Balancing and Switch Scheduling Xiangheng Liu Department of Electrical Engineering Stanford University, Stanford CA 94305 Email: liuxh@systems.stanford.edu Abstract Load

### Network (Tree) Topology Inference Based on Prüfer Sequence

Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,

### Codes for Network Switches

Codes for Network Switches Zhiying Wang, Omer Shaked, Yuval Cassuto, and Jehoshua Bruck Electrical Engineering Department, California Institute of Technology, Pasadena, CA 91125, USA Electrical Engineering

### Gambling and Data Compression

Gambling and Data Compression Gambling. Horse Race Definition The wealth relative S(X) = b(x)o(x) is the factor by which the gambler s wealth grows if horse X wins the race, where b(x) is the fraction

### 5.1 Bipartite Matching

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

### A Sublinear Bipartiteness Tester for Bounded Degree Graphs

A Sublinear Bipartiteness Tester for Bounded Degree Graphs Oded Goldreich Dana Ron February 5, 1998 Abstract We present a sublinear-time algorithm for testing whether a bounded degree graph is bipartite

### Network File Storage with Graceful Performance Degradation

Network File Storage with Graceful Performance Degradation ANXIAO (ANDREW) JIANG California Institute of Technology and JEHOSHUA BRUCK California Institute of Technology A file storage scheme is proposed

### 1 Approximating Set Cover

CS 05: Algorithms (Grad) Feb 2-24, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the set-covering problem consists of a finite set X and a family F of subset of X, such that every elemennt

### On the Multiple Unicast Network Coding Conjecture

On the Multiple Unicast Networ Coding Conjecture Michael Langberg Computer Science Division Open University of Israel Raanana 43107, Israel miel@openu.ac.il Muriel Médard Research Laboratory of Electronics

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### 11. APPROXIMATION ALGORITHMS

11. APPROXIMATION ALGORITHMS load balancing center selection pricing method: vertex cover LP rounding: vertex cover generalized load balancing knapsack problem Lecture slides by Kevin Wayne Copyright 2005

### Single-Link Failure Detection in All-Optical Networks Using Monitoring Cycles and Paths

Single-Link Failure Detection in All-Optical Networks Using Monitoring Cycles and Paths Satyajeet S. Ahuja, Srinivasan Ramasubramanian, and Marwan Krunz Department of ECE, University of Arizona, Tucson,

### Proximal mapping via network optimization

L. Vandenberghe EE236C (Spring 23-4) Proximal mapping via network optimization minimum cut and maximum flow problems parametric minimum cut problem application to proximal mapping Introduction this lecture:

### 1 Solving LPs: The Simplex Algorithm of George Dantzig

Solving LPs: The Simplex Algorithm of George Dantzig. Simplex Pivoting: Dictionary Format We illustrate a general solution procedure, called the simplex algorithm, by implementing it on a very simple example.

### Definition 11.1. Given a graph G on n vertices, we define the following quantities:

Lecture 11 The Lovász ϑ Function 11.1 Perfect graphs We begin with some background on perfect graphs. graphs. First, we define some quantities on Definition 11.1. Given a graph G on n vertices, we define

### Compact Representations and Approximations for Compuation in Games

Compact Representations and Approximations for Compuation in Games Kevin Swersky April 23, 2008 Abstract Compact representations have recently been developed as a way of both encoding the strategic interactions

### Resource Allocation with Time Intervals

Resource Allocation with Time Intervals Andreas Darmann Ulrich Pferschy Joachim Schauer Abstract We study a resource allocation problem where jobs have the following characteristics: Each job consumes

### Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

### Offline sorting buffers on Line

Offline sorting buffers on Line Rohit Khandekar 1 and Vinayaka Pandit 2 1 University of Waterloo, ON, Canada. email: rkhandekar@gmail.com 2 IBM India Research Lab, New Delhi. email: pvinayak@in.ibm.com

### Permutation Betting Markets: Singleton Betting with Extra Information

Permutation Betting Markets: Singleton Betting with Extra Information Mohammad Ghodsi Sharif University of Technology ghodsi@sharif.edu Hamid Mahini Sharif University of Technology mahini@ce.sharif.edu

### Classification - Examples

Lecture 2 Scheduling 1 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b

LZ77 The original LZ77 algorithm works as follows: A phrase T j starting at a position i is encoded as a triple of the form distance, length, symbol. A triple d, l, s means that: T j = T [i...i + l] =

### The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

### New Hash Function Construction for Textual and Geometric Data Retrieval

Latest Trends on Computers, Vol., pp.483-489, ISBN 978-96-474-3-4, ISSN 79-45, CSCC conference, Corfu, Greece, New Hash Function Construction for Textual and Geometric Data Retrieval Václav Skala, Jan

### Week 5 Integral Polyhedra

Week 5 Integral Polyhedra We have seen some examples 1 of linear programming formulation that are integral, meaning that every basic feasible solution is an integral vector. This week we develop a theory

### Load Balancing. Load Balancing 1 / 24

Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait

### Minimal Cost Reconfiguration of Data Placement in a Storage Area Network

Minimal Cost Reconfiguration of Data Placement in a Storage Area Network Hadas Shachnai Gal Tamir Tami Tamir Abstract Video-on-Demand (VoD) services require frequent updates in file configuration on the

### The Conference Call Search Problem in Wireless Networks

The Conference Call Search Problem in Wireless Networks Leah Epstein 1, and Asaf Levin 2 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. lea@math.haifa.ac.il 2 Department of Statistics,

### On Integer Additive Set-Indexers of Graphs

On Integer Additive Set-Indexers of Graphs arxiv:1312.7672v4 [math.co] 2 Mar 2014 N K Sudev and K A Germina Abstract A set-indexer of a graph G is an injective set-valued function f : V (G) 2 X such that

### This article has been accepted for inclusion in a future issue of this journal. Content is final as presented, with the exception of pagination.

IEEE/ACM TRANSACTIONS ON NETWORKING 1 A Greedy Link Scheduler for Wireless Networks With Gaussian Multiple-Access and Broadcast Channels Arun Sridharan, Student Member, IEEE, C Emre Koksal, Member, IEEE,

### Load Balancing in MapReduce Based on Scalable Cardinality Estimates

Load Balancing in MapReduce Based on Scalable Cardinality Estimates Benjamin Gufler 1, Nikolaus Augsten #, Angelika Reiser 3, Alfons Kemper 4 Technische Universität München Boltzmannstraße 3, 85748 Garching

### 2.3 Convex Constrained Optimization Problems

42 CHAPTER 2. FUNDAMENTAL CONCEPTS IN CONVEX OPTIMIZATION Theorem 15 Let f : R n R and h : R R. Consider g(x) = h(f(x)) for all x R n. The function g is convex if either of the following two conditions

### 1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Introduction Linear Programming Neil Laws TT 00 A general optimization problem is of the form: choose x to maximise f(x) subject to x S where x = (x,..., x n ) T, f : R n R is the objective function, S

### 3. Linear Programming and Polyhedral Combinatorics

Massachusetts Institute of Technology Handout 6 18.433: Combinatorial Optimization February 20th, 2009 Michel X. Goemans 3. Linear Programming and Polyhedral Combinatorics Summary of what was seen in the

### CHAPTER 6. Shannon entropy

CHAPTER 6 Shannon entropy This chapter is a digression in information theory. This is a fascinating subject, which arose once the notion of information got precise and quantifyable. From a physical point

### Weighted Sum Coloring in Batch Scheduling of Conflicting Jobs

Weighted Sum Coloring in Batch Scheduling of Conflicting Jobs Leah Epstein Magnús M. Halldórsson Asaf Levin Hadas Shachnai Abstract Motivated by applications in batch scheduling of jobs in manufacturing

### Partitioning edge-coloured complete graphs into monochromatic cycles and paths

arxiv:1205.5492v1 [math.co] 24 May 2012 Partitioning edge-coloured complete graphs into monochromatic cycles and paths Alexey Pokrovskiy Departement of Mathematics, London School of Economics and Political

### Transportation Polytopes: a Twenty year Update

Transportation Polytopes: a Twenty year Update Jesús Antonio De Loera University of California, Davis Based on various papers joint with R. Hemmecke, E.Kim, F. Liu, U. Rothblum, F. Santos, S. Onn, R. Yoshida,

### On the Use of Compression Algorithms for Network Traffic Classification

On the Use of for Network Traffic Classification Christian CALLEGARI Department of Information Ingeneering University of Pisa 23 September 2008 COST-TMA Meeting Samos, Greece Outline Outline 1 Introduction

### Online Scheduling with Bounded Migration

Online Scheduling with Bounded Migration Peter Sanders, Naveen Sivadasan, and Martin Skutella Max-Planck-Institut für Informatik, Saarbrücken, Germany, {sanders,ns,skutella}@mpi-sb.mpg.de Abstract. Consider

### Image Compression through DCT and Huffman Coding Technique

International Journal of Current Engineering and Technology E-ISSN 2277 4106, P-ISSN 2347 5161 2015 INPRESSCO, All Rights Reserved Available at http://inpressco.com/category/ijcet Research Article Rahul

### Randomization Approaches for Network Revenue Management with Customer Choice Behavior

Randomization Approaches for Network Revenue Management with Customer Choice Behavior Sumit Kunnumkal Indian School of Business, Gachibowli, Hyderabad, 500032, India sumit kunnumkal@isb.edu March 9, 2011

### Optimal File Sharing in Distributed Networks

Optimal File Sharing in Distributed Networks Moni Naor Ron M. Roth Abstract The following file distribution problem is considered: Given a network of processors represented by an undirected graph G = (V,

### Stochastic Inventory Control

Chapter 3 Stochastic Inventory Control 1 In this chapter, we consider in much greater details certain dynamic inventory control problems of the type already encountered in section 1.3. In addition to the

### Ph.D. Thesis. Judit Nagy-György. Supervisor: Péter Hajnal Associate Professor

Online algorithms for combinatorial problems Ph.D. Thesis by Judit Nagy-György Supervisor: Péter Hajnal Associate Professor Doctoral School in Mathematics and Computer Science University of Szeged Bolyai

### Approximation Algorithms. Scheduling. Approximation algorithms. Scheduling jobs on a single machine

Approximation algorithms Approximation Algorithms Fast. Cheap. Reliable. Choose two. NP-hard problems: choose 2 of optimal polynomial time all instances Approximation algorithms. Trade-off between time

### Classification - Examples -1- 1 r j C max given: n jobs with processing times p 1,..., p n and release dates

Lecture 2 Scheduling 1 Classification - Examples -1-1 r j C max given: n jobs with processing times p 1,..., p n and release dates r 1,..., r n jobs have to be scheduled without preemption on one machine

### Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs Yong Zhang 1.2, Francis Y.L. Chin 2, and Hing-Fung Ting 2 1 College of Mathematics and Computer Science, Hebei University,

### Lecture 7: Approximation via Randomized Rounding

Lecture 7: Approximation via Randomized Rounding Often LPs return a fractional solution where the solution x, which is supposed to be in {0, } n, is in [0, ] n instead. There is a generic way of obtaining

### Graphs without proper subgraphs of minimum degree 3 and short cycles

Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract

### Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### Linear Codes. Chapter 3. 3.1 Basics

Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length

### Single machine parallel batch scheduling with unbounded capacity

Workshop on Combinatorics and Graph Theory 21th, April, 2006 Nankai University Single machine parallel batch scheduling with unbounded capacity Yuan Jinjiang Department of mathematics, Zhengzhou University

### Practical Guide to the Simplex Method of Linear Programming

Practical Guide to the Simplex Method of Linear Programming Marcel Oliver Revised: April, 0 The basic steps of the simplex algorithm Step : Write the linear programming problem in standard form Linear

### 8.1 Min Degree Spanning Tree

CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree

### Discuss the size of the instance for the minimum spanning tree problem.

3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can

### Bargaining Solutions in a Social Network

Bargaining Solutions in a Social Network Tanmoy Chakraborty and Michael Kearns Department of Computer and Information Science University of Pennsylvania Abstract. We study the concept of bargaining solutions,

### THE SCHEDULING OF MAINTENANCE SERVICE

THE SCHEDULING OF MAINTENANCE SERVICE Shoshana Anily Celia A. Glass Refael Hassin Abstract We study a discrete problem of scheduling activities of several types under the constraint that at most a single

### Weighted Sum Coloring in Batch Scheduling of Conflicting Jobs

Weighted Sum Coloring in Batch Scheduling of Conflicting Jobs Leah Epstein Magnús M. Halldórsson Asaf Levin Hadas Shachnai Abstract Motivated by applications in batch scheduling of jobs in manufacturing

### Nan Kong, Andrew J. Schaefer. Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA

A Factor 1 2 Approximation Algorithm for Two-Stage Stochastic Matching Problems Nan Kong, Andrew J. Schaefer Department of Industrial Engineering, Univeristy of Pittsburgh, PA 15261, USA Abstract We introduce

### Information, Entropy, and Coding

Chapter 8 Information, Entropy, and Coding 8. The Need for Data Compression To motivate the material in this chapter, we first consider various data sources and some estimates for the amount of data associated

### An improved on-line algorithm for scheduling on two unrestrictive parallel batch processing machines

This is the Pre-Published Version. An improved on-line algorithm for scheduling on two unrestrictive parallel batch processing machines Q.Q. Nong, T.C.E. Cheng, C.T. Ng Department of Mathematics, Ocean

### December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation

### Exercises with solutions (1)

Exercises with solutions (). Investigate the relationship between independence and correlation. (a) Two random variables X and Y are said to be correlated if and only if their covariance C XY is not equal

### Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Linear Programming Widget Factory Example Learning Goals. Introduce Linear Programming Problems. Widget Example, Graphical Solution. Basic Theory:, Vertices, Existence of Solutions. Equivalent formulations.

### OpenFlow Based Load Balancing

OpenFlow Based Load Balancing Hardeep Uppal and Dane Brandon University of Washington CSE561: Networking Project Report Abstract: In today s high-traffic internet, it is often desirable to have multiple

### Labeling outerplanar graphs with maximum degree three

Labeling outerplanar graphs with maximum degree three Xiangwen Li 1 and Sanming Zhou 2 1 Department of Mathematics Huazhong Normal University, Wuhan 430079, China 2 Department of Mathematics and Statistics

### THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM

1 THE PROBLEM OF WORM PROPAGATION/PREVENTION I.E. THE MINIMUM VERTEX COVER PROBLEM Prof. Tiziana Calamoneri Network Algorithms A.y. 2014/15 2 THE PROBLEM WORMS (1)! A computer worm is a standalone malware

### JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

### Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

### Distributed Computing over Communication Networks: Maximal Independent Set

Distributed Computing over Communication Networks: Maximal Independent Set What is a MIS? MIS An independent set (IS) of an undirected graph is a subset U of nodes such that no two nodes in U are adjacent.

### Performance of networks containing both MaxNet and SumNet links

Performance of networks containing both MaxNet and SumNet links Lachlan L. H. Andrew and Bartek P. Wydrowski Abstract Both MaxNet and SumNet are distributed congestion control architectures suitable for

### arxiv:cs/0605141v1 [cs.dc] 30 May 2006

General Compact Labeling Schemes for Dynamic Trees Amos Korman arxiv:cs/0605141v1 [cs.dc] 30 May 2006 February 1, 2008 Abstract Let F be a function on pairs of vertices. An F- labeling scheme is composed

### Load-Balanced Virtual Backbone Construction for Wireless Sensor Networks

Load-Balanced Virtual Backbone Construction for Wireless Sensor Networks Jing (Selena) He, Shouling Ji, Yi Pan, Zhipeng Cai Department of Computer Science, Georgia State University, Atlanta, GA, USA, {jhe9,

### Private Approximation of Clustering and Vertex Cover

Private Approximation of Clustering and Vertex Cover Amos Beimel, Renen Hallak, and Kobbi Nissim Department of Computer Science, Ben-Gurion University of the Negev Abstract. Private approximation of search

### Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Lecture 3 3B1B Optimization Michaelmas 2015 A. Zisserman Linear Programming Extreme solutions Simplex method Interior point method Integer programming and relaxation The Optimization Tree Linear Programming

### On the k-path cover problem for cacti

On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China zeminjin@eyou.com, x.li@eyou.com Abstract In this paper we

### Big Data & Scripting storage networks and distributed file systems

Big Data & Scripting storage networks and distributed file systems 1, 2, in the remainder we use networks of computing nodes to enable computations on even larger datasets for a computation, each node

### OPRE 6201 : 2. Simplex Method

OPRE 6201 : 2. Simplex Method 1 The Graphical Method: An Example Consider the following linear program: Max 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2

### ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu

ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ABSTRACT. Set R is a card game played with a

### arxiv:1112.0829v1 [math.pr] 5 Dec 2011

How Not to Win a Million Dollars: A Counterexample to a Conjecture of L. Breiman Thomas P. Hayes arxiv:1112.0829v1 [math.pr] 5 Dec 2011 Abstract Consider a gambling game in which we are allowed to repeatedly

### No: 10 04. Bilkent University. Monotonic Extension. Farhad Husseinov. Discussion Papers. Department of Economics

No: 10 04 Bilkent University Monotonic Extension Farhad Husseinov Discussion Papers Department of Economics The Discussion Papers of the Department of Economics are intended to make the initial results

### Scheduling Real-time Tasks: Algorithms and Complexity

Scheduling Real-time Tasks: Algorithms and Complexity Sanjoy Baruah The University of North Carolina at Chapel Hill Email: baruah@cs.unc.edu Joël Goossens Université Libre de Bruxelles Email: joel.goossens@ulb.ac.be