 # Local search breaks 1.75 for Graph Balancing

Graph Balancing is the problem of orienting the edges of a weighted multigraph so as to minimize the maximum weighted in-degree. Since the introduction of the problem the best algorithm known achieves an approximation ratio of 1.75 and it is based on rounding a linear program with this exact integrality gap. It is also known that there is no (1.5 - ϵ)-approximation algorithm, unless P=NP. Can we do better than 1.75? We prove that a different LP formulation, the configuration LP, has a strictly smaller integrality gap. Graph Balancing was the last one in a group of related problems from literature, for which it was open whether the configuration LP is stronger than previous, simple LP relaxations. We base our proof on a local search approach that has been applied successfully to the more general Restricted Assignment problem, which in turn is a prominent special case of makespan minimization on unrelated machines. With a number of technical novelties we are able to obtain a bound of 1.749 for the case of Graph Balancing. It is not clear whether the local search algorithm we present terminates in polynomial time, which means that the bound is non-constructive. However, it is a strong evidence that a better approximation algorithm is possible using the configuration LP and it allows the optimum to be estimated within a factor better than 1.75. A particularly interesting aspect of our techniques is the way we handle small edges in the local search. We manage to exploit the configuration constraints enforced on small edges in the LP. This may be of interest to other problems such as Restricted Assignment as well.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

In this paper we consider weighted, undirected multigraphs that may contain loops. We write such a multigraph as , where is the set of vertices, is the set of edge identities, and is a function that defines the endpoints for every edge. Note that in the definition above we allow , which describes a loop. is often defined as a set of vertex pairs. We use the function instead, since it avoids some issues due to multigraphs. The weight function assigns positive weights to the edges. In the Graph Balancing problem we want to compute an orientation of the edges, i.e., one of the ways to turn the graph into a directed graph. The goal is to minimize the maximum weighted in-degree over all vertices, that is

 maxv∈V∑e∈δ−(v)w(e),

where are the incoming edges of vertex in the resulting digraph. Apart from being an arguably natural problem, Graph Balancing has been of particular interest to the scheduling community. It is one of the simplest special cases of makespan minimization on unrelated machines for which an inapproximability bound of is known, which is already the best that is known in the general problem. In the interpretation as a scheduling problem, machines correspond to vertices and jobs to edges, i.e., each job has only two potential machines to which it can be assigned. The problem was introduced by Ebenlendr, Krcál, and Sgall . They gave a -approximation and showed that no -approximation is possible unless . Their algorithm rounds the solution of a particular linear programming formulation. This appears to be the best one can hope for using their techniques, since the ratio between integral optimum and fractional optimum of the LP, the integrality gap, can be arbitrarily close to  . Using a completely different approach to , Huang and Ott developed a purely combinatorial algorithm for the problem . With , however, their approximation ratio is inferior to the original algorithm. Another algorithm for Graph Balancing, developed by Wang and Sitters , achieves an approximation ratio of , i.e., also worse than the original, but notable for being simpler. For the special case of only two different edge weights, three independent groups found a tight -approximation [6, 9, 16].

A good candidate for a stronger linear program to that from  is the configuration LP. It was introduced by Bansal and Sviridenko for the more general problem Scheduling on Unrelated Machines and the closely related Santa Claus problem . It is easy to show that this LP is at least as strong as the LP from  (see the same paper), i.e., the integrality gap must be at most as well. The best lower bound known is (see for instance , this holds even for the case of Graph Balancing). In recent literature, the configuration LP has enabled breakthroughs in the restricted variants for both of the problems above [3, 18]. The restricted variant of Scheduling on Unrelated Machines (also known as Restricted Assignment) can be seen as Graph Balancing with hyperedges. In particular, it contains the Graph Balancing problem as a special case. In this setting, the configuration LP was shown first to have an integrality gap of at most  , which was improved to by us . This non-constructive proof is by a local search algorithm that is not known to terminate in polynomial time. In this paper, we present a sophisticated local search algorithm for Graph Balancing and obtain the following result.

###### Theorem 1.

The configuration LP has an integrality gap of at most in the Graph Balancing case.

In other words, it is stronger than the LP from . Although this does not give a polynomial time approximation algorithm, it is strong evidence that such an algorithm can be developed using the configuration LP. Furthermore, the optimal solution can be estimated in polynomial time within a factor of for any by solving the configuration LP with error . We emphasize that the purpose of this paper is to show a separation between the configuration LP and the previously used LP relaxation. The constants in the proof are not optimized. We chose to keep the case analysis (which is already difficult) and constants as simple as possible instead of improving the third decimal place. A summary of results regarding the configuration LP is given in Table 1. In fact, for all of the problems except for Graph Balancing it was known whether or not the configuration LP improves over the previous state-of-the-art.

Our work in  indicates that earlier bounds on the integrality gap of the configuration LP in related problems disregard many constraints enforced on small edges/jobs and that without them the LP might be much weaker. The backbone of our new proof is the utilization of these constraints. This approach appears to be relevant not only to Graph Balancing, but also to other related local search based proofs.

##### Other related work.

The problem of minimizing the maximum out-degree is equivalent to the maximum in-degree. The very similar problem of maximizing the minimum in- or out-degree has been settled by Wiese and Verschae . They gave a 2-approximation and this is the best possible assuming . Surprisingly, this holds even in the unrelated case when the value of an edge may be different on each end. They do not use the configuration LP, but it is easy to also get a bound of on its integrality gap using their ideas. For the restricted case (a special case of the unrelated one) this bound of was already proven by . We are not aware of any evidence that Graph Balancing is easier on simple graphs (without multiedges and loops). The same reduction for the state-of-the-art lower bound holds even in that case. A number of recent publications deal with the important question on how local search algorithms, similar to the ones we employ in this paper, can be turned into efficient algorithms [1, 2, 12, 17].

## 2 Preliminaries

##### Notation.

For some we will denote by the incident edges, i.e. those with . When a particular orientation is clear from the context, we will write for the incoming edges and for the outgoing edges of a vertex. For some we will denote by the incident edges of restricted to and , accordingly. For some we will describe by the vertex it is oriented towards and by the vertex it is leaving. For a loop , i.e., for some , it always holds that . For a subset of edges we will write for and similar for other functions over the edges.

##### The configuration LP.

A configuration is a subset of edges that can be oriented towards a particular vertex without exceeding a particular makespan . Formally, we define the configurations as

 C(v,τ):={C⊆δ(v):w(C)≤τ},v∈V,τ∈R.

The configuration LP has no objective function. Instead it is parameterized by , the makespan. The optimum of the configuration LP is the lowest for which it is feasible. It will be denoted by throughout the paper.
Primal of the configuration LP.

Although the configuration LP has exponential size, a -approximation can be computed in polynomial time for every  . We are particularly interested in the dual of the configuration LP. A common idea for proving is lower than the optimum is to show that the dual is unbounded for (instead of directly showing that the primal is infeasible for ).
Dual of the configuration LP.

###### Lemma 1.

If there exists and such that for all and , then .

This is easy to see, since is a feasible solution for the dual and so are the same values scaled by any . This way an arbitrarily low objective value can be obtained.

## 3 Graph Balancing in a special case

To introduce our techniques, we first consider a simplified case where for each and the configuration LP is feasible for . We will show that there exists an orientation with maximum weighted in-degree where . Note that our bound in the general case is slightly worse.

### 3.1 Algorithm

We will now describe the local search algorithm that is used to prove that there exists a solution of value .

###### Definition 1 (Tiny, small, big edges).

We call an edge tiny, if ; small, if ; and big, if . We will write for the tiny, small, and big edges , and , respectively.

In the special case we consider first, there is no edge with .

###### Definition 2 (Good and bad vertices).

For a given orientation, we call a vertex good, if . A vertex is bad, if it is not good.

The local search algorithm starts with an arbitrary orientation and flips edges until all vertices are good. During this process, a vertex that is already good will never be made bad.

The central data structure of the algorithm is an ordered list of pending flips . Here, every component , stands for an edge the algorithm wants to flip. If is clear from the context, we simply write flip when we speak of a pending flip . A tiny flip is a flip where is tiny. In the same way we define small and big flips. The target of a flip is the vertex to which we want to orient it towards. The algorithm will not perform the flip, if this would create a bad vertex, i.e., . If it does not create a bad vertex, we say that the flip is a valid flip. For every define , i.e., the first elements of (with being the empty list).

At each point during the execution of the algorithm, the vertices repel certain edges. This can be thought of as a binary relation between vertices and their incident edges, i.e., a subset of , and this relation changes dynamically as the current orientation or change. The definition of which vertices repel which edges is given in Section 3.2. The algorithm will only add a new pending flip to , if is repelled by the vertex it is oriented towards and not repelled by the other.

### 3.2 Repelled edges

Consider the current list of pending flips . The repelled edges are defined inductively. For some we will now define the repelled edges w.r.t. .

(initialization)

If , let every bad vertex repel every edge in . Furthermore, let every vertex repel every loop where .

(monotonicity)

If and repels w.r.t. , then let repel w.r.t. .

The rule on loops is only for a technical reasons. Loops will never appear in the list of pending flips. The remaining rules regard and the last pending flip in , . The algorithm should reduce the load on to make it valid.

Which edges exactly does repel? First, we define where if and only if is repelled by w.r.t. . We will omit when it is clear from the context. are edges that we do not expect to be able to flip: Recall that when an edge is repelled by , it cannot be added to . Moreover, for every define . We are interested in values such that

 w(δ−~E∪E≥W(s(ePk)))+w(ePk)>1+R. (1)

Let be maximal such that (1) holds. To be well-defined, we set , if no such exists. In that case, however, it holds that . This means that is valid and the algorithm will remove it from the list immediately. Hence, the case is not particularly interesting.

We define the following edges to be repelled by :

(uncritical)

If , let repel every edge in .

(critical)

If , let repel every edge in .

Note that in the cases above there is not a restriction to incoming edges like in (1).

###### Fact 1.

repels w.r.t. .

This is because of in the rules for . An important observation is that repelled edges are stable under the following operation.

###### Fact 2.

Let be an edge that is not repelled by any vertex w.r.t. , and possibly by (but not ) w.r.t. . If the orientation of changes and this does not affect the sets of good and bad vertices, the edges repelled by some vertex w.r.t. will still be repelled after the change.

###### Proof.

We first argue that the repelled edges w.r.t. , have not changed. This argument is by induction. Since the good and bad vertices do not change, the edges repelled w.r.t. do not change. Let and assume that the edges repelled w.r.t. have not changed. Moreover, let be as in the definition of repelled edges w.r.t. before the change. We have to understand that is not and was not in (with )). This means that flipping it does not affect the choice of and, in particular, not the repelled edges. Let and denote the vertex is oriented towards before the flip and after the flip, respectively. Since was not repelled by and w.r.t. , it holds that or : repelled all edges greater or equal in both the case (uncritial) and (critical), but was not repelled by or .

Therefore before and after the change. Moreover, since was not repelled by any vertex w.r.t. (and by induction hypothesis, it still is not), it follows that . By this induction we have that edges repelled w.r.t. have not changed and by the same argument as before, is not in after the change. This means has not increased and edges repelled w.r.t. are still repelled. It could be that decreases, if was in before the flip. This would mean that the number of edges repelled by increases. ∎

We note that (in the definition of ) is either equal to or it is the maximal value for which (1) holds. Furthermore,

###### Fact 3.

Let be as in the definition of repelled edges w.r.t. . If , then there is an edge of weight exactly in . Furthermore, it is not a loop and it is not repelled by its other vertex, i.e., not , w.r.t. .

###### Proof.

We prove this for . Since the change from to only affects , this suffices. All edges that are repelled by their other vertex w.r.t. (in particular, loops) are in . Recall that . Assume toward contradiction there is no edge of weight in , which is not in . This means there is some such that . Hence, is not maximal. ∎

### 3.3 Analysis

The following analysis holds for the values and . is a central parameter in the proof. These can be slightly improved, but we refrain from this for the sake of simplicity. The proof consists of two parts. We need to show that the algorithm terminates and that there is always either a valid flip in or some edge can be added to .

###### Lemma 2.

The algorithm terminates after finitely many iterations of the main loop.

###### Proof.

We consider the potential function

 s(P)=(g,|~E(P≤0)|,…,|~E(P≤ℓ)|,−1),

where

is the number of good vertices. We will argue that this vector increases lexicographically after every iteration of the main loop. Intuitively

, , is an measure for progress. When an edge is repelled by a vertex , then we want that . counts exactly these situations. Since is bounded by , there can be at most possible values for the vector. Thus, the algorithm must terminate after at most this many iterations. In an iteration either a new flip is added to or a flip is executed.

If a flip is added as the -th element of , then clearly does not change for . Furthermore, the last component of the vector is replaced by some non-negative value.

Now consider a flip that is executed. If this flip turns a bad vertex good, we are done. Hence, assume otherwise and let and be the vertex it was previously and the one it is now oriented towards. Furthermore, let be the length of after the flip. Recall that was chosen such that before the flip is executed repels w.r.t. , but not w.r.t. for any . Also, is not repelled by w.r.t. for any or else the flip would not have been added to in the first place. By Fact 2 this means that repelled edges w.r.t. , , are still repelled after the flip. Because of this and because the only edge that changed direction, , is not in for any , has not decreased. Finally, has not been in before the flip, but now is. Thus, the first components of the vector have not decreased and the -th one has increased. ∎

###### Lemma 3.

If there at least one bad vertex remaining, then there is either a valid flip in or a flip that can be added to .

###### Proof.

We assume toward contradiction that there exists a bad vertex, no valid pending flip and no edge that can be added to . We will show that this implies .

Like above we denote by those edges that are repelled by . In particular, if an edge is in or repelled by it must also be in : If such an edge is in , this follows from Fact 1. Otherwise, such an edge must be repelled also by or else it could be added to . For every , set . For every , set

 ze=⎧⎪⎨⎪⎩1 if w(e)=1,w(e) if 1−R

In general, we would like to set each to (or equivalently, ). However, there are two kinds of amortization between vertices that we include in the values of .

As can be seen in the definition of repelled edges, a vertex repels either edges with weight at least a certain threshold and edges in that are repelled by their other vertex; or they repel all edges. We will call vertices of the latter kind critical. In other words, a vertex is critical, if in the inductive definition of repelled edges at some point and the rule (critical) applies. There might be a coincidence where only rule (uncritical) applies for , but this already covers all edges in . This is not a critical vertex. We note that every vertex that is target of a tiny flip must be critical: In the inductive definition when considering we have that by definition.

Critical vertex amortization.

If is a good vertex and critical, but is not a target of a tiny flip, set . If is a good vertex and target of tiny flip (in particular, is critical), set . Otherwise, set .

Big edge amortization.

Let denote the set of big flips. Then in particular (Fact 1). We define for all , .

We conclude the definition of by setting for all good vertices and for all bad vertices , where is some sufficiently small constant.

It holds that .

###### Claim 2.

f.a. and f.a. , , .

By Lemma 1 this implies that . ∎

###### Proof of Claim 1.

First we note that

 ∑v∈Vbv=(1−R)(∑v∈V|δ+F(v)|−∑v∈V|δ−F(v)|)=0=0

Moreover, we have that : This is because at least half of all good vertices that are critical are targets of tiny flips. When a vertex is critical but not target of a tiny flip, there must be a non-tiny flip with such that in the definition of repelled edges for we have . By Fact 3 there exists an edge of weight (hence, tiny) in which is not repelled by its other vertex w.r.t. . We argue later that this edge has already been in when the list of pending flips has consisted only of the flips in . Since a tiny flip will always be added before the next non-tiny flip (edges of minimal weight are chosen), we know that must be a tiny flip and is the target of a tiny flip. Also note that no vertex can be target of two tiny flips, since after adding one such flip the vertex repels all edges.

The reason why the edge has already been in is the following. When an edge is flipped towards and it is repelled by w.r.t. , then must have been a flip in earlier in the list than . This means that at least are removed from . Because is still in , we can therefore assume that this has not happened. If in the definition of the repelled edges w.r.t. has not decreased since the last time the list consisted only of , we are done, since this would mean the edge of weight has been repelled by all this time and could not have been added to . This is indeed the case. can only decrease when an edge from is flipped. This, on the other hand, causes at least to be removed from . This finished the proof of . We conclude,

 ∑e∈Eze≥∑v∈V∑e∈δ−(v)ze+∑v∈V[bv+av]≤0>∑v∈Vyv,

where the strict inequality holds because of the definition of and because there exists at least one bad vertex. ∎

###### Proof of Claim 2.

Let and . We need to show that . Obviously the values are non-negative. By showing the inequality above, we also get that the values are non-negative. First, we will state some auxiliary facts.

###### Fact 4.

For every edge flip , we have .

This is due to the fact that is not a valid flip and by definition of repelled edges.

###### Fact 5.

If is a good vertex and not target of a tiny pending flip, then . In other words, it is sufficient to show that .

If is critical, then . If is uncritical, all edges with must be in . Otherwise, the flip could be added to . Therefore,

 yv=z(δ−(v))+av+bv≥z(δ−~E(v))−w(δ−~E(v))+w(δ−~E(v))+bv≥z(~C)−w(~C)+w(δ−~E(v))+bv≥z(C)+w(δ−~E(v))−1+bv.
###### Fact 6.

For every vertex it holds that (1) repels no edges, (2) repels all edges (critical), or (3) there exists a threshold such that repels edges if or they are also repelled by .

Furthermore, in (3) we have that or and (see Fact 3).

##### Case 1: v is a bad vertex.

If ,

 yv≥z(δ−(v))−|δ−F(v)|⋅(1−R)−μ≥|δ−F(v)|⋅(1−(1−R))−μ≥2R−μ≥β≥z(C).

Otherwise, and therefore

 yv≥z(δ−(v))−1+R−μ≥w(δ−(v))−1+R−μ>1+R−1+R−μ=2R−μ≥β≥z(C).

Here we use that by the definition of a bad vertex. Assume for the remainder that is a good vertex, in particular that .

##### Case 2: v is good and target of a tiny flip.

Using Fact 4 and we obtain

 yv≥z(δ−(v))−(β−1)−(1−R)≥w(δ−~E(v))−(β−1)−(1−R)≥1+R−(1−R)+R−β=β+3R−2β≥0≥z(C)
##### Case 3: v is good, not target of a tiny flip, but target of a small flip.

If , again with Fact 4 we get

 w(δ−~E(v))+bv≥1+R−0.5+0>1.

This suffices because of Fact 5. Moreover, if and contains a small edge, it holds that

 w(δ−~E(v))+bv≥w(δ−F(v))+(1−R)+bv≥1+(1−R)−(1−R)=1.

Here we use that the small edge must have a size of at least . The case that remains is where contains one edge from and tiny edges. We let denote the size of the smallest edge with a pending flip towards . If is critical,

 yv≥z(δ−(v))−(1−R)+(β−1)≥1+β(R−0.5)−(1−R)+(β−1)=β+β(R−0.5)+R−1≥z(C).

Notice that by choice of and . Assume for the remainder of this case that is uncritical. If contains a big edge, then this must be the only element in . Therefore,

 yv≥z(δ−(v))−(1−R)≥1+β(R−0.5)−(1−R)≥1=z(C).

Consider the case where contains at most one small edge and no big edge. Since is uncritical, all tiny edges in with positive value must also be in . Thus,

 yv≥z(δ−(v))−(1−R)≥1+z(δ−T(v))−(1−R)≥0.5+z(δ−T(v))≥z(C).

In the equation above, is used for the tiny edges. Finally, if contains small edges, then these edges must be of size at least . Therefore,

 yv≥z(δ−(v))−(1−R)≥z(δ−F(v))+β(w(δ−~E(v))−w(δ−F(v)))−(1−R)=R+β(w(δ−~E(v))−1)≥R+β(R−s).

Note that and, by choice of , . It follows that

##### Case 4: v is good and not target of a small/tiny flip.

If , then does not repel any edges. In particular, and every with must be in . Therefore, . We assume in the remainder that .

If , we get . Otherwise, it must hold that and . ∎

## 4 Graph Balancing in the general case

We can still assume w.l.o.g. that and therefore for every . If this does not hold, we can simply scale every edge weight by . We extend the definition of tiny, small, and big edges, but this time we set the threshold for tiny edges slightly higher than in the simple variant:

###### Definition 3 (Tiny, small, big edges).

We call an edge tiny, if ; small, if ; and big, if . We will write for the tiny, small, and big edges , and , respectively.

At first glance one might think that the algorithm and analysis for the simple case easily extends to the general case. However, there are serious issues to resolve. We will start by giving an informal overview of the issues arising from different big edge sizes. Suppose we leave the algorithm as it is and try to get a contradiction via the dual of the configuration LP. A straight-forward choice of the edge variables would be

 ze={w(e) if e is big or small andβw(e) if e is tiny.

This immediately fails: Consider some path of edges that have different big sizes, see e.g. Figure 1. With the configuration consisting only of the -edge would be too large for .

Within such a path it seems that all big edges must have the same -value. Also, it is easy to see that the analysis in the simple case breaks when choosing a value significantly smaller than . Hence, another sensible choice of edge variables would be

 ze=⎧⎨⎩1 if e is big,w(e) if e is small, andβw(e) if e is tiny.

Unfortunately, this also fails. Consider a vertex that has two incoming big edges and , with weight and with weight . Suppose this vertex is target of a small edge flip of size . Then there is a configuration of value consisting of and . This is too big for , since . It seems like we need some trade-off between the cases. When a situation occurs where a big edge is compatible with a small edge, we would like to fall back to the first choice of the variables (at least for this particular edge). In the upcoming proof we introduce an edge set that corresponds to these problematic big edges. The precise choice of the variables is highly non-trivial and in order to make it work, we also construct a more sophisticated algorithm.

As before the algorithm maintains a list of pending flips . Unlike before, however, This list contains two different types of flips. A pending flip may be regular or raw. We write and , respectively. In the simple case, each edge could only appear once in . This is slightly relaxed here. An edge may appear once as a raw pending flip and later again as a regular pending flip . Regular pending flips behave similarly to the pending flips in the simple variant. Raw pending flips are used in some cases when we want to repel only big edges on the target machine, although by the behavior of regular flips non-big edges could also be repelled. As indicated in the example above, it is sometimes very helpful, if a big edge cannot be combined with non-big edges. Indeed, when we can avoid that a vertex repels small edges, then this means we do not have to worry about such combinations.

### 4.1 Repelled edges

The repelled edges are again defined inductively for Consider the list of pending flips and some .

(initialization)

If , let every bad vertex repel every edge w.r.t. . Furthermore, let every vertex repel every loop from , i.e., every with .

(monotonicity)

If and repels w.r.t. , then let also repel w.r.t. .

The remaining rules regard and , the last pending flip in , and we distinguish between raw and regular pending flips.

(raw)

If , then let repel all big edges in and edges in of weight at least .

From here on we will consider the case where . Let denote all edges that are repelled by w.r.t. . Furthermore, we define . Let denote the maximal with

 w(δ−~E∪E≥W(s(ePk)))+w(ePk)>1+R. (2)

For technical reasons we define if no such exists (this is an uninteresting corner case where ).

(uncritical)

If and , then let repel .

(critical)

If and , then let repel all edges in .

Next we will derive similar facts as we did for the simple case before.

###### Fact 7.

Let be a pending flip. Then repels w.r.t. .

If , this is by rule (raw). Otherwise, it follows from .

###### Fact 8.

Let be an edge that is not repelled by any vertex w.r.t. , and possibly by (but not ) w.r.t. . If the orientation of changes and this does not affect the sets of good and bad vertices, the edges repelled by some vertex w.r.t. will still be repelled after the change.

The proof is very similar to the one in the simple case.

###### Proof.

We first argue that the repelled edges w.r.t. , have not changed. This argument is by induction. Since the good and bad vertices do not change, the edges repelled w.r.t. do not change. Let and assume that the edges repelled w.r.t. have not changed. If , it is trivial that repelled edges w.r.t. have not changed. Hence, assume that . Let be as in the definition of repelled edges w.r.t. before the change. We have to understand that is not and was not in