On the Complexity Landscape of Connected f -Factor Problems

Let G be an undirected simple graph having n vertices and let f be a function defined to be f:V(G) ->{0,..., n-1}. An f-factor of G is a spanning subgraph H such that degree of a vertex v in H is f(v) for every vertex v in V(G). The subgraph H is called a connected f-factor if, in addition, H is connected. A classical result of Tutte(1954) is the polynomial time algorithm to check whether a given graph has a specified f-factor. However, checking for the presence of a connected f-factor is easily seen to generalize HAMILTONIAN CYCLE and hence is NP-complete. In fact, the CONNECTED f-FACTOR problem remains NP-complete even when we restrict f(v) to be at least n^e for each vertex v and 0<e<1; on the other side of the spectrum of nontrivial lower bounds on f, the problem is known to be polynomial time solvable when f(v) is at least n/3 for every vertex v. In this paper, we extend this line of work and obtain new complexity results based on restrictions on the function f. In particular, we show that when f(v) is restricted to be at least n/(log n)^c , the problem can be solved in quasi-polynomial time in general and in randomized polynomial time if c<=1. Furthermore, we show that when c>1, the problem is NP-intermediate.


Introduction
The concept of f -factors is fundamental in graph theory, dating back to the 19th century, specifically to the work of Petersen [13].In modern terminology, an f -factor is defined as a spanning subgraph which satisfies degree constraints (given in terms of the degree function f ) placed on each vertex of the graph [21].Some of the most fundamental results on f -factors were obtained by Tutte, who gave sufficient and necessary conditions for the existence of f -factors [18].In addition, he developed a method for reducing the f -factor computation problem to the perfect matching [19] problem, which gives a straightforward polynomial time algorithm for the problem of deciding the existence of an f -factor.There are also several detailed surveys on f -factors of graphs, for instance by Chung and Graham [3], Akiyama and Kano [1], Lovász and Plummer [11].
Aside from work on general f -factors, substantial attention has been devoted to the variant of f -factors where we require the subgraph to be connected (see for instance the survey articles by Kouider and Vestergaard [10] and Plummer [15]).Unlike the general f -factor problem, deciding the existence of a connected f -factor is NPcomplete [6,2].It is easy to see that the connected f -factor problem (CONNECTED f -FACTOR) generalizes HAMILTONIAN CYCLE (set f (v) = 2 for every vertex v), and even the existence of a deterministic single-exponential (in the number of vertices) algorithm is open for the problem [14].
The NP-completeness of this problem has motivated several authors to study the CONNECTED f -FACTOR for various restrictions on the function f .Cornelissen et al. [4] showed that CONNECTED f -FACTOR remains NP-complete even when f (v) is at least n for each vertex v and any constant between 0 and 1.Similarly, it has been shown that the problem is polynomial time solvable when f (v) is at least n 3 [12] for every vertex v. Aside from these two fairly extreme cases, the complexity landscape of CONNECTED f -FACTOR based on lower bounds on the function f , has largely been left uncharted.
Our results and techniques.In this paper, we provide new results (both positive and negative) on solving CONNECTED f -FACTOR based on lower bounds on the range of f .Since we study the complexity landscape of CONNECTED f -FACTOR through the lens of the function f , it will be useful to formally capture bounds on the function f via an additional "bounding" function g.To this end, we introduce the connected g-Bounded f -factor problem (CONNECTED g-BOUNDED f -FACTOR) below: CONNECTED g-BOUNDED f -FACTOR Instance: An n-vertex undirected simple graph G and a mapping f : V (G) → N such that f (v) ≥ n g(n) .Task: Find a connected f -factor H of G.
First, we obtain a polynomial time algorithm for CONNECTED f -FACTOR when f (v) is at least n c for every vertex v and any constant c > 1.This result generalizes the previously known polynomial time algorithm for the case when f (v) is at least n 3 .This is achieved thanks to a novel approach for the problem, which introduces a natural way of converting one f -factor to another by exchanging a set of edges.Here we formalize this idea using the notion of Alternating Circuits.These allow us to focus on a simpler version of the problem, where we merely need to ensure connectedness across a coarse partition of the vertex set.Furthermore, we extend this approach to obtain a quasi-polynomial time algorithm for the CONNECTED f -FACTOR when f (v) is at least n polylog(n) for every vertex.To be precise, we prove the following two theorems (see Section 2 for an explanation of the function g in formal statements).
Theorem 1 For every function g(n) ∈ O(1), CONNECTED g-BOUNDED f -FACTOR can be solved in polynomial time.
Theorem 2 For every c > 0 and function g(n) ∈ O((log n) c ), CONNECTED g-BOUNDED f -FACTOR can be solved in time n (log n) α(c) where α(c) ∈ O (1).
Second, we build upon these new techniques to obtain a randomized polynomial time algorithm which solves CONNECTED f -FACTOR in the more general case where f (v) is lower-bounded by n g(n) for every vertex v and g(n) ∈ O(log n).For this, we also require algebraic techniques that have found several applications in the design of fixed-parameter and exact algorithms for similar problems [5,20,7,14].Precisely, we prove the following theorem.
Theorem 3 For every function g(n) ∈ O(log n), CONNECTED g-BOUNDED f -FACTOR can be solved in polynomial time with constant error probability.
We remark that the randomized algorithm in the above theorem has one-sided error with 'Yes' answers always being correct.Finally, we obtain a lower bound result for CONNECTED f -FACTOR when f (n) is at least n (log n) c for c > 1.Specifically, in this case we show that the problem is in fact NP-intermediate, assuming the Exponential Time Hypothesis [8] holds.Formally speaking, we prove the following theorem.
Theorem 4 For every c > 1 and for every g(n) ∈ Θ((log n) c ), CONNECTED g-BOUNDED f -FACTOR is neither in P nor NP-hard unless the Exponential Time Hypothesis fails.
We detail the known as well as new results on the complexity landscape of CON-NECTED f -FACTOR in Table 1.
Organization of the paper.After presenting required definitions and preliminaries in Section 2, we proceed to the key technique and framework used for our algorithmic results, which forms the main part of Section 3. In Section 3.2, we obtain both of our deterministic algorithms, which are formally given as Theorem 1 (for the polynomial time algorithm) and Theorem 2 (for the quasi-polynomial time algorithm).Section 4 then concentrates on our randomized polynomial time algorithm, presented in Theorem 3. Finally, Section 5 focuses on ruling out (under established complexity assumptions) both NP-completeness and inclusion in P possibilities for CONNECTED g-BOUNDED f -FACTOR for all polylogarithmic functions g in Θ((log n) c ).

Basic Definitions
We use standard definitions and notations from West [21].The notation d G (v) denotes the degree of a vertex v in a graph G. Similarly, N G (v) represents the set of vertices adjacent to v in G.A component in a graph is a maximal subgraph that is connected.Note that the set of components in a graph uniquely determines a partition of the vertex set.A circuit in a graph is a cyclic sequence where each e i is of the form {v i−1 , v i } and occurs at most once in the sequence.An Eulerian circuit in a graph is a circuit in which each edge in the graph appears.Any graph having an Eulerian circuit is called an Eulerian graph.
Let V be a subset of the vertices in the graph G.The vertex induced subgraph G[V ] is the graph over vertex set V containing all the edges in G whose endpoints are both in V .Given E ⊆ E(G), G[E ] is the edge induced subgraph of G whose edge set is E and vertex set is the set of all vertices incident on edges in E .
Given two subgraphs G 1 and This notion of partition refinement was used, e.g., by Kaiser [9].A spanning tree of the quotient graph G/Q refers to a subgraph T of G with |Q|-1 edges that connects Q.The following lemma will later be used in the analysis of the error probability of our randomized algorithm.

Lemma 5
The following holds for every n, c ∈ N with n > c: Proof.Using simple term manipulations, we obtain: Since n 2 −1 n 2 < 1, it follows that: By using the binomial formula, we obtain: To obtain an upper bound on i , we show next that the absolute values of the terms in the sum are decreasing with increasing i.
The first inequality above holds because n > c.Hence, we obtain.
Fig. 1 The alternating circuit A 11 illustrating that not every alternating circuit can be decomposed into edge-disjoint alternating circuits that are cycles.Here the blue edges are marked with thick lines and the red edges are thin.
Putting the above back into Equation 1 and using Inequality 2 together with the expressions above, we obtain: The above concludes the proof of the lemma.
The function g we deal with is always a positive real-valued function, defined on the set of positive integers.For the cases we consider, the function always takes a value greater than 1.Unless otherwise mentioned, g(n) is in O(polylog(n)).Whenever g is part of the problem definition, the target set of the function f is the set of integers { n/g(n) , . . ., n − 1}.Consequently, we have the following fact.
Fact 6 Let G be a graph and let f (v) ≥ n/g(n) for each v in V (G).If H is an f -factor of G, then the number of components in H is at most g(n) − 1.

Colored Graphs, (Minimal) Alternating Circuits, and f -Factors
A graph G is colored if each edge in G is assigned a color from the set {red, blue}.In a colored graph G, we use R and B to denote spanning subgraphs of G whose edge sets are the set of red edges (E(R)) and blue edges (E(B)) respectively.We use this coloring in our algorithm to distinguish between edge sets of two distinct f -factors of the same graph G.A crucial computational step in our algorithms is to consider the symmetric difference between edge sets of two distinct f -factors and perform a sequence of edge exchanges preserving the degree of each vertex.The following definition is used extensively in our algorithms.
Definition 7 A colored graph A is an alternating circuit if there exists an Eulerian circuit in A, where each pair of consecutive edges are of different colors.
Clearly, an alternating circuit has an even number of edges and is connected.Further, d R (v) = d B (v) for each v in A. A minimal alternating circuit A is an alternating circuit where each vertex v in A has at most two red edges incident to v. Note that alternating circuits, as opposed to Eulerian circuits, cannot always be decomposed into edge-disjoint alternating circuits that are cycles.As an example, consider for each r 1 , r 2 ≥ 1 the alternating circuit A r1r2 which consists of two (edge-disjoint) cycles of length 2r 1 + 1 and length 2r 2 + 1, respectively, that share one common vertex v. Let the coloring of the edges of A r1r2 be as illustrated in Figure 2.2.Informally, the edges of both cycles are colored in an alternating manner along each cycle so that the edges of the first cycle incident to v have the same color, which is distinct from the color given to the edges incident with v in the second cycle.Every alternating circuit in A r1r2 contains all edges of A r1r2 and cannot be decomposed further into smaller alternating circuits.
Fact 8 Let S be a subset of E(G).An f -factor H of G containing all the edges in S, if one exists, can be computed in polynomial time.
The fact follows from the observation that a candidate for H \ S can be computed from an f -factor H of the spanning subgraph G\S, where , one can check for the existence of an f -factor connecting Q in polynomial time by iterating over each edge e in the cut [X, V \ X] G and applying Fact 8 by setting S = {e}.Further, this can be extended for any arbitrary partition Q of constant size, or when we are provided with a spanning tree S of G/Q that is guaranteed to contain in some f -factor of G.We use switching as an operator where the role of the second operand is to bring in specific edges to the first, retaining the degrees of vertices by omitting some less significant edges.One can easily infer that if the result of applying the coloring function c to M is a minimal alternating circuit, then the switching operation replaces at most two edges incident on each vertex v in H.

Fact 11
Let A be an alternating circuit and S be a subset of edges in A. There is a polynomial time algorithm that outputs a set M of edge disjoint minimal alternating circuits in A, each of which has at least one edge from S and such that every edge in S is contained in some minimal alternating circuit in M.
It is not difficult to see the proof of Fact 11.A skeptical reader can refer [12,Lemma 6].Note that given S and A, M is not unique.
Fact 12 Let H be an f -factor of G and let Q be a partitioning of the vertex set of G.
Fact 12 implies that if H is not a connected f -factor and H/Q is connected then there exists some Q ∈ Q such that H[Q] is not connected.
3 A Generic Algorithm for Finding Connected g-Bounded f -Factors Our goal in this section is to present a generic algorithm for CONNECTED g-BOUNDED f -FACTOR.In particular, we in a certain sense reduce the question of solving CON-NECTED g-BOUNDED f -FACTOR to solving a related problem which we call PARTI-TION CONNECTOR.This can be viewed as a relaxed version of the original problem, since instead of a connected f -factor it merely asks for an f -factor which connects a specified partitioning of the vertex set.A formal definition is provided below.

PARTITION CONNECTOR
The algorithms for solving PARTITION CONNECTOR are presented in the later parts of this article.Specifically, a deterministic algorithm that runs in quasi-polynomial time whenever g(n) = O(polylog(n)) (Section 3.2) and a randomized polynomial time algorithm for the case when g The majority of this section is devoted to proving the key Theorem 13 stated below, which establishes the link between PARTITION CONNECTOR and CONNECTED g-BOUNDED f -FACTOR.) for PARTITION CONNECTOR, then there exists a randomized polynomial time algorithm for CONNECTED g-BOUNDED f -FACTOR that has a constant error probability.

A generic algorithm for CONNECTED g-BOUNDED f -FACTOR
The starting point of our generic algorithm is the following observation.
Observation 14 Let G be an undirected graph and f be a function f : The graph G has a connected f -factor if and only if for each partition Q of the vertex set V (G), there exists an f -factor H of G that connects Q.
We remark that for the running time analysis for our generic algorithm we assume that we are only dealing with instances of CONNECTED g-BOUNDED f -FACTOR, where the number of vertices exceeds 6g(n) 4 .As g(n) is in O(polylog(n)), this does not reduce the applicability of our algorithms, since there is a constant n 0 such that n ≥ 6g(n) 4 for every n ≥ n 0 ; because g(n) is part of the problem description, n 0 does not depend on the input instance.Consequently, we can solve instances of CONNECTED g-BOUNDED f -FACTOR where n < n 0 by brute-force in constant time.We will therefore assume without loss of generality in the following that n ≥ n 0 and hence n ≥ 6g(n) 4 .
Our algorithm constructs a sequence (H 0 , Q 0 ), . . ., (H k , Q k ) of pairs which is maximal (cannot be extended further) satisfying the following properties: The following lemma links the existence of a connected f -factor to the properties of maximal sequences satisfying (M1)-(M3).
Proof.Towards showing the forward direction of the claim, suppose for a contradiction that Further, because G has a connected f -factor and Observation 14, we obtain that there exists a connected f -factor H k+1 that connects any partition Q k+1 .Now, the sequence S could be extended by appending the pair (H k+1 , Q k+1 ) to its end, a contradiction to our assumption that S was a maximal sequence.The reverse direction is trivial.
We deploy an algorithm that incrementally computes a maximal sequence S satisfying (M1)-(M3) and thereby use the above lemma to solve the connected f -factor problem by testing whether the last f -factor in the sequence is connected.This involves computing Q i+1 from H i and Q i followed by the computation of H i+1 connecting Q i+1 .However, if the number of parts in the last partition Q k is allowed to grow to n, then such an algorithm would eventually have to solve the connected ffactor problem to compute an H k satisfying (M2).Our algorithm establishes a lower bound on the size of any part Q ∈ Q i and hence an upper bound on the number of parts in any partition Q i in S which in turn bounds the length of the sequence S.
The following lemma shows that given the recently computed pair (H, Q) = (H i , Q i ) in the sequence, the partition Q = Q i+1 and a candidate H for H i+1 , one can compute a better candidate H for H i+1 which is closer to H i in the sense that most of the neighbors of a vertex v in H i are retained as it is, in H .The properties of H then allow us to lower-bound the size of each part in Q i+2 as a function of the size of the smallest part in Q i+1 .
Lemma 16 Let (H, Q), (H , Q ) be two consecutive pairs occurring in a sequence satisfying properties (M1)-(M3).Then, there is an f -factor Moreover, H can be computed from Q , H, and H in polynomial time.
Proof.From the premise that H is an f -factor connecting Q , we know that there exists a spanning tree T of H /Q .Color the edges in H with color red and those in H with color blue.Let A be the graph H H . Notice that each component in A is an alternating circuit.Furthermore, note that the set S = E(T \ H) of blue edges is a subset of A as E(T ) is a subset of E(H ).Let S i be the set A i ∩S where A i is the i th component in A. We compute the set M i of edge disjoint minimal alternating circuits using Fact 11 for each (A i , S i ) pair.The size of the set M i is at most |S i | and hence at most |S| minimal alternating circuits in M = i M i .Let M S = M ∈M M and H be the f -factor defined as Switching(H,M S ).We argue that this switching operation removes at most Considering the fact that the minimal alternating circuits in M are edge disjoint, we visualize switching with M S as a sequence of switching operations on H each with a distinct minimal alternating circuit M in M. In each such M , the number of red edges incident on a vertex v that leaves H during switching is at most two and the operation Switching(H,M S ) retains at least N H (v) − 2|M| neighbors of each vertex.Thus, for any subset Fact 11, the computation of M and hence of H takes polynomial time.This completes the proof of the lemma.
By employing the above lemma, our algorithm ensures that the maximal sequence (H 0 , Q 0 ), . . ., (H k , Q k ) so constructed satisfies the following additional property: This property plays a key role in the analysis of our algorithm as it allows us to bound the number of parts in each partition Q i .Towards this aim we require the following auxiliary lemma.
Proof.We show the claim by induction on i , as required.Hence assume that the claim holds for i − 1 and we want to show the claim for i.Let From the induction hypothesis we obtain that Hence together with Property (M4), we obtain as required.This completes the proof of the lemma.
Recall that f (v) is at least n/g(n) for each v ∈ V (G).Our next step is to show that the length of the maximal sequence constructed by our algorithm does not exceed g(n) + 1.
Proof.The claim clearly holds for Q 0 .It also holds for Q 1 because the parts in Q 1 correspond to the components of H 0 , which are at most g(n) due to Fact 6. Assume for a contradiction that the claim does not hold and let S = (H 0 , Q 0 ), . . ., (H k , Q k ) be a maximal sequence satisfying (M1)-(M4) witnessing this and let be the smallest integer such that From Lemma 17, we obtain that and |Q 0 | = 1, we infer that the length of the sequence S is at most g(n) + 1.This completes the proof of the lemma.
We are now ready to prove the main theorem of this section which outlines how the running time of CONNECTED g-BOUNDED f -FACTOR is dominated by the PAR-TITION CONNECTOR module.
Proof of Theorem 13.We present an algorithm for CONNECTED g-BOUNDED f -FACTOR that employs an algorithm for PARTITION CONNECTOR as a subroutine.All parts of the algorithm apart from the subroutine PARTITION CONNECTOR will be deterministic and run in polynomial time.The main idea is to construct a maximal sequence S = (H 0 , Q 0 ), . . ., (H k , Q k ) satisfying properties (M1)-(M4).Recall our assumption that n ≥ 6g(n) 4 .Let (G, f ) be an instance of CONNECTED g-BOUNDED f -FACTOR.The algorithm starts by computing an arbitrary f -factor H 0 .If no f -factor exists, then clearly the algorithm reports failure.If on the other hand the computed f -factor H 0 is already connected, then the algorithm returns H 0 and exits.
Observe that (H 0 , Q 0 ), where Q 0 = {V (G)}, is a valid starting pair for a sequence S satisfying properties (M1)-(M4).Further, the algorithm extends the sequence S by adding successors as long as one exists.The sequence is extended by invoking a recursive subroutine Restricted-f -factor with parameters (G, f ) and the most recently added pair (H, Q) to compute a new pair (H , Q ) that can be appended to the sequence, if one exists.Otherwise, the procedure concludes that S can no longer be extended, in which case it either returns a connected f -factor of G or reports nonexistence of one.The subroutine Restricted-f -factor works as follows.
The procedure starts by computing a refinement Fact 12, H already constitutes a connected f -factor of G and the procedure correctly returns H. Otherwise, the procedure calls the provided algorithm for PAR-TITION CONNECTOR on G, f , and Q to obtain an f -factor H connecting Q .If the provided algorithm for PARTITION CONNECTOR returns failure, the procedure also returns failure, relying on Observation 14 and assuming that no f -factor connecting Q exits.Otherwise, observe that the pair (H , Q ) already constitutes a valid successor of the pair (H, Q) in any sequence satisfying properties (M1)-(M3).To ensure Property (M4), the procedure now calls a polynomial time subroutine on the pairs (H, Q) and (H , Q ) to obtain the desired f -factor H connecting Q and such that the pairs (H, Q) and (H , Q ) satisfy Property (M4).The existence of such a polynomial time subroutine is from Lemma 16.The procedure now calls itself on the pair (H , Q ).This completes the description of the algorithm.
Note that given the correctness of the algorithm for PARTITION CONNECTOR the correctness of the algorithm follows from Lemma 15.Let us now analysis the running time of the algorithm.Apart from the calls to the provided subroutine for PARTITION CONNECTOR, all parts of the algorithm run in polynomial time.Because the algorithm calls the provided algorithm for PARTITION CONNECTOR at most once for every pair (H, Q) in a maximal sequence satisfying properties (M1)-(M4), we obtain from Lemma 18 that the number of those calls is bounded by g(n)+1.Moreover, from the same lemma, we obtain that the size of a partition Q given as an input to the algorithm for PARTITION CONNECTOR is at most g(n) + 1.Hence, if PARTITION CONNECTOR can be solved in time O * (n 2(|Q|−1) ), then the algorithm runs in time O * (g(n)n 2(g(n)) ) showing the first statement of the theorem.Similarly, if PARTI-TION CONNECTOR can be solved in time O * (2 |Q| ), then the algorithm runs in time O * (g(n)2 g(n)+1 ), which given g(n) ∈ O(log n) shows that the algorithm claimed in the second statement of the theorem runs in polynomial time.We use the following lemma to prove the second part of the theorem.

Lemma 19
The PARTITION CONNECTOR can be solved by a randomized algorithm with running time O * (2 |Q| ) and error probability O(1 − (1 − 1 n 2 ) |Q| ).It remains to show that the randomized algorithm has the stated error probability.Towards this aim we calculate a lower bound on the success probability of the algorithm, i.e., the probability that the algorithm returns a connected f -factor of G if such an f -factor exists.Hence, let us suppose that G has a connected f -factor.It follows from Observation 14 that G contains an f -factor connecting Q for every partition Q of its vertex set.Hence every call to the subroutine Partition Connector is made for a "Yes"-instance, which together with Lemma 19 implies that every such call succeeds with probability at least (1 , we obtain from Lemma 5 that this probability is at least ) for some constant c.Since there are at most g(n) + 1 = c log n such calls, the probability that the algorithm succeeds for all of these calls is hence at least (1 ) c log n > 0, as required.This completes the proof of the theorem.

A Quasi-polynomial Time Algorithm for Polylogarithmic Bounds
In this section, we prove Theorem 1 and Theorem 2. In fact, we prove a more general result, from which both theorems directly follow.
Theorem 20 For every c > 0 and function g(n) ∈ O((log n) c ), the CONNECTED g-BOUNDED f -FACTOR problem can be solved in O * (n 2g(n) ) time.
We make use of the following simple lemma.
Lemma 21 Let G be a graph having a connected f -factor.Let Q be a partition of the vertex set V (G).There exists a spanning tree T of G/Q such that for some f -factor H of G, E(T ) ⊆ E(H).Furthermore, H can be computed from T in polynomial time.
Proof.Let H be a connected f -factor of G.For any partition Q of the vertex set, it follows from Observation 14 that H /Q is connected.Consider a spanning tree T of H /Q. Clearly, there exists at least one f -factor H containing E(T ) and hence H/Q is connected.Once we have E(T ), H can be computed in polynomial time using Fact 8.
In light of Theorem 13, it now suffices to prove the following Lemma 22, from which Theorem 20 immediately follows.
Proof.It follows from Lemma 21 that we can solve PARTITION CONNECTOR by going over all spanning trees T of G/Q and checking for each of them whether there is an f -factor of G containing the edges of T .The lemma now follows because the number of spanning trees of G/Q is at most |E(G)| |Q|−1 , which is upper bounded by O(n 2(|Q|−1) ), and for every such tree T we can check the existence of an f -factor containing T in polynomial time.

A Randomized Polynomial Time Algorithm for Logarithmic Bounds
In this section we prove Theorem 3. Due to Theorem 13, it is sufficient for us to provide a randomized algorithm for PARTITION CONNECTOR with running time O * (2 |Q| ) and error probability O(g(n) 2 /n 2 ).This is precisely what we do in the rest of this section (Lemma 19).As a first step, we design an algorithm for the "existential version" of the problem which we call ∃-Partition Connector and define as follows.

∃-PARTITION CONNECTOR
Input: A graph G with n vertices, f : V (G) → N, and a partition Q of V (G).Question: Is there an f -factor of G that connects Q?
We then describe how to use our algorithm for this problem as a subroutine in our algorithm to solve PARTITION CONNECTOR.

Solving ∃-PARTITION CONNECTOR in Randomized Polynomial Time
The objective of this subsection is to prove the following lemma which implies a randomized polynomial time algorithm for ∃-PARTITION CONNECTOR when g(n) ∈ O(log n).
Lemma 23 There exists an algorithm that, given the graph G, a function f : V (G) → N, and a partition Q of V (G), runs in time O * (2 |Q| ) and outputs We design this algorithm by starting from the exact-exponential algorithm in [14] and making appropriate modifications.During the description, we point out the main differences between our algorithm and that in [14].We now proceed to the details of the algorithm.We begin by recalling a few important definitions and known results on f -factors.These are mostly standard and are also present in [14], but since they are required in the description and proof of correctness of our algorithm, we state them here.
Definition 24 (f -Blowup) Let G be a graph and let f : Let H be the graph constructed as follows: 1.For each vertex v of G, we add a vertex set A(v) of size f (v) to H. 2. For each edge e = {v, w} of G we add to H vertices v e and w e and edges (u, v e ) for every u ∈ A(v) and (w e , u) for every u ∈ A(w).Finally, we add the edge (v e , w e ).
This completes the construction.The graph H is called the f -blowup of graph G.
We use B f (G) to denote the f -blowup of G.We omit the subscript when there is no scope for ambiguity.
Definition 25 (Induced f -blowup) For a subset S ⊆ V (G), we define the f -blowup of G induced by S as follows.Let the f -blowup of G be H.Begin with the graph H and for every edge e = (v, w) ∈ E(G) such that v ∈ S and w / ∈ S, delete the vertices v e and w e from H. Let the graph H be the union of those connected components of the resulting graph which contain the vertex sets A(v) for vertices v ∈ S.Then, the graph H is called the f -blowup of G induced by the set S and is denoted by B f (G) [S].
We now recall the relation between perfect matchings in the f -blowup and ffactors (see Figure 2).

Lemma 26 ([19])
A graph G has an f -factor if and only if the f -blowup of G has a perfect matching.
The relationship between the Tutte matrix and perfect matchings is well-known and this has already been exploited in the design of fixed-parameter and exact algorithms [20,7,14].
Definition 27 (Tutte matrix) The Tutte matrix of a graph G with n vertices is an n × n skew-symmetric matrix T over the set {x ij |1 ≤ i < j ≤ |V (G)|} of indeterminates whose (i, j) th element is defined to be We use T (G) to denote the Tutte matrix of the graph G .
Following terminology in [14], when we refer to expanded forms of succinct representations (such as summations and determinants) of polynomials, we use the term naive expansion (or summation) to denote that expanded form of the polynomial which is obtained by merely writing out the operations indicated by the succinct representation.We use the term simplified expansion to denote the expanded form of the polynomial which results after we apply all possible simplifications (such as cancellations) to a naive expansion.We call a monomial m which has a non-zero coefficient in a simplified expansion of a polynomial P , a surviving monomial of P in the simplified expansion.Let det T (G) denote the determinant of the Tutte matrix of the graph G.
Proposition 28 ( [17]) det T (G) is identically zero when expanded and simplified over a field of characteristic two if and only if the graph G does not have a perfect matching.
The following basic facts about the Tutte matrix T (G) of a graph G are wellknown.When evaluated over any field of characteristic two, the determinant and the permanent of the matrix T (G) (indeed, of any matrix) coincide.That is, where S n is the set of all permutations of [n].Furthermore, there is a one-toone correspondence between the set of all perfect matchings of the graph G and the surviving monomials in the above expression for det T (G) when its simplified expansion is computed over any field of characteristic two.We formally state and give a proof of the latter fact for the sake of completeness and because we intend to use this particular formulation of it.
Lemma 29 Let T (G) and det T (G) be as defined above.Then the following statements hold.
1.If M = {(i 1 , j 1 ), (i 2 , j 2 ), . . ., (i , j )} is a perfect matching of a graph G, then the product (i k ,j k )∈M x 2 i k j k appears exactly once in the naive expansion and hence as a surviving monomial in the sum on the right-hand side of Equation 3when this sum is expanded and simplified over any field of characteristic two.2. Conversely, each surviving monomial in a simplified expansion of this sum over a field of characteristic two must be of the form (i k ,j k )∈M x 2 i k j k where M = {(i 1 , j 1 ), (i 2 , j 2 ), . . ., (i , j )} is a perfect matching of G.
Proof.For the first statement, consider the permutation σ ∈ S n comprising precisely the 2-cycles {(i 1 , j 1 ), (i 2 , j 2 ), . . ., (i , j )}.The corresponding monomial given by the definition of T (G) over a field of characteristic two is precisely (i k ,j k )∈M x 2 i j k .For every other permutation σ ∈ S n , the corresponding monomial given by the definition of T (G) contains at least one variable x irjr where i r is not mapped to j r in σ.This implies that no other monomial in the naive expansion of Equation 3 is equal to (i k ,j k )∈M x 2 i k j k even when considered over a field of characteristic two.This completes the argument for the first statement.
We now consider the second statement.First of all, since we only consider simple graphs, we have that for any permutation σ ∈ S n with a fixed point, the corresponding monomial is 0 since n denote the set of all permutations in S n with a cycle of length at least 3.We now argue that for any permutation σ ∈ S ≥3 n , the corresponding monomial vanishes in the simplified expansion of Equation 3. In order to do so, we give a bijection β : S n → S n such that (a) for every σ ∈ S n \ S ≥3 n , β(σ) = σ, (b) for every σ ∈ S n , β(β(σ)) = σ, and (c) for every σ ∈ S n , the monomials corresponding to σ and β(σ) are equal over any field of characteristic two.
We first define β(σ) for a σ ∈ S ≥3 n as follows.Note that we have already fixed an ordering of the vertices of G. Let v be the first vertex of G in this ordering which appears in a cycle of length at least 3 in σ and let C denote this cycle.We now define β(σ) to be the permutation obtained from σ by inverting C and leaving every other cycle unchanged.Finally, for every σ ∈ S n \ S ≥3 n , simply set β(σ) = σ.It is straightforward to see that the resulting mapping β is indeed a bijection and moreover, β(β(σ)) = σ for every σ ∈ S n as required.Finally, it follows from the definition of det T (G) that over a field of characteristic two, the factor of the monomial corresponding to σ contributed by any cycle C is the same as that contributed by the inverse of this cycle to the monomial corresponding to β(σ).Hence we have the third property and conclude that for any permutation σ ∈ S ≥3 n , the corresponding monomial vanishes in the simplified expansion of Equation 3.This implies that the only surviving monomials are those corresponding to permutations in S n \ S ≥3 n without a fixed point, implying that these permutations comprise only 2-cycles.This in turn implies that any such surviving monomial must correspond to a perfect matching of G as required.This completes the proof of the lemma.
Lemma 30 (Schwartz-Zippel Lemma, [16,22]) Let P (x 1 , . . ., x n ) be a multivariate polynomial of degree at most d over a field F such that P is not identically zero.Furthermore, let r 1 , . . ., r n be chosen uniformly at random from F. Then, Definition 31 For a partition of we denote by Q(I) the set i∈I Q i .Furthermore, with every set we associate a specific monomial m I which is defined to be the product of the terms From now on, for a set X ⊆ V (G), we denote by X the set V (G) \ X.Also, since we always deal with a fixed graph G and function f , for the sake of notational convenience, we refer to the graph B f (G) simply as B. We now define a polynomial Q (x) over the indeterminates from the Tutte matrix T (B) of the f -blowup of G, as follows: where if a graph H has no vertices or edges then we set det T (H) = 1.In what follows, we always deal with a fixed partition Remark 32 The definition of the polynomial P Q (x) is the main difference between our algorithm and the algorithm in [14].The rest of the details are identical.The main algorithmic consequence of this difference is the time it takes to evaluate this polynomial at a given set of points.This is captured in the following lemma whose proof follows from the fact that determinant computation is a polynomial time solvable problem.
Lemma 33 Given values for the variables x ij in matrix T (B), the polynomial P Q (x) can be evaluated over a field F of character 2 and size Ω(n 6 ) in time O * (2 ).
Proof.The algorithm to evaluate P Q (x) over the field F proceeds as follows.Given the values for the variables x ij in the matrix T (B), we go over all {1} ⊆ I ⊆ [ ] and for each I, we evaluate det T (B[Q(I)]) and det T (B[Q(I)]) in polynomial time via standard polynomial time determinant computation.Once this value is computed, we multiply their product with the evaluation of the monomial m I .Since we go over 2 possible sets I and for each I the computation takes polynomial time, the claimed running time follows.
Having shown that this polynomial can be efficiently evaluated, we will now turn to the way we use it in our algorithm.Our algorithm for ∃-PARTITION CONNECTOR takes as input G, f, Q, evaluates the polynomial P Q (x) at points chosen independently and uniformly at random from a field F of size Ω(n 6 ) and characteristic 2 and returns YES if and only if the polynomial does not vanish at the chosen points.In what follows we will prove certain properties of this polynomial which will be used in the formal proof of correctness of this algorithm.We need another definition before we can state the main lemma capturing the properties of the polynomial.Recall that for every v ∈ V (G), the set A(v) is the set of 'copies' of v in the f -blowup of G. Furthermore, for a set X ⊆ V (G), we say that an edge e ∈ E(G) crosses the cut (X, X) if e has exactly one endpoint in X.
Definition 34 We say that an f -factor H of G contributes a monomial x 2 i1j1 . . .x 2 irjr to the naive expansion of the right-hand side of Equation 4 if and only if the following conditions hold.
1.For every e = (v, w) ∈ E(H), there is a u ∈ A(v), u ∈ A(w) and 1 ≤ p, q ≤ r such that {u, v e } = {i p , j p } and {u , w e } = {i q , j q }. 2. For every e = (v, w) ∈ E(G) \ E(H), there is a 1 ≤ p ≤ r such that {v e , w e } = {i p , j p }.

3.
For every 1 ≤ p, q ≤ r, if {u, v e } = {i p , j p } and {u , w e } = {i q , j q } for some e ∈ E(G), then e ∈ E(H). 4. For every 1 ≤ p ≤ r, if {i p , j p } = {v e , e } for some e ∈ E(G), then e / ∈ E(H). 5.For every 1 ∈ I ⊆ [ ] such that H has no edge crossing the cut (Q(I), Q(I)), there is a pair of monomials m 1 and m 2 such that m 1 is a surviving monomial in the simplified expansion of det T (B[Q(I)]), m 2 is a surviving monomial in the simplified expansion of det T (B[Q(I)]), and Having set up the required notation, we now state the main lemma which allows us to show that monomials contributed by f -factors that do not connect Q, do not survive in the simplified expansion of the right hand side of Equation 4.
Lemma 35 Every monomial in the polynomial P Q (x) which is a surviving monomial in the simplified expansion of the right-hand side of Equation 4 is contributed by an ffactor of G to the naive expansion of the right-hand size of Equation 4. Furthermore, for any f -factor of G, say H, the following statements hold.
1.If H does not connect Q then every monomial contributed by H occurs an even number of times in the polynomial P Q (x) in the naive expansion of the right-hand side of Equation 4. 2. If H connects Q, then every monomial contributed by H occurs exactly once in the polynomial P Q (x) in the naive expansion of the right-hand side of Equation 4.
Proof.For the first statement, let m be a monomial which survives in the simplified expansion of the right-hand side of Equation 4. Then it must be of the form x 2 i1j1 . . .x 2 irjr and must correspond to a perfect matching of T (B).This is a direct consequence of Lemma 29 (2).Let M be this perfect matching.We now define an f -factor H based on M and argue that H indeed contributes this monomial m to the naive expansion of the right-hand size of Equation 4as per Definition 34.The f -factor H is defined as follows.An edge (v, w) ∈ E(G) is in H if and only if the edge (v e , w e ) / ∈ M .We now argue that H contributes m.Consider the first condition in Definition 34.Since e = (v, w) ∈ E(H), it must be the case that (v e , w e ) / ∈ M .Since M is a perfect matching and the vertices v e and w e each have exactly one neighbor other than each other, it must be the case that M contains edges e 1 and e 2 where e 1 = (u, v e ) for some u ∈ A(v) and e 2 = (u , w e ) for some u ∈ A(w).The fact that the second condition is satisfied follows directly from the definition of H.For the third condition, suppose that for some 1 ≤ p, q ≤ r, and e = (u, v) ∈ E(G), it holds that {u, v e } = {i p , j p } and {u , w e } = {i q , j q }.The fact that M corresponds to m implies that the edges (u, v e ) and (u , w e ) are in M , which in turn implies that the edge (v e , w e ) is not in M .Hence, by definition of H, we conclude that e ∈ E(H).An analogous argument implies that the fourth condition is satisfied as well.We now come to the final condition.Suppose that 1 ∈ I ⊆ [ ] such that H has no edge crossing the cut (Q(I), Q(I)).Now, observe that for every (v, w) ∈ E(G) which crosses the cut (Q(I), Q(I)) the edge e / ∈ E(H), which by definition implies that (v e , w e ) ∈ M .We define M to be the subset of edges (v e , w e ) ∈ M which cross the cut (Q(I), Q(I)).Hence, for every edge (v e , w e ) in M \ M , the vertices v and w lie on the same side of the cut (Q(I), Q(I)).We now define a partition M M of M \ M as follows.For v ∈ V (G) and u ∈ V (B), an edge (u, v e ) ∈ M is in M if and only if v ∈ Q(I).Clearly, M M M is now a partition of M .Furthermore, it is easy to see M is a perfect matching of Due to Proposition 28, we know that M corresponds to a surviving monomial m in the simplified expansion of det T (B[Q(I)]) and M corresponds to a surviving monomial m in the simplified expansion of det T (B[Q(I)]).Finally, let m denote the monomial (i k ,j k )∈ M x 2 i k j k .It is easy to see that m = m • m • m.Furthermore, m = m I .Hence we conclude that m is indeed contributed by H and proceed to the remaining two statements of the lemma.However, before we prove the remaining statements, we need the following claim.We now prove the second statement of the claim.Here, there must be vertices v, w ∈ V (G) such that v ∈ Q(I), w ∈ Q(I) and (v, w) ∈ H. Therefore, by Definition 34, we have that no monomial contributed by H has the term x 2 jk where {j, k} = {v e , w e }.However, m I contains the term x 2 jk by definition.Therefore, H does not contribute a monomial to det T Let α be the number of connected components of the graph H/Q.If H is an ffactor of G that does not connect Q it must be the case that α > 1. Due to the above claim, observe that there are exactly 2 α sets I such that H contributes each of its monomials exactly once to the simplified expansion of the right hand side of Equation 4 and H does not contributes any monomials to any other sets I. Since 2 α is even for α ≥ 1, we conclude that Statement 1 holds.
We now move on to Statement 2. That is, we assume that H is an f -factor that connects Due to the above claim, we know that H does not contribute a monomial to any polynomial det T such that H has an edge which crosses the cut (Q(I), Q(I)).However, since H connects Q, it crosses every (Q(I), Q(I)) cut where 1 ∈ I ⊂ [ ].But observe that since H is an f -factor of G it will contribute a monomial to the polynomial det T Hence, we conclude that any monomial contributed by H occurs exactly once in the naive expansion of the righthand side of Equation 4, completing the proof of the lemma.
This implies the following result, which is the last ingredient we need to prove Lemma 23.
Lemma 36 The polynomial P Q (x) is not identically zero over F if and only if G has an f -factor connecting Q.
Proof of Lemma 23.It follows from the definition of P (x) that its degree is O(n 4 ) since the number of vertices in the f -blowup of G is O(n 2 ).As mentioned earlier, our algorithm for ∃-PARTITION CONNECTOR takes as input G, f, Q, evaluates the polynomial P Q (x) at points chosen independently and uniformly at random from a field F of size Ω(n 6 ) and characteristic 2 and returns YES if and only if the polynomial does not vanish at the chosen points.Due to Lemma 36, we know that the polynomial P Q (x) is identically zero if and only if G has an f -factor containing Q and by the Schwartz-Zippel Lemma, the probability that the polynomial is not identically zero and still vanishes upon evaluation is at most 1 n 2 .This completes the proof of the lemma.
Having obtained the algorithm for ∃-PARTITION CONNECTOR, we now return to the algorithm for the computational version, PARTITION CONNECTOR.

Solving PARTITION CONNECTOR in Randomized Polynomial Time
Proof of Lemma 19.Consider the following algorithm A. Algorithm A takes as input an n-vertex instance of PARTITION CONNECTOR with the partition Q = {Q 1 , . . ., Q }, along with a separate set of edges F that have been previously selected to be included in the partition connector.Let F be initialized as ∅.As its first step, Algorithm A checks if = 1; if this is the case, then it computes an arbitrary f -factor H, and outputs H ∪ F .To proceed, let us denote the algorithm of Lemma 23 as A .If > 1, then A first calls A and outputs NO if A outputs NO.Otherwise, it fixes an arbitrary ordering E ≤ of the edge set E and recursively proceeds as follows.
A constructs the set E 1 of all edges with precisely one endpoint in Q 1 , and loops over all edges in E 1 (in the ordering given by E ≤ ).For each processed edge e = (v, w) between Q 1 and some Q i (i = 1), it will compute a subinstance (G e , f e , Q e ) defined by setting: -G e = G − e, and -f e (v) = f (v) − 1, f e (w) = f (w) − 1 and f e = f for all the remaining vertices of G, and -Q e is obtained from Q by merging Q 1 and Q i into a new set; formally (assuming Intuitively, each such new instance corresponds to forcing the f -factor to choose the edge e.A then queries A on (G e , f e , Q e ).Before arguing correctness, we show that the algorithm runs in the required time.Since each edge in the partitioning is processed at most times, the runtime of A is asymptotically upper-bounded by its at most • n 2 ≤ n 3 many calls to A .From Lemma 23, we then conclude that the total runtime of A(G, f, Q) is upper-bounded by 2 • n O (1) .
For correctness, let us first consider the hypothetical situation where A always answers correctly.If no partition connector exists, then A correctly outputs NO after the first call to A .Otherwise, there exists a partition connector, and such a partition connector must contain at least one edge in E 1 at every recursion of the algorithm.This implies that A would output YES for at least one edge e of E 1 .Moreover, it is easily seen that for any partition connector T containing e, T \ {e} is also a partition connector in (G e , f e , Q e ), and so by the same argument A would also output YES for at least one edge in the individual sets E 1 constructed in the recursive calls of A. In particular, if A would always answer correctly, then A would correctly output a partition connector H ∪ F at the end of its run.For further considerations, let us fix the set F which would be computed by A under the assumption that A always answers correctly; in other words, F is the lexicographically first tuple of edges in E 1 which intersects a partition connector.
We are now ready to argue that A succeeds with the desired probability; recall that A only allows one-sided errors.So, if the input is a no-instance, then A is guaranteed to correctly output NO after the first query to A .Furthermore, by the definition of F , for each edge e ∈ F processed by A, the algorithm A must also answer NO on (G e , f e , Q e ).So, assuming A always answers correctly, in total A would only be called at most times on yes-instances, and in all remaining calls it receives a noinstance.Given that A has a success probability of at least 1 − 1 n 2 , the probability that A is called at most |F | + 1 = times on YES-instances (not counting the initial call on G), and that it succeeds in all these calls, is at least (1 − 1 n 2 ) .Hence the error probability of the algorithm is at most 1 − (1 − 1 n 2 ) .This completes the proof of the lemma.

Classification Results
In this section, we prove Theorem 4 which we restate for the sake of completeness.
Theorem 4 For every c > 1 and for every g(n) ∈ Θ((log n) c ), CONNECTED g-BOUNDED f -FACTOR is neither in P nor NP-hard unless the Exponential Time Hypothesis fails.
The result relies on the established Exponential Time Hypothesis, which we recall below.
Definition 37 (Exponential Time Hypothesis (ETH), [8]) There exists a constant s > 0 such 3-SAT with n variables and m clauses cannot be solved in time 2 sn (n + m) O (1) .
We first show that the problem is not NP-hard unless the ETH fails.We remark that we can actually prove a stronger statement here by weakening the premise to "NP is not contained in Quasi-Polynomial Time".However, since we are only able to show the other part of Theorem 4 under the ETH, we phrase the statement in this way.
Lemma 38 For every c > 1 and for every g(n) ∈ Θ((log n) c ), CONNECTED g-BOUNDED f -FACTOR is not NP-hard unless the Exponential Time Hypothesis fails.
Proof.Due to Theorem 2, we know that when g(n) ∈ Θ((log n) c ), CONNECTED g-BOUNDED f -FACTOR can be solved in quasi-polynomial time.Hence, this problem cannot be NP-hard unless NP is contained in the complexity-class Quasi-Polynomial Time, QP.Furthermore, observe that NP⊆ QP implies that the ETH is false.Hence, we conclude that CONNECTED g-BOUNDED f -FACTOR is not NP-hard unless the Exponential Time Hypothesis fails.
Next, we use a reduction from HAMILTONIAN CYCLE to obtain: Lemma 39 For every c > 1 and for every g(n) ∈ Θ((log n) c ), CONNECTED g-BOUNDED f -FACTOR is not in P unless the Exponential Time Hypothesis fails.
Proof.Assume for a contradiction that CONNECTED g-BOUNDED f -FACTOR is in P for some g(n) ∈ Θ((log n) c ) and c > 1.Let us fix this function g for the remainder of the proof.In particular, there exists constants c 1 and > 0 such that g(n) ≥ c 1 (log n) 1+ for sufficiently large n.The proof is structured as follows.First, we present a subexponential time reduction from HAMILTONIAN CYCLE to CON-NECTED g-BOUNDED f -FACTOR.We then show that such a reduction would imply a subexponential time algorithm for HAMILTONIAN CYCLE, which is known to violate ETH [8].
The reduction algorithm R takes a graph G on z vertices as input, computes s = problem can be solved in polynomial time when f (v) is at least n c for any constant c.We complement the picture with matching classification results.
As a by-product we obtain a generic approach reducing CONNECTED f -FACTOR to the "simpler" PARTITION CONNECTOR problem.Hence future algorithmic improvements of PARTITION CONNECTOR carry over to the CONNECTED f -FACTOR problem.Finally, it would be interesting to investigate the possibility of derandomizing the polynomial time algorithm for the case when g(n) = O(log n).

Definition 9
Let M and H be two subgraphs of G where each component in M is Eulerian.Let c : E(M ) → {red, blue} be the unique coloring function which colors the edges in E(M ) ∩ E(H) with color red and those in E(M ) \ E(H) with color blue.The subgraph M is called a switch on H if every component of the colored graph obtained by applying c on M , is an alternating circuit.Definition 10 For a subgraph M which is a switch on another subgraph H of G, we define Switching(H,M ) to be the subgraph M H of G.

Theorem 13 (
a) Let g(n) ∈ O(polylog(n)).If there is a deterministic algorithm running in time O * (n 2(|Q|−1) ) 1 for PARTITION CONNECTOR, then there is a deterministic quasi-polynomial time algorithm for CONNECTED g-BOUNDED f -FACTOR with running time O * (n 2g(n) ).(b) Let g(n) ∈ O(log n).If there exists a randomized algorithm running in time O * (2 |Q| ) with error probability O(|Q| 2 /n 2

Fig. 2
Fig. 2 An illustration of a graph G a 2-factor H (the red dashed edges) and one possible corresponding perfect matching in B(G) (thick edges).It is important to note that an edge e = (v, w) is not in H if and only if the edge (ve, we) is present in the corresponding perfect matching.

x 2 ij
where i < j and {i, j} = {v e , w e }, e = (v, w) ∈ E(G) crosses the cut (Q(I), Q(I)) and v e , w e , are as in Definition 24 of the f -blowup B(G) of G.For I = [ ], we define m I = 1.

1 .
If there is no edge of H crossing the cut (Q(I), Q(I)), then each monomial contributed by H to the naive expansion of the polynomial detT (B[Q(I)]) • det T (B[Q(I)]) • m I is contributed exactly once.2.If there is an edge of H crossing the cut (Q(I), Q(I)) then H does not contribute a monomial to the naive expansion of the polynomial detT (B[Q(I)]) • det T (B[Q(I)]) • m I .Proof.We begin with the proof of the first statement.By Definition 34 it holds that every monomial contributed by H contains m I .Let H be the subgraph of H induced on Q(I) and let H be the subgraph ofH induced on Q(I).Observe that H is an f -factor of G[Q(I)]and H is an f -factor of G[Q(I)].By Proposition 28 and Lemma 26, we know that every f -factor of G[Q(I)] (G[Q(I)]) appears exactly once in the naive expansion of det T (B[Q(I)]) (det T (B[Q(I)])) (since it is nothing but a perfect matching of the f -blowup induced by Q(I) or Q(I)).Therefore, each monomial corresponding to a perfect matching of B[Q(I)] which is equivalent to H appears exactly once in the naive expansion of the polynomial det T (B[Q(I)]); similarly, each monomial corresponding to a perfect matching of B[Q(I)] which is equivalent to H appears exactly once in the naive expansion of det T (B[Q(I)]).Since every monomial contributed by H to the naive expansion of det T (B[Q(I)]) • det T (B[Q(I)]) • m I is a product of m I and a monomial each from det T (B[Q(I)]) and det T (B[Q(I)]), and these monomials themselves occur exactly once in the naive expansion of det T (B[Q(I)]) and det T (B[Q(I)]) respectively, the first statement follows.
If A answers NO for each such tuple (G e , f e , Q e ) obtained from each edge e in E 1 , then A immediately terminates and answers NO.Otherwise, let e be the first edge where A answered YES; then A adds e into F .If |Q e | = 1 then the algorithm computes an arbitrary f -factor H of (G e , f e ) and outputs H ∪ F .On the other hand, if |Q e | > 1 then A restarts the recursive procedure with (G, f, Q) := (G e , f e , Q e ); observe that |Q e | ≤ |Q| − 1.
an n-vertex instance (G , f ) of CONNECTED g-BOUNDED f -FACTOR which satisfies the following conditions:1.f (v) ≥ n c1(log n) 1+ for every v in G .2.n is upper-bounded by a subexponential function of z.3.G has a Hamiltonian cycle if and only if (G , f ) contains a connected f -factor.