Faster Graph Coloring in Polynomial Space

We present a polynomial-space algorithm that computes the number independent sets of any input graph in time $O(1.1387^n)$ for graphs with maximum degree 3 and in time $O(1.2355^n)$ for general graphs, where n is the number of vertices. Together with the inclusion-exclusion approach of Bj\"orklund, Husfeldt, and Koivisto [SIAM J. Comput. 2009], this leads to a faster polynomial-space algorithm for the graph coloring problem with running time $O(2.2355^n)$. As a byproduct, we also obtain an exponential-space $O(1.2330^n)$ time algorithm for counting independent sets. Our main algorithm counts independent sets in graphs with maximum degree 3 and no vertex with three neighbors of degree 3. This polynomial-space algorithm is analyzed using the recently introduced Separate, Measure and Conquer approach [Gaspers&Sorkin, ICALP 2015]. Using Wahlstr\"om's compound measure approach, this improvement in running time for small degree graphs is then bootstrapped to larger degrees, giving the improvement for general graphs. Combining both approaches leads to some inflexibility in choosing vertices to branch on for the small-degree cases, which we counter by structural graph properties.


Introduction
Graph coloring is a central problem in discrete mathematics and computer science.In exponential time algorithmics [16], graph coloring is among the most well studied problems, and it is an archetypical partitioning problem.Given a graph G and an integer k, the problem is to determine whether the vertex set of G can be partitioned into k independent sets.Already in 1976, Lawler [25] designed a dynamic programming algorithm for graph coloring and upper bounded its running time by O(2.4423 n ), where n is the number of vertices of the input graph.This was the best running time for graph coloring for 25 years, when Eppstein [10,11] improved the running time to O(2.4150 n ) by using better bounds on the number of small maximal independent sets in a graph.Based on bounds on the number of maximal induced bipartite subgraphs and refined bounds on the number of size-constrained maximal independent sets, Byskov [7] improved the running time to O(2.4023 n ).An algorithm based on fast matrix multiplication by Björklund and Husfeldt [3] improved the running time to O(2.3236 n ).The current fastest algorithm for graph coloring, by Björklund et al. [2,4,24], is based on the principle of inclusion-exclusion and Yates' algorithm for the fast zeta transform.This breakthrough algorithm solves graph coloring in O * (2 n ) time, where the O * -notation is similar to the O-notation but ignores polynomial factors.
A significant drawback of the aforementioned algorithms is that they use exponential space.Often, the space bound is the same as the time bound, up to polynomial factors.This is undesirable [30], certainly for modern computing devices.Polynomial-space algorithms for graph coloring have been studied extensively as well with successive running times O * (n!) [8], O((k/e) n ) (randomized) [12], O((2 + log k) n ) [1], O(5.283 n ) [6], O(2.4423 n ) [3], and O(2.2461 n ) [4].The latter algorithm is an inclusionexclusion algorithm relying on a O(1.2461 n ) time algorithm [17] for computing the number of independent sets in a graph.Their method transforms any polynomial-space O(c n ) time algorithm for counting independent sets into a polynomial space O((1 + c) n ) time algorithm for graph coloring.The running time bound for counting independent sets was subsequently improved by Fomin et al. [13] to O(1.2431 n ) and by Wahlström [29] to O(1.2377 n ).Wahlström's algorithm is the current fastest published algorithm for counting independent sets of a graph, it uses polynomial space, and it works for the more general problem of computing the number of maximum-weight satisfying assignments of a 2-CNF formula.For a reduction from counting independent sets to counting maximum-weight satisfying assignments of a 2-CNF formula where the number of variables equals the number of vertices, see [9].
We note that Junosza-Szaniawski and Tuczynski [23] present an algorithm for counting independent sets with running time O(1.2369 n ) in a technical report that also strives to disconnect low-degree graphs.For graphs with maximum degree 3 that have no degree-3 vertex with all neighbors of degree 3, they present a new algorithm with running time 2 n3/5+o (n) , where n 3 is the number of degree-3 vertices, and the overall running time improvement comes from plugging this result into Wahlström's [29] previously fastest algorithm for the problem.However, we note that the 2 n3/5+o(n) running time for counting independent sets can easily be obtained from previous results.Namely, the problem of counting independent sets is a polynomial PCSP with domain size 2, as shown in [27], and the algorithm of [20] for polynomial PCSPs preprocesses all degree-2 vertices, leaving a cubic graph on n 3 vertices that is solved in 2 n/5+o(n) time.Improving on this bound is challenging, and degree-3 vertices with all neighbors of degree 2 need special attention since branching on them affects the degree-3 vertices of the graph exactly the same way as for the much more general polynomial PCSP problem, whereas for other degree-3 vertices one can take advantage of the asymmetric nature of the typical independent set branching (i.e., we can delete the neighbors when counting the independent sets containing the vertex we branch on).
Our Results.We present a polynomial-space algorithm computing the number of independent sets of any input graph G in time O(1.2356 n ), where n is the number of vertices of G. Our algorithm is a branching algorithm that works initially similarly as Wahlström's algorithm, where we slightly improve the analysis using potentials (as, e.g., in [19,22,28]) to amortize some of the worst branching cases with better ones.This algorithm uses a branching strategy that basically ensures that both the maximum degree and the average degree of the graph do not increase.This makes it possible to divide the analysis of the algorithm into sections depending on what local structures can still occur in the graph, use a separate measure for the analysis of each section, and combine these measures giving a compound (piecewise linear) measure for the analysis of the overall algorithm.
For instances where the maximum degree is 3 and no vertex has three neighbors with degree 3, we substitute a subroutine that is designed and analyzed using the recently introduced Separate, Measure and Conquer technique [20].It computes a small balanced separator of the graph and prefers to branch on vertices in the separator, adjusting the separator as needed by the analysis, and reaping a huge benefit when the separator is exhausted and the resulting connected components can be handled independently.The Separate, Measure and Conquer technique helps to amortize this sudden gain with the analysis of the previous branchings, for an overall improvement of the running time.
Since using a separator restricts our choice in the vertices to branch on, we use the structure of the graph and its separation to upper bound the number of unfavorable branching situations and adapt our measure accordingly.Namely, the algorithm avoids branching on degree-3 vertices in the separator with all neighbors of degree 2 as long as possible, often rearranging the separator to avoid this case.In our analysis we can then upper bound the number of unfavorable branchings and give the central vertex involved in such a branching a special weight and role in the analysis.We call these vertices spider vertices.Our meticulous analysis of this subroutine upper bounds its running time by O(1.0963 n ).For graphs with maximum degree at most 3, we obtain a running time of O(1.1389 n ).This improvement for small degree graphs is bootstrapped, using Wahlström's compound measure analysis, to larger degrees, and gives a running time improvement to O(1.2356 n ) for counting independent sets of arbitrary graphs and to O(2.2356 n ) for graph coloring.Bootstrapping an exponential-space pathwidth-based O(1.1225 n ) time algorithm [15] for cubic graphs instead, we obtain an exponential-space algorithm for counting independent sets with running time O(1.2330 n ).Some proofs have been moved to the appendix due to space constraints.

Methods
Measure and Conquer.The analysis of our algorithm is based on the Measure and Conquer method [14].A measure for a problem (or its instances) is a function from the set of all instances of the problem to the set of non-negative reals.Modern branching analyses often use a potential function as measure that gives a more fine-grained way of tracking the progress of a branching algorithm than a measure that is merely the number of vertices or edges of the graph.The following lemma is at the heart of our analysis.It generalizes a similar lemma from [19] to the treatment of subroutines.

Lemma 1 ([18]
).Let A be an algorithm for a problem P , B be an algorithm for a class C of instances of P , c ≥ 0 and r > 1 be constants, and µ(•), µ B (•), η(•) be measures for P , such that for any input instance I from C, µ B (I) ≤ µ(I), and for any input instance I, A either solves P on I ∈ C by invoking B with running time O(η(I) c+1 r µB (I) ), or reduces I to k instances I 1 , . . ., I k , solves these recursively, and combines their solutions to solve I, using time O(η(I) c ) for the reduction and combination steps (but not the recursive solves), Then A solves any instance I in time O(η(I) c+1 r µ(I) ).
When Algorithm A does not invoke Algorithm B, we have the usual Measure and Conquer analysis.
Here, µ is used to upper bound the number of leaves of the search tree and deserves the most attention, while η is usually a polynomial measure to upper bound the depth of the search tree.For handling subroutines, it is crucial that the measure does not increase when Algorithm A hands over the instance to Algorithm B and we constrain that µ B (I) ≤ µ(I).
Compound analysis.We can view Wahlström's compound analysis [29] as a repeated application of Lemma 1.For example, there is one subroutine A 3 for when the maximum degree of the graph is 3.The algorithm prefers then to branch on a degree-3 vertex with all neighbors of degree 3.After all such vertices have been exhausted, the algorithm calls a new subroutine A 8/3 that takes as input a graph with maximum degree 3 where no degree-3 vertex has only degree 3 neighbors.In this case the average degree of the graph is at most 8 /3, and the algorithm prefers to branch on vertices of degree 3 that have 2 neighbors of degree 3, etc.The analysis constrains that the measure for the analysis of A 8/3 is at most the measure for A 3 for the instance that is handed by A 3 to A 8/3 .In an optimal analysis, we expect the measure for such an instance to be equal in the analysis of A 3 and A 8/3 , and Wahlström actually imposes equality at the pivot point 8 /3.
Separate, Measure and Conquer.In our case, the A 8/3 algorithm is based on Separate, Measure and Conquer.For small-degree graphs, we can compute small balanced separators in polynomial time.The algorithm then prefers to branch on vertices in the separator.The Separate, Measure and Conquer technique allows to distribute the large gain obtained by disconnecting the instance onto the previous branching vectors.While, often, the measure is made up of weights that are assigned to each vertex, this method assigns these weights only to the larger part of the graph that is separated from the rest by the separator, and somewhat larger weights to the vertices in the separator.See (4) on page 7. Thus, after exhausting the separator, the measure accurately reflects the "amount of work" left to do.We artificially increase the measure of very balanced instances by small penalty weights -this is so because branching on vertices can change the measure of the parts that are separated by the separator and the branching strategy might not always be able to make most of its progress on the large side.Since we may exhaust the separators a logarithmic number of times, and computing a new separator might introduce a penalty term each time, the measure also includes a logarithmic term that counteracts these artificial increases in measure, and will in the end only contribute a polynomial factor to the running time.For an in-depth treatment of the method we refer to [20].Since we use the Separate, Measure and Conquer method when the average degree drops to at most 8 /3, we slightly generalize the separation computation from [20], where the bound on the size of the separator depended only on the maximum degree.A separation (L, S, R) of a graph G is a partition of the vertex set of G such that every path from a vertex in L to a vertex in R contains a vertex from S. Lemma 2. Let B ∈ R. Let µ be a measure for graph problems such that for every graph G = (V, E), every R ⊆ V , and every v ∈ V , we have that |µ(R ∪ {v}) − µ(R)| ≤ B. Assume that µ(R), the restriction of µ to R, can be computed in polynomial time.If there is an algorithm computing a path decomposition of width at most k of a graph G in polynomial time, then there is a polynomial time algorithm computing a separation (L, S, R) of G with |S| ≤ k and |µ(L) − µ(R)| ≤ B.
We will use the lemma for graphs with maximum degree 3 and graphs with maximum degree 3 and average degree at most 8 /3, for which path decompositions of width at most n /6 + o(n) and n /9 + o(n) can be computed in polynomial time, respectively [13,15].One disadvantage of using the Separate, Measure and Conquer method for A 8/3 is that the algorithm needs to choose vertices for branching so that the size of the separator decreases in each branch.However, Wahlström's algorithm defers to branch on degree-3 vertices with all neighbors of degree 2 until this is no longer possible, since this case leads to the largest branching factor for degree 3.For our approach, we instead rearrange the separator in some cases until we are only left with spider vertices, a structure where our algorithm cannot avoid branching on a degree-3 vertex with all neighbors of degree 2, we give a special weight to these spider vertices and upper bound their number.
Potentials.To optimize the running time further, we also use potentials; see [19,22,28].These are constant weights that are added to the measure if certain global properties of the instance hold.For instance, we may use them to slightly increase the measure when an unfavorable branching strategy needs to be used.The constraint (2) for this unfavorable case then becomes less constraining, while all branchings that can lead to this unfavorable case get tighter constraints.This allows then to amortize unfavorable cases with favorable ones.

Algorithm
We first introduce notation necessary to present the algorithm.Let V (G) and E(G) denote the vertex set and the edge set of the input graph G.
The degree of v is denoted For two vertices u and v connected by a path, let P ⊂ V (G) with u, v ∈ P be the intermediate vertices between u and v on the path.If P consists only of degree-2 vertices then we call P a 2-path of u and v.
The maximum degree of G is denoted ∆(G) and of G is a partition of its vertex set into the three sets L, S, R such that no vertex in L is adjacent to any vertex in R. The sets L, S, R are also known as the left set, separator, and right set.Using a similar notion to [20], a separation (L, S, R) of G is balanced with respect to some measure µ, and a branching constant By convention, µ(R) ≥ µ(L) otherwise, we swap L and R. We use the measure µ r defined on page 7 to compute the separation in our algorithm.We will now describe the algorithm #IS which takes as input a graph G, a separation (L, S, R), and a cardinality function c : {0, 1} × V (G) → N, and computes the number of independent sets of G weighted by the cardinality function c.For clarity, let where 1(•) is an indicator function which returns 1 if its arguments is true and 0 otherwise.Note that for a cardinality function G, c) is the number of independent sets of G. Cardinality functions are used for bookkeeping during the branching process and have been used in this line of work before.The separation (L, S, R) is initialized to (∅, ∅, V (G)) and will only come into play when G is subcubic and has no (3,3,3)-vertex.In this case, the algorithm calls a subroutine #3IS, which constitutes the main contribution of this paper.#3IS computes a balanced separation of G, preferring to branch on vertices in the separator, readjusting the separator as needed, and is analyzed using the Separate, Measure and Conquer method.
Skeleton Graph.The skeleton graph Γ(G), or just Γ, of a subcubic graph G is a graph where the degree-3 vertices of G are in bijection with the vertices in Γ.Two vertices in Γ are adjacent if the corresponding vertices are adjacent in G, or there exists a 2-path between the corresponding vertices in G.If G has a separation (L, S, R) then denote (L Γ , S Γ , R Γ ) to be the same separation of G in Γ consisting of only degree-3 vertices.Dragging refers to moving vertices or a set of vertices of G from one component of (L, S, R) to another, creating a new separation (L ′ , S ′ , R ′ ) such that S ′ is still a separator of G. Spider Vertices.As Wahlström's [29] analysis showed, an unfavorable branching case occurs on vertices of degree 3 which have neighbors of degree (2,2,2).Due to our algorithm's handling of these vertices we narrowed down the undesirable vertices called spider vertices down to a specific list of properties.If s is a spider vertex then: • Either: -|N Γ (s) ∩ L| = 2 and N Γ (s) ∩ R = {r} with r having neighbors of degree (2,2,2).In this case we call s a left spider vertex and N Γ (s) ∩ L = {l} with l having neighbors of degree (2,2,2).In this case we call s a right spider vertex . In this case we call both s and s ′ a center spider vertex, which occur in pairs.
A left spider vertex s ∈ S can be dragged to the left along with the 2-path from s to r.If this were ever to occur, then r would be a right spider vertex, and vice versa.Multiplier Reduction.We use a reduction called multiplier reduction to simplify graphs that have a cut vertex efficiently.Suppose G has a separation ( The multiplier reduction can be applied to compute #IS(G, (L, S, R), c) as follows.
1. Let: Since G 1 has a measure of constant size, both steps 1 and 2 take polynomial time.
Lazy 2-separator.Suppose there is a vertex x initially chosen to branch on as well as two vertices {y, z} ⊂ V (G) with d(y) ≥ 3 and d(z) ≥ 3 such that {y, z} is a separator which separates x from G in a constant measure subgraph.We call such vertices lazy 2-separators, for a vertex x.Similar to Walhström's elimination of separators of size 2 in [28], in line 15 of #IS instead of branching on x, if there exists a lazy 2-separator {y, z} for x we branch on y.A multiplier reduction will be performed on z in the recursive calls.Prioritizing lazy 2-separators allows to exclude some unfavorable cases when branching on x. ( By selecting vertices with high associated average degree, our algorithm prioritizes branching on vertices with larger decreases in measure.Branching.We now outline the branching routine used to recursively solve smaller instances of the problem.Suppose we have a graph G, a separation (L, S, R), and a cardinality function c.For a vertex x we denote the following steps as branching on x.

Running Time Analysis
This section describes the running time analysis for #IS and #3IS, conducted via compound measures.Constraints are presented as branching vectors (δ 1 , δ 2 ) which equates to the constraints 2 −δ1 + 2 −δ2 ≤ 1.
We first describe some special vertex weights.

Measures
Measure with no (3,3,3) vertex.When using the Separate, Measure and Conquer technique from [20] the measure of a cubic graph instance G with no (3,3,3) vertices consists of additive components µ s and µ r , the measure of vertices in the separator, and those in either L or R, respectively.Let S ′ ⊆ S be the set of all spider vertices, s i and r i refer to the weight attributed to a separator vertex and a right vertex, in R or L, respectively, of degree i. Left and right spider vertices have weight s ′ 3 .In a center spider vertex pair s and s ′ , one of them has weight s ′ 3 while the other takes on an ordinary weight of s 3 .These structurally applied weights allows amortization of the spider vertex cases against non-spider vertices.Define the measure µ 8/3 as where We also require that s i ≥ s i−1 and r i ≥ r i−1 for i ∈ {1, 2, 3}.The constant B is larger than the maximum change in imbalance in each transformation in the analysis, except the separation transformation.
Lemma 3.For a balanced separation (L, S, R) of a graph G with average degree d = d(G), an upper bound for the measure µ 8/3 is: For l ∈ (N Γ (s) ∩ L), let A l = (N Γ (l) ∩ S), let P (s,l) be the 2-path from s to l, and for a ∈ A l let P (l,a) ⊂ V (G) be the 2-path from l to a. 15 , let P (s,r) be the 2-path from s to r, and for a ∈ A r let P (r,a) ⊂ V (G) be the 2-path from r to a. which is maximised when d = 8 3 with the value General Measure.
In order to analyze higher degree cases, we use a measure of the form for each part of the compound measure.The term µ o (L, S, R) is the same sub-linear term from the Separate, Measure and Conquer analysis on cubic graphs which needs to be propagated into the higher degree analyses.

Degree 3 Analysis
#IS can be solved in polynomial time when ∆(G) ≤ 2 [26].However, stepping up to cubic graphs is a much harder problem.Greenhill [21] proves that counting independent sets is actually a #P-hard problem even for graphs with maximum degree 3.    Proof sketch.We present a sketch of the proof, emphasizing the tight constraints generated from #3IS, simplify and spider.A complete analysis will be deferred until the appendix.As suggested in [20], each case will provide constraints that the weights described above will need to satisfy.Some trivial constraints we must satisfy are r 0 = r 1 = s 0 = s 1 = 0 since these vertices can easily be eliminated and require no branching rules.Our algorithm considers skeleton graph vertices, and several rules drag entire 2-paths from one separation to another, requiring r 2 = 0.In simplify, line 8 implies the constraint s 2 + s ′ 3 + 1 2 (r 2 − r 3 ) ≤ 0, enabling us to move a degree-3 vertex into the separator by dragging out a degree-2 vertex.
From #3IS, line 2 imposes the constraint 1 6 s ′ 3 + 5 12 r 3 ≤ r 3 .If a (2,2,3) vertex s is chosen to branch on in line 19 as shown in Figure 2(a), then we get the constraint s 3 + ∆s 3 + 1 2 (2∆r 3 ) − 3δ, s 3 + 2∆s 3 + 1 2 (r 3 + 2∆r 3 ) − 4δ .The last tight constraint is from spider line 17, displayed in Figure 3   The algorithm #IS uses subroutine #3IS, which we analyze the measure and the weights for.We equate the Separate, Measure and Conquer weights with weights of the measure µ 3 , based on the compound analysis from Wahlström [29].As Wahlström's analysis only contains weights w ′ 3 and w ′ 2 , for vertices of degree 3 and degree 2 respectively, the measure is where d = d(G) is the average degree of a cubic graph, and µ o (L, S, R) is the sub-linear term left over from the average degree 8 /3 analysis.
In the case of a graph G with no (3,3,3) vertex, in order for Lemma 1 to apply, the values of w 1 and w 2 must satisfy inequalities r2 2 ≤ w 2 , 28  11 , and 8 3 for µ 8/3 respectively.This results in the weights w 3 = 0.1973 and w 2 = 0.0033 when G has no (3,3,3) vertex.
We also let w ′ 3 ≥ 0 and w ′ 2 ≥ 0 be the weights associated with vertices of degree 3 and degree 2 respectively, for a subcubic graph G. Using the analysis by compound measures with µ 3 (G) = i∈{2,3} w ′ i • n i , the following constraint µ8 /3 (G) = µ 3 (G) when d(G) = 8 /3 is required for a valid compound measure.This can be rewritten as 2w 3 + w 2 = 2w ′ 3 + w ′ 2 .Branching on a (3,3,3) vertex, the only type of degree-3 vertex that will be branching in #IS, gives a branching vector of (4w . Setting the weights w ′ 3 = 0.1876 and w ′ 2 = 0.0228 satisfies the system of constraints described above and by using the measure µ 3 (G), results in a running time of O * (1.1389 n ).Lemma 6.For a graph G with maximum degree 4, #IS can be solved in time O * (1.2070 n ).
Theorem 1. #IS can be solved in time O * (1.2356 n ) and polynomial space.
If we plug in a simple pathwidth-based subroutine [15] for graphs of maximum degree 3, we obtain the following exponential-space result.

A Additional details and proofs
Lemma 2. Let B ∈ R. Let µ be a measure for graph problems such that for every graph G = (V, E), every R ⊆ V , and every v ∈ V , we have that |µ(R ∪ {v}) − µ(R)| ≤ B. Assume that µ(R), the restriction of µ to R, can be computed in polynomial time.If there is an algorithm computing a path decomposition of width at most k of a graph G in polynomial time, then there is a polynomial time algorithm computing a separation Proof.The proof is basically the same as for the separation computation from [20], but we repeat it here for completeness.First, compute a path decomposition of width k in polynomial time.We view a path decomposition as a sequence of bags (B 1 , . . ., B b ) which are subsets of vertices such that for each edge of G, there is a bag containing both endpoints, and for each vertex of G, the bags containing this vertex form a non-empty consecutive subsequence.The width of a path decomposition is the maximum bag size minus one.We may assume that every two consecutive bags B i , B i+1 differ by exactly one vertex, otherwise we insert between B i and B i+1 a sequence of bags where the vertices from B i \ B i+1 are removed one by one followed by a sequence of bags where the vertices of B i+1 \ B i are added one by one; this is the standard way to transform a path decomposition into a nice path decomposition of the same width where the number of bags is polynomial in the number of vertices [5].Note that each bag is a separator and a bag B i defines the separation Since the first of these separations has L 1 = ∅ and the last one has R b = ∅, at least one of these separations has |µ r (L i )− µ r (R i )| ≤ B. Finding such a bag can clearly be done in polynomial time.
Lemma 3.For a balanced separation (L, S, R) of a graph G with average degree d = d(G), an upper bound for the measure µ 8/3 is: which is maximised when d = 8 3 with the value be the average degree of G.For an appropriate upper bound of µ 8/3 we first consider the upper bound on the number of separator vertices, also giving us an upper bound on the number of spider vertices: where is the number of degree-3 vertices in G, since a subcubic graph with n 3 vertices of degree 3 has pathwidth at most n3 6 + o(n 3 ) [13] As we have no vertex with neighbors of (3,3,3), every degree-3 vertex is incident to an edge incident to a degree-2 vertex.However, each spider vertex has need 4 more edges incident to degree-2 vertices.As the number of edges incident to degree-2 vertices is 2n 2 where n 2 = n(3 − d) is the number of degree-2 vertices in G, and there are at least n 3 of those edges taken up to be incident to a degree-3 vertex, then an upper bound on the number of spiders is: Since both upper bounds are valid for all 2 ≤ d ≤ 8/3 then a more accurate upper bound can be found by taking the minimum of Equation 5 and 6.This results in: As |S| ≤ n 6 (d − 2) for all 2 ≤ d ≤ 8 3 , with the weight for spider vertices s 3 being greater than regular non-spider degree-3 vertices in the separator, then an upper bound for µ 8/3 would have as many spider vertices in S as possible for a given average degree d.For 2 ≤ d ≤ 28  11 it is possible to have all vertices in S be spider vertices, so this gives the greatest value of µ 8/3 .However, from 28  11 < d ≤ 8 3 we use Equation 5to upper bound |S| and also place in S as many spider vertices with weight s ′ 3 as Equation 6allows, with the rest of the vertices in S being of weight s 3 .and the maximum value achieved by f 2 when average degree d = 8 3 : Proof.We will analyze the running time with respect to the measure µ 8/3 described above.As suggested in [20] we will provide constraints that these weights need to satisfy, and the provided values minimize the measure.The measure µ 8/3 can be viewed in two regimes; a balanced separation, where µ r (R) − µ r (L) ≤ 2B resulting in µ 8/3 = µ s (S) + 1 2 (µ r (R) − µ r (L)) + µ o (L, S, R) and an imbalanced separation, where µ r (R) − µ r (L) > 2B resulting in µ 8/3 = µ s (S) + µ r (R) + µ o (L, S, R).To characterize decreases in vertex degrees, let ∆s i = s i − s i−1 and ∆r i = r i − r i−1 .Trivial constraints are Our algorithm handles 2-paths as if they were single edges.Therefore we constrain that r 2 = 0.
Constraints from #IS Simplification rules in lines 2 to 8 in #IS take polynomial time.If we are given a graph G with ∆(G) ≤ 3 and no (3,3,3) vertex and the lazy 2-separator rule in line 15 did not apply, then we enter the subroutine #3IS.
Constraints from simplify The simplification rules in simplify either reduce the separator size by removing a vertex or the rule drags degree-2 vertices in S away making S consist only of degree-3 vertices.For vertex dragging to R in line 2 of simplify, the most constraining instances are the balanced ones: −s d + r d ≤ 0 where d ∈ {2, 3} and − s ′ 3 + r 3 ≤ 0 .However, for vertex dragging to L in 2, the imbalanced instances are most constraining but this is no more constraining than line 2. Line 8 drags to R the degree-2 separator vertex s and a 2-path, ending in a vertex l which is either in S or has degree 3, which itself is dragged into S.This most constraining in the balanced case In line 11 the most constraining case is The operations in line 16 drag neighbors and associated 2-paths from L into R, also removing s ∈ S. Since r 2 = 0 we can simplify the most constraining case, which is imbalanced, to: −s 3 + 2r 3 ≤ 0. Line 21 is most constraining in the balanced case, which induces the constraint −s 3 ≤ 0.
Claim 1.After simplify has been applied to a graph G and it's separation (L, S, R), for s ∈ S there exists r ∈ N Γ (s) ∩ R such that N Γ (r) ∩ R = ∅, and also there exists l ∈ N Γ (s) ∩ L such that N Γ (l) ∩ L = ∅ Proof.If there is a vertex s that does not satisfy the claim, then line 16 or 21 would trigger and remove s from S.
Constraints from spider The first two conditions of lines 4 and 8 in spider aim to drag into the separator a (2,2,3) or (2,3,3) vertex in order to branch more efficiently on.In the worst case there is no change in measure since s is replaced by r in the separator.Since the separation (L, S, R) is balanced, moving P r and r or P l and l also does not change the measure as L and R contribute equally to µ 8/3 .
In line 14, s is a center spider vertex with attributed weight s ′ 3 .We branch on l ∈ L, which is a skeleton neighbor of s.The for loop drags vertices which are skeleton neighbors of l with no change in measure so that when l is branched on, it obtains a decrease in measure of at least 3  2 r 3 by it's neighbors.However, we choose l to branch on because on both subproblems, branching on l causes the removal of s from the separator as it no longer has neighbors in L. This results in the branching constraint: Line 17 finds a valid left or right spider vertex and branches on it, resulting in the constraints Constraints from #3IS -Computing Separator.Much like in [20], computing a new separator in line 2 of #3IS imposes the constraint s ′ 3 /6 + 5/12 • r 3 < r 3 , or s ′ 3 < 7/2 • r 3 .
In line 5 the algorithm simplifies the graph G and it's separation (L, S, R) through a call to simplify, which itself imposes new constraints.The reduction rule in line 14 is the same as the constraints for line 11 in simplify.We now deal with branching on lazy-2 separators and regular branching, in both imbalanced and balanced cases, separately.As decreasing a degree-3 vertex to a degree-2 vertex may result in the introduction of a spider vertex s ′ 3 from s 3 , let δ = s ′ 3 − s 3 be the increase in measure from a spider vertex creation, offset by either a ∆s 3 or 1 2 ∆r 3 decrease in measure.
Constraints from #3IS -Balanced Lazy 2-Separator Branching Suppose the instance is balanced and #3IS selects a vertex s ∈ S but s has a lazy 2-separator {y, z} which line 10 of #3IS branches on instead of s.As the degree-3 vertices y, z and s are all removed in the branches of this problem, as well as the fact that due to Claim 1 for L and R there will be another degree-3 vertex that will be removed, we obtain the branching vector The worst case contains measure increases of 2δ since the two decreases of 1 2 ∆r 3 could create a spider vertex, and there are at least 2 of them.We could have more δ decreases, but this only occurs when we have a 1  2 ∆r 3 decrease, or ∆s 3 decrease in the worst case.But since δ ≤ ∆s 3 ≤ 1 2 ∆r 3 the tightest constraint occurs at the smallest number of δ possible.
Constraints from #3IS -Imbalanced Lazy 2-Separator Branching Once again, we have vertices s ∈ S and a lazy 2-separator {y, z}, but the instance is imbalanced.First assume either 1 or more of {y, z} is in R. In this case, we disconnect s, a y or z, as well as some other vertex r ∈ R due to Claim 1.At worst this results in the branching vector (s 3 + 2r 3 , s 3 + 2r 3 ) In the case where {y, z} ∈ L also divert to Claim 1 which guarantees that there is a skeleton neighbor r ∈ N Γ (s) ∩ R, which itself has a neighbor r ′ ∈ N Γ (r) ∩ R.These two combined with s are removed in both branches, otherwise s cannot be removed and {y, z} is not a lazy-2 separator.This also results in the branching vector (s 3 + 2r 3 , s 3 + 2r 3 ) Constraints from #3IS -Balanced Branching: neighbor in separator Consider the balanced branching case where we branch on s ∈ S and s has a neighbor s ′ ∈ S. Let u ∈ R and v ∈ L denote the two other neighbors.In the worst case, u and v are both degree-2 vertices, meaning in both branches we only reduce a vertex of weight r 3 to r 2 , but never delete one.Since s ′ reduces in degree in the first branch and is removed in the second branch, we get the following branching vector Constraints from #3IS -Balanced Branching: no neighbor in separator.Next consider the balanced branching case where the algorithm branches on a non-spider vertex s ∈ S with no neighbors in the separator S. Let u, u ′ ∈ R and v ∈ L denote its neighbors.Since s is a non-spider vertex then s is either a (2,2,3) or (2,3,3) vertex.
We first consider s as a (2,2,3) vertex.In the worst case, the single degree-3 vertex of weight r3 2 would be in R or L since a weight of s 3 > r 3 , and in practice it is much larger.Of the two remaining neighbors, they are the start of a 2-path to another degree-3 vertex.Now both of these cannot be in S so we will have a decrease of at least ∆r3 2 , leaving a decrease of ∆s 3 for the last neighbor.In the second case, we also get a decrease of ∆s 3 + ∆r3 2 from the degree-3 neighbor of s.This is due to Claim 1 forcing at least 1 of the neighbors to be in R.This results in a branching vector of Now if s is a (2,3,3) vertex, we get 2 degree 3 neighbors of s.In the worst case, the degree 2 neighbor of s is the start of a 2-path to another vertex in S.
Constraints from #3IS -Imbalanced Branching: neighbor in separator.In the imbalanced instances of G the measure µ 8/3 simplifies to µ8 /3 = µ s (S) + µ r (R) + µ o (L, S, R).Suppose we choose s ∈ S to branch on and s has a neighbor s ′ ∈ S. By Claim 1, s has a skeleton neighbor r ∈ N Γ (s) ∩ R. Now in the worst case, r is only a skeleton neighbor, and the actual neighbor r ′ ∈ N G (s) ∩ R is of degree 2. By considering the removal, or reduction of degree, of s, s ′ and r ′ then we get the following worst case constraint (s 3 + ∆s 3 + r 3 − 3δ, 2s 3 + r 3 + 5δ) .
The first branch has a 3δ term since we get at most 1 decrease for each neighbor.The 5δ term comes from the fact that the left neighbor l ∈ N G (s) ∩ L does not contribute any weight to µ 8/3 meaning it could be degree 3. Now s ′ is also of degree 3, so in the second case where we remove s ′ and l, these two could create 4 spider vertices.The last possible increase comes from r being reduced to a degree-2 vertex.
Constraints from #3IS -Imbalanced Branching: no neighbors in separator.There are two branching rules to consider in this case.First first branching occurs in line 17 where instead of branching on s ∈ S we branch on one of its skeleton neighbors in R. The other case occurs when we branch on s as normal in line 19.
In line 17, we are given the case where s has 1 skeleton neighbor in R.This means that we don't get a beneficial branching by branching on s.However, in a similar method to line 15 of spider, if we branch on r ∈ N Γ (s) ∩ R such that N Γ (r) ∩ R = ∅, then in both branches, we are able to remove s entirely from the separator due to the simplification rules in simplify.We get the following worst case constraint (r 3 + s 3 + ∆r 3 + ∆s 3 − 3δ, r 3 + s 3 + ∆r 3 + ∆s 3 − 3δ) .
Otherwise, we progress to line 19, which guarantees that we have 2 skeleton neighbors of s in R.This results in the following constraint (s 3 + 2∆r 3 − 3δ, s 3 + 2∆r 3 − 4δ) .

A.1 Degree-4 Analysis
For a graph with maximum degree 4, analysis is done with a measure of G has only degree-4 and degree-2 vertices and no degree-4 vertex has a degree-4 neighbor ψ + µ o (L, S, R) where w i are weights attributed to vertices of degree i, n i are the number of vertices with degree i and ψ is a potential.We can ignore lower weights since due to simplification rules we have for vertices of with degree 0 or 1.
Potentials in Degree-4 Analysis.Potentials are used for branching on a degree-4 vertex v with only degree-2 neighbors.In case (a), we have that all 2-paths starting from v, have endpoints of degree 4. Case (b) has at least one 2-path from v that ends up in a degree-3 vertex.

Figure 1 :
Figure 1: A left spider vertex s.

4 Swap L and R 5 (
L, S, R) := simplify(G, (L, S, R))6 Let s ∈ S be a maximum degree vertex with maximum associated average degree 7 if the multiplier reduction applies then 8 Apply the multiplier reduction.9 else if there exists a separator of size 2: {y, z}, with d(y) ≥ 3 and d(z) ≥ 3 whose removal leaves G disconnected and either removes or leaves N G [s] in a component with constant measure at most B then 10 Branch on y. 11 else if µ r (R) − µ r (L) ≤ 2B and s has neighbors of degree (2,2,2) then 12 return spider(s, G, (L, S, R), c) 13 else if µ r (R) − µ r (L) > 2B and s has two neighbors in L and one neighbor r in R, let r ′ be the first degree-3 vertex or vertex from S encountered when moving from s to the right along a 2-path in G then 14 return #IS(G, (L ∪ P ∪ {s}, (S \ {s}) ∪ {r ′ }, R \ (P ∪ {r ′ })), c)

Branch on r ′ . 18 else 19 Branch
on s.

14 Let
B = (N Γ (s) ∩ S) and for b ∈ B let Q b ⊂ V (G) be the 2-path from s to b.

16 else 17
Branch on s.
(a), giving the constraint s ′ 3 + 3 2 ∆r 3 , s ′ 3 + 3 2 ∆r 3 .While the cases in Figure2(b) and Figure3(b) are not tight, they are of interest since these cases branch on vertices located outside the separator and it is guaranteed that s is removed from the separator after branching.

Figure 2 :
Figure 2: Worst case configurations for non-spider vertex branching in #3IS

Figure 3 :
Figure 3: Worst case configurations for spider vertex branching in spider and all degree-4 vertices of G only have degree-2 neighbors and there exists a vertex x where d(x) = 4 and x has a 2-path to a degree-3 vertex then 12Let vertex x ∈ V be a vertex of maximum degree, secondarily maximizing the associated average degree α(x)/β(x) if the multiplier reduction applies then 13 Apply the multiplier reduction.14 else if there exists a separator of size 2: {y, z}, with d(y) ≥ 3 and d(z) ≥ 3 whose removal leaves G disconnected and either removes or leaves N G [x] in a component with constant measure at most B then 15 Branch on y.