Manuscript Offprint
arXiv:2609.02317Characterizations and Complexity of Minimum Forward and Integer Cycle Bases
Abstract
The cycle space of a directed graph is generated by a cycle basis, where, in general, cycles are allowed to have both forward and backward arcs. In a forward cycle, all arcs must follow the given direction. Several open questions remain regarding the complexity of the minimum cycle basis problem for various families of cycle bases, in particular the minimum-weight integral cycle basis problem, and the minimum-weight weakly and strictly fundamental forward cycle basis problems. In this paper, we address these open questions.
First, we study the existence, structure, and computational complexity of minimum-weight forward cycle bases in directed graphs. We give a complete structural characterization of digraphs that admit weakly fundamental (and hence integral) forward cycle bases, showing that this holds if and only if every block is either strongly connected or a single arc. We further provide an easily verifiable characterization of when a strongly connected digraph admits a forward fundamental cycle basis, proving that such a basis exists if and only if the set of directed cycles has cardinality equal to the cycle rank; in this case, the basis is unique and computable in polynomial time, and nonexistence can likewise be certified efficiently. Lastly, we show that while minimum-weight forward fundamental cycle bases can be found in polynomial time whenever they exist, the minimum-weight forward weakly fundamental cycle basis problem is APX-hard via an L-reduction from the minimum-weight weakly fundamental cycle basis problem on digraphs with metric weights.
Second, we introduce the notion of opt-in graphs: the family of graphs for which minimum cycle bases are integral for any weight function. We show that the family of opt-in graphs is minor-closed and hence, by the Robertson–Seymour theorem, is characterized by a finite set of forbidden minors, yielding a non-constructive proof that the opt-in recognition problem is solvable in polynomial time. Lastly, we present an algorithm to check whether a graph is opt-in, and if not, to identify which of its minors belong to the set of forbidden minors. Applying this algorithm, we show that the complete graph is opt-in if and only if .
Keywords: cycle bases, forward cycle bases, fundamental cycle bases, weakly fundamental cycle bases, integer cycle bases, minimum cycle basis, complexity
1 Introduction
Cycle bases provide a compact representation of all cycles in a graph and play a key role in optimization problems such as periodic scheduling, electrical network analysis, and modeling of chemical and biological pathways (see, e.g., Kavitha et al. [8]). Different optimization contexts call for different classes of cycle bases. For instance, aiming at railway timetable optimization, Nachtigall [13] introduced a mixed-integer programming formulation of the periodic event scheduling problem (PESP) based on fundamental cycle bases, which was later extended to integral cycle bases by Liebchen and Peters [9] and to forward cycle bases by Lindner et al. [10] and Masing et al. [12]. The choice of cycle basis can significantly influence computational efficiency, motivating the study of minimum-weight cycle basis problems for each class of cycle bases.
While existence and complexity results are well established for many classes of cycle bases [1], an exception is the computational complexity of the minimum-weight integral cycle basis problem, which remains open. Forward cycle bases are less well understood. In [6], Gleiss, Leydold, and Stadler show that a digraph admits a forward cycle basis if and only if each block is either strongly connected or a single arc, and that a minimum-weight forward cycle basis can be computed in polynomial time. Masing et al. [12] show that forward cycle bases can improve the efficiency of branch-and-cut in integral cycle basis formulations of PESP. They also prove that any graph admits an orientation with a strictly fundamental forward cycle basis, and that a forward integral cycle basis always exists for so-called line-based event-activity networks constructed from a public transport line plan.
Several open questions remain regarding the structure and complexity of both integral and forward cycle bases. These include identifying structural graph properties that guarantee the existence of integral, weakly fundamental, and strictly fundamental forward cycle bases, establishing the computational complexity of deciding their existence, and addressing the optimization challenge of computing a minimum-weight basis within a given class. For instance, while the minimum integral cycle basis problem can be solved on planar graphs using Horton's algorithm over isometric cycles [8], the broader graph classes for which this algorithmic approach remains valid are unknown. Delineating these structural boundaries represents a step toward settling the exact computational complexity of the problem. Finally, from an applied perspective, when a strict forward cycle basis cannot be guaranteed, a new optimization problem arises: determining a cycle basis that maximizes the total number of forward cycles.
The paper is organized as follows. In Section 2, we introduce basic notions and definitions related to directed graphs, cycle spaces, and various classes of cycle bases. Section 3 presents results on the existence of forward cycle bases and characterizations of weakly fundamental and fundamental forward cycle bases. In Section 4, we establish the APX-hardness of the minimum-weight forward weakly fundamental cycle basis problem via an L-reduction from the (non-forward) minimum-weight weakly fundamental cycle basis problem with metric weights. In Section 5, we introduce opt-in graphs – those for which classical minimum cycle basis algorithms return an integral cycle basis for any weight function – and show that this family is minor-closed and hence fully characterized by a finite set of forbidden minors due to the Robertson–Seymour theorem [16]. Section 6 establishes several key structural properties of the set of forbidden minors , and Section 7 presents a recursive algorithm to determine membership in , which we use to fully characterize opt-in-ness for complete graphs. Finally, Section 8 summarizes our contributions and outlines open questions for future research.
This paper extends a previous conference paper [14]. The APX-hardness result in Section 4 and all content in Sections 5-7 are new.
For a forest , i.e., a subgraph that does not contain any cycle, we write
for the set of chords (arcs not in ). If , then is spanning. A weakly connected forest is a tree.
If is a field, and , then denotes the coordinate of corresponding to the arc . The support of a vector is denoted
We often identify the vector with the set and write “” to mean (equivalently ). In particular, we interpret a cycle in as a vector in that we also call as follows: If with , the incidence vector is given by
Definition 2.1 (cycle space). The cycle space of over a field is the subspace of defined by:
The dimension of the cycle space of is called cycle rank (cyclomatic number, cyclotomic number) and is denoted by . By means of its incidence vector, any cycle in can be seen as an element of the cycle space.
Definition 2.2 (classes of cycle bases). A cycle basis of is a basis of composed of incidence vectors of cycles in . Moreover, we call :
-
directed: if is a cycle basis of .
-
undirected: if is a basis of , where is the finite field with two elements.
-
integral: if any cycle of can be written as an integer linear combination of vectors in .
-
weakly fundamental (Whitney [19]): if there exists an ordering of vectors in such that for all there exists such that .
-
(strictly) fundamental: if there exists a spanning forest in such that , where is the only cycle contained in .
For an in-depth introduction to cycle spaces and bases, we refer to [8], from which we adopt the same notation. Definition 2.2 in fact provides a hierarchy: Any fundamental cycle basis is weakly fundamental, any weakly fundamental cycle basis is integral, any integral cycle basis is undirected, and any undirected cycle basis is directed [8].
For and , we can either have (“ is forward”) or (“ is backward”). We write if for all , i.e., if contains only forward arcs. In particular, this holds for any directed cycle. We further define
Definition 2.3 (forward cycle basis). A cycle basis of is a forward cycle basis if all cycles in are directed.
We prefer the term forward, since “directed cycle basis” is used in [8] and in Definition 2.2 for an arbitrary cycle basis of , although the latter need not be composed of directed cycles. In the same way as arbitrary cycle bases, forward cycle bases can be categorized as directed, undirected, integral, weakly fundamental, or fundamental.
Lastly, the notion of separability is essential to characterize digraphs that admit a forward cycle basis:
Definition 2.4 (separable digraph). A digraph is separable if there exists a vertex such that the digraph is not weakly connected.
If a graph is separable, its maximal non-separable subgraphs form a partition and are called blocks of . We briefly note that the cycle space of a digraph naturally decomposes into the direct sum of the cycle spaces of its blocks:
Observation 2.5. Let be the set of blocks of a digraph . Then, for any field ,
In particular, a directed/undirected/integral/weakly fundamental/fundamental cycle basis for can be constructed by assembling directed/undirected/integral/weakly fundamental/fundamental cycle bases for each block.
To answer the question regarding the existence of forward weakly fundamental and integral cycle bases, we will use the concept of ear decomposition of a directed graph. A (directed) ear of a subgraph of is a (directed) path or cycle in such that only the first and last vertex of are in while all the interior vertices of are not in .
Definition 2.6 ((directed) ear decomposition). A (directed) ear decomposition of a digraph with at least two vertices is a sequence of nested subgraphs such that
-
is a (directed) cycle,
-
, where is a (directed) ear of for .
It is a known result in graph theory that a digraph admits a directed ear decomposition if and only if it is strongly connected.
Proposition 2.7 ([1]). A strongly connected digraph admits a directed ear decomposition . Furthermore, and the ear decomposition can be computed in time.
3 Results on the existence of forward cycle bases
In this section, we answer questions regarding the existence of integral, weakly fundamental, and strictly fundamental forward cycle bases.
Proposition 3.1. Let be a digraph. The following are equivalent:
-
admits a forward weakly fundamental cycle basis.
-
admits a forward integral cycle basis.
-
admits a forward undirected cycle basis.
-
admits a forward directed cycle basis.
-
Each block of is strongly connected or a single arc.
Proof. The equivalence of (4) and (5) is Theorem 7 in [6]. The implications (1) are clear. Now assume that (5) holds. By Observation 2.5, if there exists a weakly fundamental cycle basis for each block of , a forward weakly fundamental cycle basis can be naturally obtained for . Therefore, we only need to show that a weakly fundamental cycle basis exists for a block of . The case of a single arc is trivial. Otherwise, is strongly connected. Therefore it admits a directed ear decomposition by Proposition 2.7.
From this ear decomposition, we can construct a weakly fundamental cycle basis as follows: Let . For , consider the ear and let be the first and last vertex of . Since is strongly connected, there exists a directed walk from to in . Since and is an ear of , the only vertices in are and , thus is a directed cycle. The set is a weakly fundamental cycle basis of , since , and for all , there is an edge that is not contained in .
In particular, every strongly connected digraph has a forward weakly fundamental cycle basis, as it admits a directed ear decomposition (Proposition 2.7).
Similarly, when not all blocks of are either a single arc or strongly connected, we can consider the following extremal cycle basis problem [12]: Find a cycle basis such that the number of directed cycles is maximum. We obtain:
Proposition 3.2. Let be a digraph, let be a directed, undirected, integral, or weakly fundamental cycle basis of with a maximum number of directed cycles, and let be the set of strongly connected components of . Then
Proof. Any directed cycle in is contained in some strongly connected component of . In each component , we can have at most linearly independent cycles, so that for any cycle basis of holds .
We will now construct a weakly fundamental cycle basis of such that (2) holds. At first, we choose a spanning tree of each strongly connected component of . We then connect these trees to a spanning forest of and consider the corresponding fundamental cycle basis of . Any strongly connected digraph admits a forward cycle basis and hence a forward weakly fundamental cycle basis by Proposition 3.1. In , for each strongly connected component , we consider the cycles that arise from chords in . These constitute a fundamental cycle basis of , which we replace by a forward weakly fundamental cycle basis of . This way, we can transform to a weakly fundamental cycle basis of that contains precisely directed cycles.
A different proof for Proposition 3.1 and 3.2, using a notion of cycle subspaces and a contraction argument, is given by Masing [11].
As noted in [12], not all digraphs admit a forward fundamental cycle basis. We now show an easily verifiable characterization of digraphs which admit a forward fundamental cycle basis.
We will make use of the following lemma that states that every element of the cycle space with forward arcs only lives in the cone generated by the directed cycles.
Lemma 3.3 ([1]). Let be a directed graph and let with . Then there exist nonnegative scalars such that
Moreover, if has integer coordinates, then the coefficients can be chosen to be integers.
We can now give our surprisingly simple characterization.
Theorem 3.4. Let be a digraph such that each block is strongly connected or a single arc. Then admits a forward fundamental cycle basis if and only if
In this case, constitutes the unique forward cycle basis of .
Proof. Assume that a forward fundamental cycle basis exists. Let be the spanning forest that induces the basis, and let denote the set of chords of . Then the cycle basis is
where denotes the unique cycle contained in . Note that for all and all , we have if and only if and otherwise. Since and , it suffices to show .
Let . As is an integral cycle basis, there exist integers with
For each chord the arc belongs only to the cycle among the cycles in , and moreover because is directed. Comparing the value of both sides on the arc we obtain
Thus if and otherwise. Hence is the sum of precisely those that correspond to the chords contained in . If more than one such appeared in the sum, the support of the sum would be a union of two or more arc-disjoint cycles. This contradicts that is a cycle. Therefore exactly one coefficient is 1 and the others are 0, so for some . Consequently , proving and hence .
Conversely, suppose , i.e., the family of directed cycles has a size equal to the cycle rank. Since by Proposition 3.1, a forward cycle basis exists and is contained in , it must be equal to . Given we define, for each , the set
Using the standard characterization of fundamental cycle bases [18], a cycle basis is fundamental if and only if for every there exists an arc such that
or equivalently, such that . Let . Consider the vector
We prove that is non-negative. For every , we clearly have . Suppose now that . Then
since was chosen to be minimum and as is forward. Then, by Lemma 3.3, there exists for all such that
Since , and is a basis of , the linear combinations in equation (3) and (4) have the same coefficients. In particular:
which implies as required.
Theorem 3.4 gives a polynomial-time algorithm at hand to decide whether a digraph admits a forward fundamental cycle basis: Check at first whether all blocks of are strongly connected or a single arc. If not, then cannot have a forward cycle basis by Proposition 3.1. Otherwise, compute a forward weakly fundamental cycle basis using a directed ear decomposition. We may then verify that for all , there exists such to check whether is also strictly fundamental. If yes, then we have found a forward fundamental cycle basis. If no, then cannot have a forward fundamental cycle basis, as the existence of such a basis would contradict the uniqueness of a forward cycle basis by Theorem 3.4.
4 APX-hardness of the Minimum-Weight Forward Weakly Fundamental Cycle Basis Problem
In this section, we consider the problem of finding forward cycle bases with a minimum weight. More precisely, let be a digraph endowed with arc weights . For each cycle in , we define its weight as
and the total weight of a cycle basis is given by
Definition 4.1. Given a digraph and arc weights , the minimum-weight forward (weakly fundamental, fundamental) cycle basis problem is to find a forward (weakly fundamental, fundamental) cycle basis of such that is minimum or to decide that no forward cycle basis exists.
While existence and complexity results of minimum not necessarily forward cycle bases are known, not much research has been done for their forward counterparts. Table 1 summarizes known complexity results for minimum cycle basis problems.
Table 1: Known computational complexity of the MCB problem for different classes of cycle bases.
| Type | Non-forward | Forward |
|---|---|---|
| Directed | P [7] | P [6] |
| Undirected | P [7] | P [6] |
| Integral | ? | ? |
| Weakly fundamental | APX-hard [15] | APX-hard* |
| Fundamental | APX-hard [5] | P* |
- New result.
? Unknown complexity status.
The existence of forward (weakly fundamental) cycle bases has already been characterized by Proposition 3.1. The problem is polynomial-time solvable for arbitrary forward cycle bases [6]. For forward fundamental cycle bases, we can use Theorem 3.4.
Corollary 4.2. A minimum-weight forward fundamental cycle basis of , if it exists, can be computed in polynomial time. If no such basis exists, its nonexistence can also be certified in polynomial time.
Proof. If a forward fundamental cycle basis exists, then it is unique by Theorem 3.4, and hence trivially optimal. We can decide the existence as discussed at the end of Section 3. □
The goal of the remainder of this section is to show that the minimum-weight forward weakly fundamental cycle basis problem is APX-hard. We give an L-reduction from the non-forward version on digraphs with metric weights, whose APX-hardness – even for uniform weights – has been established by Rizzi [15].
Let be a digraph and let further be metric arc weights, i.e., for any arc , is the cost of a shortest -path w.r.t. . We construct a directed graph by adding to , for each , the arc , with weight equal to . This transformation clearly produces a directed graph of size polynomial in , where each weakly connected component is strongly connected. Define
and
For the sake of constructing an L-reduction we need to prove that there exist such that:
- For all digraphs , we have
- For any weakly fundamental forward cycle basis of , we can find a weakly fundamental cycle basis of in polynomial time such that:
Observation 4.3. The cycle rank of is equal to
In particular, the cycle rank of exceeds that of by exactly . We now focus on a distinguished family of directed cycles in . For each arc , let denote the directed 2-cycle in formed by the arcs and . Since is metric, is a smallest weight cycle in containing . These cycles constitute precisely the set
of all 2-cycles of .
Furthermore, for every cycle in , we define a directed counterpart by choosing, for each arc , one of the two orientations or such that is a directed cycle in . We call a directed lift of in . There are exactly two such directed lifts, corresponding to the two traversal directions of ; either choice is admissible, and we fix one. In particular, for every , there exists such that . See Figure 1 for an illustrative example.
Finally, there is a natural extension of any cycle basis of to a forward cycle basis of , obtained by augmenting the set with the 2-cycles :
Lemma 4.4 (Forward lifting cycle bases). If is a cycle basis of , then
is a forward cycle basis of .
Proof. Since (Observation 4.3), it suffices to show that spans the cycle space . Observe that for every cycle in , the vector
has support in , as this corresponds to substituting arc in with whenever is not in by subtracting the cycle from . In particular, , so that . It now suffices to show that each cycle lies in . However, in this case , and (8) realizes as a linear combination of and elements of .

Figure 1: Reduction applied to the Wagner graph with highlighted 2-cycle, and cycle lifting.
Lemma 4.5 (Weakly fundamental lifting and weights). Let be any weakly fundamental cycle basis of . Then is a forward weakly fundamental cycle basis of and
In particular, lifting increases the objective by an additive constant independent of the choice of and
Proof. Since is weakly fundamental, there exists an ordering of the cycles , where , such that for every there is an arc with . Then also and .
An ordering that makes weakly fundamental is therefore obtained by first listing the cycles in , then , and subsequently, for each , placing immediately before . Since exactly one of or belongs to , while both are contained in , this ordering ensures that is indeed weakly fundamental.
Verifying (9) and (10) is straightforward.
To complete the reduction, we must prove the converse: There is an optimal forward weakly fundamental cycle basis of that is obtained as a lifting of an optimal weakly fundamental cycle basis of . First, we prove that we can easily construct an optimal forward weakly fundamental cycle basis of that contains the cycles in :
Lemma 4.6 (Containment of in forward cycle bases). For every forward weakly fundamental cycle basis , we can find in polynomial time a forward weakly fundamental cycle basis of such that and .
Proof. Let be a forward weakly fundamental cycle basis of . We order the basis such that for every index there exists an arc with . Removing the chord set from yields a spanning forest : If we remove from , all weakly connected components remain connected, the cycle rank of the resulting graph drops by exactly one, and is weakly fundamental cycle basis. Iterating this process, we ultimately arrive at a spanning forest [15].
By construction each cycle is contained in . Let
be the family of all directed cycles that lie inside and contain . A forward weakly fundamental basis can be obtained by choosing, for each , any directed cycle of minimum weight in . In particular, , and hence . can be found by concatenating with a shortest path in from the head to the tail of .
We show that we can choose so that . For each we proceed as follows: Consider the corresponding 2-cycle in . Since is a spanning tree of , it cannot contain both and its reverse . Consequently, at least one of these two opposite arcs coincides with a chord . Let be the largest index such that is one of the two arcs of .
By construction, we have
which implies . Moreover, is a minimum-weight cycle in , and we can pick . The resulting basis is a forward weakly fundamental cycle basis satisfying , and as claimed.
Lemma 4.7 (Projection to the original problem). Let be a forward weakly fundamental basis of that contains . Then, removing the family from and projecting each remaining directed cycle to its underlying cycle in yields a weakly fundamental cycle basis of . Moreover,
Furthermore, if has minimum weight, so does .
Proof. Consider and define for each the projection by setting, for every ,
Because is weakly fundamental in there exists an ordering of its cycles in which each cycle contains an arc not used by any earlier cycle. Defining , this induces an ordering of .
We claim that for every , the arc with does not belong to any cycle with . Indeed, by construction, is not contained in any cycle preceding in the original ordering of ; hence no earlier contains the same directed arc. In particular, the cycle appears after in the ordering. But then also any cycle in containing can only appear later than . We conclude that is weakly fundamental in , as required.
Equation (11) follows from the fact that the weights of the cycles in are equal to the weights of the cycles in and that . Then (11) implies that
and together with Lemma 4.5, this implies that the inequality is actually an equality. Therefore, if is minimum, then is a minimum-weight weakly fundamental cycle basis of .
Theorem 4.8 (APX-hardness). The minimum-weight forward weakly fundamental cycle basis problem is APX-hard. The APX-hardness persists when the weights are metric or uniform.
Proof. Given an instance of the minimum-weight weakly fundamental cycle basis problem with metric/uniform weights, we construct with metric/uniform weights in polynomial time. Due to Observation 2.5, we can assume that is 2-connected. By Lemma 4.7, we have the following cost relation:
Since every arc in a 2-connected graph is contained in at least one cycle of a cycle basis, we have . Hence, for , we find .
Furthermore, given a forward weakly fundamental cycle basis of , by Lemma 4.6 we can find a forward weakly fundamental cycle basis of smaller or equal weight containing . By Lemma 4.7, we can then obtain a weakly fundamental cycle basis of in polynomial time such that . Subtracting from both sides and substituting Equation (13), it directly follows that:
Thus Equation (6) holds with , and our reduction is indeed an L-reduction of the minimum-weight forward weakly fundamental cycle basis problem from the minimum weakly fundamental cycle basis problem, which is APX-hard for uniform weights on 2-connected graphs [15].
For completeness, we finally show that the assumption that has metric weights is necessary for our reduction to work. We present a counterexample for which Lemma 4.6 and Lemma 4.7 do not hold.
Example 4.9. Consider the digraph with and with weights and . In there exists a unique cycle ; in particular, forms the minimum-weight weakly fundamental cycle basis of .
However, is not a minimum-weight forward weakly fundamental cycle basis of , since it has weight 15, while the forward weakly fundamental cycle basis
is optimal and has weight 14. Thus, Lemma 4.7 does not hold for non-metric weights, as is not an optimal forward weakly fundamental cycle basis of . Moreover, Lemma 4.6 does not hold, as any forward cycle basis of containing all three cycles in must have weight at least 15.
5 Integrality of Minimum Cycle Bases
While the exact computational complexity of the minimum integral cycle basis problem remains an open question for general graphs, it is polynomial-time solvable for planar graphs. In particular, any algorithm that computes a minimum cycle basis over the subset of isometric cycles yields an integral cycle basis, since isometric cycle bases are always integral in planar graphs [15]. This raises a natural structural question: under what general conditions does a minimum directed cycle basis algorithm inherently guarantee integrality?
More formally, we address the following problem: for which graphs does a minimum cycle basis algorithm yield an integral cycle basis under any possible weight assignment?
Definition 5.1 (opt-in/opt-out). We say that a graph is opt-in (OPTimal Integer) if, for every edge weight assignment, the weight of a minimum directed cycle basis equals the weight of a minimum integral cycle basis. Conversely, a graph that is not opt-in is called opt-out.
Observation 5.2. The opt-in/opt-out notion does not depend on the orientation of the arcs, so that this in fact a property of the underlying undirected graph: The cycle spaces of two different orientations are isomorphic, and the cycle basis determinant remains the same up to sign [8]
While Definition 5.1 might initially appear slightly decoupled from the algorithmic question posed at the beginning of this section, the two are closely related: if a minimum directed cycle basis algorithm always returns an integral cycle basis on a given graph, then the weight of a minimum directed cycle basis and the weight of a minimum integral cycle basis necessarily coincide, so the graph is opt-in. The converse that being opt-in in turn forces such algorithmic behavior is established by the following proposition.
Proposition 5.3. Let be an opt-in graph. Any greedy minimum cycle basis algorithm (e.g. Horton's or de Pina's algorithm) that breaks weight ties according to a fixed lexicographic order on the arcs returns an integral cycle basis. In particular, the minimum integral cycle basis problem on opt-in graphs can be solved in polynomial time by such an algorithm.
Proof. Let be an opt-in graph. We begin by perturbing the arc weights so that the weight of a cycle uniquely determines the set of arcs composing it.
Let be a finite-length weight function, and fix an ordering . For each arc , define the perturbed weight
where k-1 is the smallest (most negative) decimal exponent appearing in the representation of w.
With this choice, the weight of any cycle uniquely encodes its arc incidence: the digit in position is equal to 1 if and only if . Hence, uniquely identifies .
Consider the perturbed minimum directed cycle basis problem . The minimum cycle basis is unique. Indeed, any optimal cycle basis has the same nondecreasing sequence of cycle weights [8], and under the perturbation each weight corresponds to a unique cycle. Therefore, the weight sequence identifies a unique cycle basis . Since is opt-in, must be an integral cycle basis.
We now run a minimum directed cycle basis algorithm on , breaking ties lexicographically according to the vectors
where denotes the incidence of in , as described in [8]. We claim that comparing two cycles of under is equivalent to comparing them under with ties broken lexicographically by incidence vector. Indeed, if , then since , the perturbation cannot exceed the gap , so if and only if . If instead , then , whose sign is determined by the most significant index at which and disagree, which is exactly the lexicographic comparison of their incidence vectors.
The resulting cycle basis is then also optimal for . By the above, is integral.
All planar graphs are opt-in. In fact, opt-in graphs share another important property with planar graphs: the class is minor-closed.
Theorem 5.4. If a graph D is opt-in, then any minor of D is also opt-in.
Proof. It suffices to show that if a opt-out graph is obtained from a graph by edge deletion, vertex deletion, or edge contraction, then is also opt-out.
We first consider edge deletion. Let and define . If is opt-out, there exists a weight assignment such that no directed minimum cycle basis of is integral. Define a weight assignment on by setting for all , and choosing to be strictly larger than the maximum weight of any cycle appearing in a minimum cycle basis of .
With this choice of weights, the greedy algorithm for computing a minimum cycle basis of necessarily selects a cycle basis entirely contained in , since any cycle using is too expensive. After these cycles are chosen, the algorithm completes the basis by adding a minimum-weight cycle containing . Because the resulting minimum cycle basis of contains a non-integral set of linearly independent cycles coming from , it cannot be integral.
If is an isolated vertex of and is opt-out, then trivially is also opt-out. Since vertex deletion can be realized as a sequence of deletions of incident edges followed by the deletion of a disjoint vertex, the claim also holds for vertex deletion.
Finally, consider edge contraction. Let and define . Assume that is opt-out. Extend any weight assignment on to by setting . Then any minimum cycle basis of induces a cycle basis
of of equal weight. In general the quotient of a cycle is not a cycle if but . However, since , any cycle in a minimum cycle basis containing both vertices and must also contain . So is indeed a cycle for any in a minimum cycle basis of .
Moreover, this operation preserves the determinant of the cycle basis. Indeed, the set of chords of corresponding to a spanning tree coincides with the set of chords of corresponding to the spanning tree . Thus there is a bijection between minimum cycle bases of and that preserves both weights and integrality. Consequently, if is opt-out, then so is .
The Robertson–Seymour theorem [3, 17] states that every minor-closed family of graphs can be characterized by a finite set of forbidden minors. A direct consequence of Theorem 5.4 is the following:
Corollary 5.5. There exists a finite minimal set of opt-out graphs that completely characterizes the class of opt-out (and hence opt-in) graphs.
By Observation 5.2, we can view as a set of undirected graphs. For any fixed graph , deciding whether an undirected graph contains as a minor can be done in polynomial time in the size of , with a constant factor that depends superpolynomially on the size of [16]. Consequently, deciding whether contains a fixed member of as a minor can also be performed in polynomial time.
Corollary 5.6. There exists a polynomial-time algorithm to decide whether a given graph is opt-in or opt-out.
However, this result is non-constructive: in order to explicitly obtain such an algorithm, one would first need to determine the set of forbidden minors .
Observation 5.7. We could also have defined opt-in in terms of minimum undirected cycle bases. While this changes the set of opt-in graphs, the results and proofs of this section remain valid.
6 Basic results for graphs in
Identifying the minimal set of forbidden minors would allow one to efficiently determine whether a minimum cycle basis algorithm can be safely used to solve the minimum integral cycle basis problem on a given graph. More broadly, we believe that identifying such forbidden minors could contribute to understanding the complexity of the minimum integral cycle basis problem. In particular, graphs in exhibit the essential obstructions to minimum cycle basis algorithms and may therefore provide useful gadgets for complexity reductions, or provide better understanding of the structure of the problem.
Proving that a given graph belongs to requires establishing two conditions. First, one must prove that is opt-out, which can be accomplished by exhibiting a single edge-weight assignment for which no minimum cycle basis is integral. Second, one must prove that every graph obtained from by edge deletion or contraction is opt-in. Although Proposition 5.3 guarantees the existence of a polynomial-time algorithm for deciding opt-in-ness in general, this guarantee is non-constructive and itself presupposes knowledge of .
In this section, we establish several structural and combinatorial properties of graphs in .
Lemma 6.1. All graphs in are 2-connected with minimum degree 3.
Proof. For 2-connectivity, if has a cut vertex, then it decomposes into blocks with (Observation 2.5), so that a minimum cycle basis of restricts to a minimum cycle basis of each block independently, and is opt-out iff some block is. Therefore, if , then the number of blocks is exactly 1 and is 2-connected.
Concerning the minimum degree, a vertex of degree lies on no cycle and can be deleted without changing the cycle space. A vertex of degree exactly 2 subdivides the path between its two neighbors; contracting one of its two incident arcs leaves the cycle space structurally unchanged, so that and again share the same opt-in-ness status, precluding minimality.
Definition 6.2. For each cycle basis of , we define its coefficient vector by
With this notation, we have .
Let denote the set of directed cycle bases that are the unique minimum-weight basis for some weight , and split it as , where (respectively ) consists of the integral (respectively non-integral) members of .
Observation 6.3. Recall that by Proposition 5.3 and the perturbation argument in its proof, a graph is opt-out if and only if there exists a weight such that the minimum directed cycle basis w.r.t. is unique and non-integral. Therefore, a graph is opt-out if and only if ; and for each , there exists a weight vector such that
Lemma 6.4. If and , then .
Proof. If not, then some arc has (recall since is 2-connected, Lemma 6.1); let be the unique cycle of containing . Since is opt-in by minimality of , it has an integral cycle basis with weight at most that of , so is an integral basis of with . By the uniqueness assumption, , contradicting non-integrality of .
Interestingly, a graph being in forces some balancing constraints on the weight that induces a non-integral unique minimum cycle basis. In particular, must be a strictly metric weight, that is, for every , where is shortest-path distance in .
Lemma 6.5. Let and let be a weight vector such that is the unique minimum directed cycle basis for . Then is strictly metric.
Proof. Since every graph admits a minimum cycle basis that is isometric [8], uniqueness of implies it must be isometric: for any cycle and any two vertices , one of the two paths connecting and along is a shortest path in .
We proceed by contradiction. If is not metric, there exists an arc whose weight is larger than the weight of a shortest path between and in . By the perturbation argument in Proposition 5.3, we can assume that a set of arcs is uniquely identified by its weight, so that the shortest path is unique. Since the cycles in are isometric, any containing must be exactly . Therefore, is contained in exactly one cycle in . This contradicts (Lemma 6.4).
Let be a cycle of . An arc with non-consecutive on is a chord of . A cycle with no chord is chordless (equivalently, non-chordal, or induced).
Lemma 6.6 (Chordless minimum bases under strict metricity). If w is strictly metric on G, every minimum-weight directed cycle basis of D consists entirely of chordless cycles.
Proof. Let be a minimum-weight cycle basis and suppose some has a chord , splitting into its two subpaths (so ). Let and be the two cycles obtained by closing each subpath with the chord, so that . By Horton's exchange theorem [7], there exist such that is a cycle basis. Say , since is a path from to avoiding , strict metricity gives , hence
So , contradicting minimality of . Hence has no cycle with a chord.
Lemma 6.7. Any is a simple graph.
Proof. Let be the unique non-integral minimum cycle basis w.r.t. the strictly metric weights (Lemma 6.5). Suppose that has multiple arcs between the vertices and , ordered by ascending weight. As must be isometric and consist of simple cycles [8], if a cycle contains for some , its only arcs are and . We conclude that in , there is a unique cycle containing , contradicting Lemma 6.4.
The same argument that shows 2-connectivity (see Lemma 6.1) also shows that cannot have self-loops.
We summarize the structural findings of this section as follows:
Proposition 6.8. Let . Then is a 2-connected simple graph of minimum degree 3. Moreover, there exists a strictly metric weight such that the corresponding minimum directed cycle basis is unique, non-integral, and contains only chordless cycles.
Proof. This is a direct consequence of Proposition 5.3, Lemma 6.5, Lemma 6.6, and Lemma 6.7.
7 Determining membership in
In this section, we develop a recursive algorithm that can decide whether a graph is opt-in or opt-out based on determining membership in .
7.1 Certificates for non-membership in
We can use Lemma 6.4 to obtain a certificate that a graph is not a forbidden minor. We define the cone
and observe the following:
Lemma 7.1. If , then .
Proof. In this case, there are integral cycle bases such that
so that for any non-negative holds
for some . If as certified by , then by Lemma 6.4, so that , contradiction.
We can now see that while all planar graphs are opt-in, the family of opt-in graphs is strictly larger than the family of planar graphs, as demonstrated by the complete graph on five vertices:

Figure 2: Fundamental cycle basis induced by the star centered at vertex 1 in . A fixed is contained in exactly three fundamental cycles .
Example 7.2 ( is opt-in). For the complete graph we can consider the “star” spanning trees at each vertex . For the corresponding cycle basis , we have if , since is contained in exactly three cycles of , and otherwise (see Figure 2). Averaging the coefficient vectors of the five star bases , yields
By Lemma 7.1. . Since for every , is planar and hence opt-in, it follows that itself is opt-in.
In general, even for opt-in graphs, 2 need not be dominated by a convex combination of integral cycle basis vectors.
Example 7.3 (2 ∉ Q_I, but D ∉ X). The graph D obtained from the complete graph K_7 on the vertices 1, ..., 7 with the two arcs (5, 7) and (6, 7) removed has |A(D)| = 19 and cyclomatic number μ(D) = 13. We will see later that K_7 and hence D are opt-in. Under the uniform weight w = 1, the minimum cycle basis has weight 39 = 3 × 13, achieved by a basis of 13 triangles. If 2 ∈ Q_I, i.e., 2 ≥ ∑{i=1}^k λ_i c{B_i}, then 38 = 2 × 19 = w^T 2 ≥ min_{i=1, ..., k} w(B_i), giving a cycle basis of weight below 39 - impossible.
We therefore generalize the argument above.
Lemma 7.4. Let be a finite set such that . If for every non-integral exists a vector such that , then .
Proof. This is analogous to Lemma 7.1, replacing 2 with b.
Observation 6.3 implies that a graph is opt-in if and only if every strictly supported Pareto optimal solution with respect to the cost vectors is integral. While this connection implies that the opt-in-decision problem could theoretically be modeled and solved using traditional multi-objective optimization frameworks (such as Benson's algorithm [2]), such an approach is highly impractical: the computational complexity of multi-objective scalarization scales poorly with the number of objectives, which in our setting corresponds to the cardinality of the arc set . We therefore develop an ad-hoc recursive algorithm which classifies whether a graph is opt-in, and if not, determines the forbidden minors of . This is done by recursively checking whether each candidate is opt-out or not in : non-membership in is certified by finding a finite set as in Lemma 7.4. Otherwise, if during the search for a non-integral cycle basis is encountered, then the algorithm outputs opt-out(cf. Proposition 5.3). The same procedure is then applied recursively to all 1-minors (minors obtained by deleting or contracting one arc), until one of the known opt-in cases is met, e.g., (Example 7.2). If all 1-minors are opt-in and is not in , then is opt-in as well; otherwise, if is opt-out and every proper minor is opt-in this proves .
We then apply this algorithm to characterize opt-in-ness for complete graphs, showing that is opt-in if and only if . We describe the details of the algorithm in the subsequent subsections.
7.2 The domination linear program
To check that a vector is dominated by a convex combination of integral cycle bases, i.e., , our algorithm relies on the following linear program, which has optimal value 0 if and only if is dominated by a convex combination of the coefficient vectors for :
(LP)
The corresponding dual problem is:
Executing column generation given a restricted dual solution amounts to finding a cycle basis that minimizes , via a standard minimum cycle basis algorithm (e.g., De Pina's algorithm [4, 8]). Due to the equivalence of separation and optimization, the LP can hence be solved in polynomial time. If the pricing step ever produces a non-integral cycle basis, is opt-out by Proposition 5.3. Otherwise, upon termination, the LP determines whether is dominated. If so , then all with are also in , so that . If is not dominated , it cannot serve as a certificate on its own and must be systematically augmented into tighter lower-bounding vectors, as described in the next section.
7.3 A recursive parity-based domination test
The last step consists of finding a set that dominates at least one element and is itself dominated by . For a simple cycle of , denotes the standard basis vector at , and the incidence vector of 's arc set. Since the algorithm tests membership in at each step, we assume throughout and derive an algorithmically checkable contradiction otherwise. By Lemma 6.4, every has whenever . If , we are done with ; otherwise we must consider vectors larger than that still provably lower bound . The following lemma describes the augmentation step.
Lemma 7.5 (Recursive parity dichotomy). Let be a cycle basis of with , where is even for every and . Then at least one of the following holds:
-
there is an arc with ;
-
there is an undirected cycle of with .
Furthermore is even for every .
Proof. If 1 does not hold then . The arc set
is the support of . Since both and have even degree at every , must hence contain a simple cycle , and for every arc .
Algorithm 1 Refined domination test
Require: A 2-connected simple graph .
Ensure: is opt-out or not in
1: procedure DOMINATIONTEST()
2: open nodes
3: closed, dominated nodes
4: while do
5: Extract some
6: value of (LP) with target
7: if and the pricing step (LP) produced only integral cycle bases then
8:
9: else
10: if the pricing step in (LP) produced a non-integral cycle basis then
11: return “ is opt-out”
12: end if
13: for all do
14:
15: if for all and for all then
16:
17: end if
18: end for
19: for all simple undirected cycles of do
20:
21: if for all and for all then
22:
23: end if
24: end for
25: end if
26: end while
27: return “”
28: end procedure
We can now formulate an algorithm (Algorithm 1) that can decide whether a graph is opt-out or not a forbidden minor by implicitly enumerating a set satisfying the hypotheses of Lemma 7.4 making use of the restrictions imposed by Lemma 7.5.
Theorem 7.6 (Refined domination test). Algorithm 1 correctly decides whether is opt-out or not in .
Proof. Since for all cycle bases holds , we can restrict the search to only . The procedure hence terminates in finitely many steps, since the number of integral vectors is finite.
Suppose that . Then there is a cycle basis with (Lemma 6.4). The domination linear program (LP) then must detect opt-out-ness for , as the optimal value can only be reached by generating the column for . As “” can only be returned after has been enumerated by the algorithm, we therefore decide correctly.
Assume now that . There is nothing to show if is also opt-out. If is opt-in, then by Proposition 5.3, the pricing step of (LP) will never require a non-integral cycle basis, so that the algorithm returns that .
Pruning techniques
Since constructing via Lemma 7.5 alone yields enormous , to make algorithm 2 usable we use various pruning techniques to diminish the size of the set .
Chordless cycles. As we know by Lemma 6.6 that we can restrict to chordless cycle bases, we can restrict the number of candidates in Algorithm 1 by requiring
for all .
Arc count pruning. Depending on the structure of the graph, we may know without running (LP) that cannot be in , see also Example 7.9 later on. For example, this occurs if is less than the weight of a minimum cycle basis of under .
Orbit pruning. A graph automorphism acts on such that for , we have if and only if . In particular, it suffices to consider only one representative per orbit.
7.4 An opt-in-opt-out decision algorithm
By executing a recursive search, we systematically determine the membership of and its minors within the forbidden minor set . Algorithm 2 establishes graph classification via three structural cases:
-
If all proper minors of are opt-in but itself is opt-out, then is in .
-
If all proper minors of are opt-in and the refined domination test certifies that is not in , then is opt-in.
-
If at least one proper minor of is opt-out, then inherits this non-integrity by minor-closure (Theorem 5.4), meaning it is opt-out but does not belong to the minimal set .
Algorithm 2 Recursive Search for Forbidden Minors
Require: A 2-connected graph .
Ensure: The classification of (opt-in or opt-out) and the accumulated set of forbidden minors .
1: procedure SEARCHMINORS() 2: if then 3: return (opt-in, ) 4: end if 5: is_minimal true 6: graph_status opt-in 7: 8: for each isomorphism class of 2-connected simple minors with minimum degree 3 of obtained by a single arc deletion or contraction, with representative do 9: (status(), ) SEARCHMINORS() 10: 11: if status() = opt-out then 12: graph_status opt-out 13: is_minimal false 14: end if 15: end for 16: if is_minimal = true then 17: if DOMINATIONTEST() = opt-out then 18: graph_status opt-out 19: 20: end if 21: end if 22: return (graph_status, ) 23: end procedure
Theorem 7.7. Algorithm 2 is correct.
Proof. We proceed by induction on the minor poset of . If some proper minor is verified opt-out, then is immediately opt-out by minor-closure (Theorem 5.4). If , then is opt-in due to minor closure and Example 7.2.
Otherwise, suppose all single-edge deletions and contractions of are certified opt-in; by transitivity, every proper minor of is opt-in, and Theorem 7.6 applies. If the refined domination test terminates without ever finding a non-integral basis, by that proposition; combined with every proper minor being opt-in, must itself be opt-in. Conversely, if the test finds a non-integral cycle basis, is opt-out; combined with every proper minor being opt-in, is minimally opt-out, i.e., .
7.5 Classification of complete graphs
As an application of Algorithms 1 and 2, we settle the opt-in/opt-out status for complete graphs.
Example 7.8 ( is opt-in). We follow the execution of Algorithm 2 for . All proper minors are opt-in, so that we reach line 16 with and . The refined domination test (Algorithm 1) for finds on the first iteration that . More precisely, for each of the six star bases , each tree arc lies in 4 of the 10 cycles in and each of the arcs is a tree arc in exactly two of the six stars; summing over the six stars, . Therefore, is a convex combination of the fundamental (and hence integral) cycle bases . So , and by Lemma 7.1, . Algorithm 1 detects this by adding to the dominated set and will terminate with and “” after the first iteration.
Example 7.9 ( is opt-in). Algorithm 2 proves opt-in-ness of . We briefly sketch why . For , in , is not dominated by a convex combination of coefficient vectors of integer cycle bases. For , (LP) for has the optimal value . However, we know by Proposition 6.8, that if , then there is a cycle basis consisting only of triangles. We then have . Since has 21 arcs, Lemma 7.5 implies for a triangle . By orbit pruning, we only need to consider for a single triangle . We find the optimal value for (LP): The vector is a convex combination of 21 coefficient vectors of integral cycle bases. We conclude by Lemma 7.4 that .
Example 7.10. Figure 3 shows a graph with 8 vertices and 23 arcs, obtained by running Algorithm 2 on . Since is opt-in, so is every graph on at most seven vertices (each such graph is a minor of , and opt-in-ness is preserved under taking minors), so has the fewest possible vertices among members of . The weights shown on the arcs of in the figure induce a unique non-integral minimum-weight cycle basis of total weight 2490, while the minimum-weight integral cycle basis has a weight of 2491.
We can now obtain a complete characterization of opt-in-ness for complete graphs.
Theorem 7.11. The complete graph is opt-in if and only if .
Proof. By Example 7.8, is opt-in. Since opt-in graphs are minor-closed, every complete graph with is opt-in.
On the other hand, Example 7.10 shows that is opt-out since it contains a forbidden minor.
Beyond complete graphs, we have found the following results for generalized Petersen graphs.
Example 7.12. Using Algorithm 2, starting from a search of the generalized Petersen graph , we found that the graphs in Figure 4 are in , while was found to be opt-in.

Figure 3: Smallest graph in obtained with Alg. 2, together with arc weights inducing a non-integral minimum cycle basis.
8 Conclusion and future directions
In the first part, we studied the existence and complexity of forward cycle bases. We characterized when a digraph admits a forward weakly fundamental (equivalently, integral, undirected, or directed) cycle basis, reducing the question to a simple block-structure condition (Proposition 3.1). For the strictly fundamental case, we showed that a strongly connected digraph admits a forward fundamental cycle basis if and only if the number of directed cycles equals the cycle rank; when it exists, this basis is unique and both its construction and the certification of non-existence run in polynomial time (Theorem 3.4). Despite this tractability, we showed that the minimum-weight forward weakly fundamental cycle basis problem is APX-hard, via an L-reduction from the non-forward problem with metric weights (Theorem 4.8); Table 1 summarizes the resulting complexity landscape. The complexity of the minimum-weight integral cycle basis problem, forward or not, remains open and motivates the paper's second part.
There, we introduced opt-in graphs, those for which a minimum cycle basis is integral for every choice of edge weights, and showed this family is minor-closed (Theorem 5.4), hence characterized by a finite set of forbidden minors via the Robertson–Seymour theorem. We developed a recursive algorithm (Algorithm 2) to test membership in . We used this algorithm to give a complete characterization: is opt-in if and only if (Theorem 7.11). A computational search seeded at the generalized Petersen graph further produced several additional graphs in (Figure 4).
Several questions remain open. Beyond complete graphs, is far from fully determined: the search seeded at exhibits several of its members, but no complete description is known, and it remains open whether admits a useful structural characterization. Resolving this is the primary open problem raised by this work and would be a major step toward a better understanding of integral cycle bases.
Acknowledgements. Niels Lindner: This research was conducted in the MobilityLab of the Research Campus MODAL funded by the German Federal Ministry of Research, Technology and Space (BMFTR), fund number 05M25KEM.

Figure 4: Minors of contained in
References
[1] Jorgen Bang-Jensen and Gregory Z. Gutin. Digraphs: Theory, Algorithms and Applications. Springer Monographs in Mathematics. Springer, London, 2 edition, 2009.
[2] Harold P. Benson. An outer approximation algorithm for generating all efficient extreme points in the outcome set of a multiple objective linear programming problem. Journal of Global Optimization, 13(1):1–24, 1998.
[3] Daniel Bienstock and Michael A. Langston. Chapter 8 – Algorithmic implications of the graph minor theorem. In Network Models, volume 7 of Handbooks in Operations Research and Management Science, pages 481–502. Elsevier, 1995.
[4] J. C. de Pina. Applications of Shortest-Path Methods. Ph.d. thesis, Universiteit van Amsterdam, 1995.
[5] Giulia Galbiati and Edoardo Amaldi. On the approximability of the minimum fundamental cycle basis problem. In International Workshop on Approximation and Online Algorithms, pages 151–164. Springer, 2003.
[6] Petra Gleiss, Josef Leydold, and Peter Stadler. Circuit bases of strongly connected digraphs. Discuss Math Graph T, 23:241–260, 2003.
[7] Joseph Horton. A polynomial-time algorithm to find the shortest cycle basis of a graph. SIAM J Comput, 16:358–366, 1987.
[8] Telikepalli Kavitha, Christian Liebchen, Kurt Mehlhorn, Dimitrios Michail, Romeo Rizzi, Torsten Ueckerdt, and Katharina A. Zweig. Cycle bases in graphs – characterization, algorithms, complexity, and applications. Comput Sci Rev, 3(4):199–243, 2009.
[9] Christian Liebchen and Leon Peeters. Integral cycle bases for cyclic timetabling. Discrete Optim, 6(1):98–109, 2009.
[10] Niels Lindner, Christian Liebchen, and Berenike Masing. Forward cycle bases and periodic timetabling. In 21st Symposium on Algorithmic Approaches for Transportation Modelling, Optimization, and Systems (ATMOS 2021), volume 96 of Open Access Series in Informatics (OASIcs), pages 2:1–2:14, Dagstuhl, Germany, 2021. Schloss Dagstuhl – Leibniz-Zentrum für Informatik.
[11] Berenike Masing. Enriched Periodic Timetabling. PhD thesis, Freie Universität Berlin, 2026.
[12] Berenike Masing, Niels Lindner, and Patricia Ebert. Forward and line-based cycle bases for periodic timetabling. Oper Res Forum, 4(3):53, 2023.
[13] Karl Nachtigall. Cutting planes for a polyhedron associated with a periodic network. Technical Report 112-96/17, Deutsches Zentrum für Luft- und Raumfahrt, 1996.
[14] Gabor Riccardi and Niels Lindner. On the minimum-weight forward (weakly) fundamental cycle basis problem in directed graphs. In Bernard Fortz, editor, Proceedings of the 12th International Network Optimization Conference, INOC 2026, Liège, Belgium, April 22-24, 2026, pages 27–32. OpenProceedings.org, 2026.
[15] Romeo Rizzi. Minimum weakly fundamental cycle bases are hard to find. Algorithmica, 53(3):402–424, 2009.
[16] Neil Robertson and P. D. Seymour. Graph Minors .XIII. The Disjoint Paths Problem. J Combin Theory B, 63(1):65–110, 1995.
[17] Neil Robertson and P. D. Seymour. Graph Minors. XX. Wagner's conjecture. J Combin Theory B, 92(2):325–357, 2004.
[18] Maciej Syslo. On cycle bases of a graph. Networks, 9:123–132, 2006.
[19] Hassler Whitney. On the abstract properties of linear dependence. Amer J Math, 57(3):509–533, 1935. Available at http://www.jstor.org/stable/2371182.