Bin packing: config LP is not affected by grouping identical items

Dependencies:

  1. Bin packing: configuration LP

The optimal objective value of the configuration LP of a bin packing instance doesn't depend on how identical items are grouped into types.

Formally, let I be a bin packing instance with n items such that there are m types of items, and all items of the same type are identical. Let bi be the number of items of type i. Let f:[n][m] be a function that takes an item i and returns its type. For an item of type i, define f1(i):={jI:f(j)=i} i.e., f1(i) is the set of items whose type is i.

An expanded configuration C is an n-tuple (r1,,rn){0,1}n, where the items {iI:ri=1} can fit into a bin. For an n-tuple C, define f(C):=(t1,,tm), where ti:=jf1(i)ri. f(C) is called the compact version of C. Let C be the set of all expanded configurations and f(C)={f(C):CC} be the set of all compact configurations. Note that a compact representation can correspond to multiple expanded representations. Let N:=|C| and N:=|f(C)|. Let T{0,1}n×N be the expanded configuration matrix of I, i.e., T[i,C]=1 if expanded configuration C contains item i. Let f(T)Z0m×N be the compact configuration matrix of I, i.e., f(T)[i,C] is the number of items of type i in compact configuration C.

Then the following two linear programs, called the expanded configuration LP (denoted by LP) and the compact configuration LP (denoted by f(LP)) have the same optimal objective value: minxRNsum(x) where Txb,x0. minxRNsum(x) where f(T)x1,x0.

Proof that opt(f(LP))opt(LP)

Let x[0,1]N be an optimal solution to LP.

For a compact configuration C, define f1(C):={DC:f(D)=C} and define yC:=Df1(C)xD. Then for the vector y:=[yC:yf(C)], we have sum(y)=sum(x)=opt(LP). We will prove that y is a feasible solution to f(LP), which would imply that opt(f(LP))sum(y)=opt(LP).

Let AZ0m×N where A[i,D] is the number of items of type i in expanded configuration D. Then f(T)[i,f(D)]=A[i,D]=jf1(i)T[j,D].

For any i[m], we get (f(T)y)i=Cf(C)f(T)[i,C]yC=Cf(C)Df1(C)f(T)[i,C]xD=DCA[i,D]xD=jf1(i)DCT[j,D]xDjf1(i)1=bi. Hence, f(T)yb, so y is feasible for f(LP).

Proof that opt(LP)opt(f(LP))

Without loss of generality, assume bi1 for each i[m]. We will show how to convert f(LP) to LP by gradually increasing the number of types.

Let f be the function that gives the type of each item. Let {i1,i2,,ibm} be items of type m. Without loss of generality, assume bm2. We'll pick an item of type m and change its type to m+1. Formally, define f:[n][m+1] be defined as f(i)={f(i)f(i)mmf(i)=miibmm+1f(i)=mi=ibm.

Let x be an optimal solution to f(LP). For Cf(C), let g(C):={f(D):Df1(C)}. Note that for any Cf(C), we have 1|g(C)|2. We will define a vector y, and show that it's a solution to f(LP). We will also show that for any Cf(C), Dg(C)yD=xC. This will imply opt(f(LP))sum(y)=sum(x)=opt(f(LP)).

Let im1 and Dg(C). Then f(T)[i,D]=f(T)[i,C]. Hence, (f(T)y)i=Df(C)f(T)[i,D]yD=Cf(C)Dg(C)f(T)[i,D]yD=Cf(C)f(T)[i,C]Dg(C)yD=Cf(C)f(T)[i,C]xC=(f(T)x)i1. Therefore, y satisfies the first m1 constraints of f(LP).

Let S:={Cf(C):f(T)[m,C]1}, i.e, S is the set of configurations containing at least one item of type m. Order the configurations in S in decreasing order of number of items of type m (f(T)[m,C]). Let C1,C2,,Cp be the resulting configurations. We know that f(T)[m,C]bm, so bmCf(C)f(T)[m,C]xCj=1pbmxCjj=1pxCj1. Let k be the smallest number such that j=1kxCj1. Let k be the largest number such that f(T)[m,Cj]=bm.

Case 1: kk: Let yD:={xCjDg(Cj) and jk and f(T)[m+1,D]=10Dg(Cj) and jk and f(T)[m+1,D]=00Dg(Cj) and j>k and f(T)[m+1,D]=1xCjDg(Cj) and j>k and f(T)[m+1,D]=0xCDg(C) and CS. When j>k, Dg(Cj) such that f(T)[m+1,D]=0. This implies that for any Cf(C), we have Dg(C)yD=xC.

(f(T)y)m+1=Df(C)f(T)[m,D]yD=j=1kxCjj=1kxCj1. For CS, let g1(C) be the unique configuration Dg(C) such that f(T)[m+1,D]=1. Then (f(T)y)m=Df(C)f(T)[m,D]yDj=1kf(T)[m,g1(Cj)]xCj=j=1k(bm1)xCj(bm1)j=1kxCj(bm1). Therefore, y is feasible for f(LP).

Case 2: k>k: Hence, f(T)[m,Ck]bm1. yD:={xCjDg(Cj) and j<k and f(T)[m+1,D]=10Dg(Cj) and j<k and f(T)[m+1,D]=01j=1k1xCjDg(Ck) and f(T)[m+1,D]=1xCk1+j=1k1xCjDg(Ck) and f(T)[m+1,D]=00Dg(Cj) and j>k and f(T)[m+1,D]=1xCjDg(Cj) and j>k and f(T)[m+1,D]=0xCDg(C) and CS. When jk>k, Dg(Cj) such that f(T)[m+1,D]=0. This implies that for any Cf(C), we have Dg(C)yD=xC.

(f(T)y)m+1=Df(C)f(T)[m,D]yD=1. Let nj:=f(T)[m,Cj] and zj:=xCj. Then (f(T)y)m=Df(C)f(T)[m,D]yD=j=1k1(nj1)zj+(nk1)(1j=1k1zj)+nk(zk1+j=1k1zj)+j=k+1pnjzj=j=1pnjzj1=j=1pf(T)[m,Cj]xCj1=(f(T)x)m1bm1. Therefore, y is feasible for f(LP).

Dependency for:

  1. 1BP: Karmarkar-Karp algorithm (broken)

Info:

Transitive dependencies:

  1. Bin packing and Knapsack
  2. Bin packing: configuration LP