-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Source: MinimumFeedbackVertexSet (#140)
Target: ILP
Motivation: Enables exact solving of directed FVS via ILP solvers. The topological-ordering formulation is compact (2n variables, m constraints).
Reference:
- Topological ordering constraints adapted from Miller, Tucker & Zemlin (1960), "Integer Programming Formulation of Traveling Salesman Problems" — same technique (ordering variables to eliminate directed cycles)
- Even, Naor & Schieber (1998), "Approximating Minimum Feedback Sets and Multicuts in Directed Graphs"
Reduction Algorithm
Notation:
- Source: MinimumFeedbackVertexSet instance with directed graph G = (V, A), n = |V|, m = |A|, weights w_i
- Target: ILP instance with 2n variables and m constraints
Key idea: A directed graph is a DAG if and only if it admits a topological ordering. Encode this with integer ordering variables and linear constraints.
Variable mapping:
| Variable | Count | Domain | Meaning |
|---|---|---|---|
| n | {0, 1} | vertex i is removed | |
| n | {0, ..., n−1} | topological order of vertex i |
Constraint transformation:
For each arc
- When
$x_u = x_v = 0$ (both kept):$o_v \geq o_u + 1$ (enforces strict topological order) - When either is removed:
$o_v - o_u \geq 1 - n$ (always satisfied since$0 \leq o_i \leq n-1$ )
Objective: minimize
Correctness:
- (
$\Rightarrow$ ) If G[V\S] is a DAG, it has a topological ordering. Set$o_i$ to the topological position. All arc constraints satisfied. - (
$\Leftarrow$ ) If the ILP is feasible with all arcs between kept vertices satisfying$o_v > o_u$ , no directed cycle can exist (a cycle$v_1 \to v_2 \to \cdots \to v_k \to v_1$ would require$o_{v_1} < o_{v_2} < \cdots < o_{v_k} < o_{v_1}$ , a contradiction).
Size Overhead
| Target metric (code name) | Polynomial (using symbols above) |
|---|---|
| num_vars | |
| num_constraints |
Validation Method
- Cross-check with brute-force solver on small instances (n ≤ 10)
- Verify on known special cases: directed cycle
$C_n$ has FVS = 1, complete directed graph (both arcs per pair) has FVS = n − 1 - Compare against example instance: FVS = 3
Example
Source: Cycle of triangles (n = 9, m = 15) from #140
Vertices: {0, 1, 2, 3, 4, 5, 6, 7, 8}
Arcs: {0→1, 1→2, 2→0, 3→4, 4→5, 5→3, 6→7, 7→8, 8→6,
1→3, 4→6, 7→0, 2→5, 5→8, 8→2}
Unit weights: w_i = 1 for all i
Target ILP:
Variables: 9 binary x_i, 9 integer o_i ∈ {0,...,8} (18 total)
Constraints: 15 (one per arc)
Objective: minimize Σ x_i
Solution: x = (1, 0, 0, 1, 0, 0, 0, 0, 1) → S = {0, 3, 8}, objective = 3.
Topological ordering of remaining DAG on {1, 2, 4, 5, 6, 7}:
o_1 = 0, o_4 = 1, o_2 = 2, o_6 = 3, o_5 = 4, o_7 = 5
Verification of arc constraints (remaining arcs only):
1→2: o_2 − o_1 = 2 ≥ 1 ✓
4→5: o_5 − o_4 = 3 ≥ 1 ✓
6→7: o_7 − o_6 = 2 ≥ 1 ✓
4→6: o_6 − o_4 = 2 ≥ 1 ✓
2→5: o_5 − o_2 = 2 ≥ 1 ✓
All 10 removed-endpoint arc constraints: relaxed to
Overhead: n = 9, m = 15 → num_vars = 18, num_constraints = 15.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status