experimental study of directed feedback vertex set problem
DESCRIPTION
Experimental Study of Directed Feedback Vertex Set Problem. Xi Wu. With Rudolf Fleischer and Liwei Yuan Fudan University, Shanghai. Algorithm Engineering for DFVS. Heuristics. New data reduction rules. New data reduction rules. When helpful? When not?. Quantify the benefits. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/1.jpg)
Experimental Study of Directed Feedback Vertex Set Problem
With Rudolf Fleischer and Liwei Yuan
Fudan University, Shanghai
Xi Wu
![Page 2: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/2.jpg)
Chen’s FPT algorithm
Algorithm Engineering for DFVS
Chen’s FPT algorithm
Experimental analysis
Peter Sanders, Festschrift Mehlhorn 60th, 2009
New data reduction rules
Experimental analysis
Chen’s FPT algorithm
When helpful? When not?
New data reduction rules
Chen’s FPT algorithm
Experimental analysis
Implement these rules
When helpful? When not?
Experimental analysis
New data reduction rules
Quantify the benefits
Implement these rules
When helpful? When not?
New data reduction rules
Heuristics
Implement these rules
When helpful? When not?
Quantify the benefits
Implement heuristics
Heuristics
When helpful? When not?
Quantify the benefits
Deadlock recovery
Implement heuristics
Heuristics
When helpful? When not?
Quantify the benefits
![Page 3: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/3.jpg)
Directed Feedback Vertex Set(DFVS)
Find k vertices to destroy all cycles
1-FVS
What about this one with k=8?
Minimum DFVS is NP-hard
![Page 4: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/4.jpg)
DFVS vs. Undirected Feedback Vertex Set (UFVS)
Both NP-hard, but UFVS is better understood
DFVS UFVS
Approximation O(min{τ*logτ*loglogτ*, τ*logN loglogN)-approximation[Even ‘98] (τ* is the optimum fractional solution)
2-approximation[Bafna ‘1999]
FPT algorithm O(k! 4k nO(1))[Chen STOC‘2008]
O(4k k n)[Becker ‘2000]
Kernelization Polynomial kernel? Quadratic kernel[Thomasse SODA‘2008]
![Page 5: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/5.jpg)
Our Work• Test engine: random graph generator
Controlling various parameters
• Experimental study of Chen’s FPT algorithm for DFVS [Chen STOC‘2008]
With various parameters
• Data reductions and heuristicsQuantify the benefits
• Application: deadlock recoveryDFVS not more helpful than cycle detection
![Page 6: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/6.jpg)
Random Graph Generator
• Goal: difficult, random graphs
• Parameters controlled:n: Number of nodesk: Size of the minimum FVSedge density: ed = #edges/n
• A nontrivial task…
![Page 7: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/7.jpg)
A Non-trivial Task
• Spanning treeWilson’s algorithm
• Connected DAGMelancon’s algorithm
• Control solution size, overlapping cycles, edge density …
![Page 8: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/8.jpg)
Chen’s Algorithm
G
(k + 1)-subgraph
k-FVS
(k + 2)-subgraph G’
(k+1) –FVS H
x
|I| ≤ k
|U| ≤ k-|I|
(G’-H) is acyclic
(H-I) is acyclic
Compress into k-FVS
Iterative Compression
![Page 9: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/9.jpg)
Start Configuration of Chen’s Algorithm
• Consider heuristic solution X:
– choose a k-subset Y of X– start with S = (G – (X – Y))
If X is good, then better performance
![Page 10: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/10.jpg)
Chen’s Original Algorithm
• Configuration– n: from 40 to 200, step by 20– k: in {2, 4, 6, 8}– ed in {2.0, 3.0, 3.5, 4.0}
• Generate 10 graphs for (n, k, ed)Record max, min and average
• Timeout: 3 hoursCount as 3 hours
![Page 11: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/11.jpg)
Runtime Performance
Algorithm is slow, even with small parameter k
Performance fluctuates when n increases
Logarithmic runtime (ed=3.5)
Runtime (ed=3.5)
![Page 12: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/12.jpg)
Low Edge Density: High Runtime
Worst performance for n=40
![Page 13: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/13.jpg)
Many Independent Cycles: High Runtime
• An intuitive example: “Pyramid”
The optimum solution for the first 3 layers are the 2nd
layer
The optimum solution for the whole graph is the 1st and 3rd
layers
![Page 14: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/14.jpg)
Reduction Rules
• Reduction: in polynomial time– reduce (G, k) to (G’, k’)– (G, k) is a YES-instance iff (G’, k’) is a
YES-instance
• Kernelization– |G’| is bounded by f(k)– k’ ≤ k
![Page 15: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/15.jpg)
Reduction Rules I (Chen)
• Trivial rules:
– Self-loops: add node to DFVS
– Parallel-edge: delete multiple edges
![Page 16: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/16.jpg)
Reduction Rule II
• Dummy– in-degree/out-degree = 0;
Other part of the graphu
delete u
![Page 17: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/17.jpg)
Reduction Rules III
• Chain– in-degree/out-degree = 1;
Other part of the graph
u
v
merge u and v
![Page 18: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/18.jpg)
Reduction Rule IV
• Flower– (k+1) vertex-independent cycles exactly
intersecting on u: add u to DFVS
u
Other part of the graph
k = 2petal(u) = {x, y, z}
x y z
![Page 19: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/19.jpg)
Reduction Rule V
• Shortcut– petal(u) = {v}: bypass u
u
v
u
y
x z
w
y
x z
w
![Page 20: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/20.jpg)
Remarks
• These rules do NOT give a kernelization
• We need rules when 2 ≤ |petal(u)| ≤ k
![Page 21: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/21.jpg)
Non-Reducible Graphs
u
v
……
| petal(u) | = | petal(v) | = 2
u, v are useless
![Page 22: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/22.jpg)
Non-Reducible Graphs
u
w
……v
When can we safely reduce u, v, w?
![Page 23: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/23.jpg)
Runtime with Reductions(n small, k small)
No reductions With reductions
4X ~ 140X speedup
![Page 24: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/24.jpg)
Reduced Size (n large, k small)
Many flowers found !
90% nodes reduced
ed = 2.0 ed = 3.0
![Page 25: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/25.jpg)
Preprocessing Time (n large, k small)
Scales linearly with n and ed
ed = 2.0 ed = 3.0
![Page 26: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/26.jpg)
Reduced Size (n large, k large)
Now flower reduction does not work well
ed = 2.0 ed = 3.0
![Page 27: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/27.jpg)
Which Rules are Powerful?
• n = 1000 and ed = 3.0
No flowers found…
s
![Page 28: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/28.jpg)
Start Heuristics
• Three heuristics:
– Big-Degree pick biggest total degree vertices until
acyclic
– Even’s Fractional Approximationpick the most heavy weight set
– Even’s Full Approximationpick the approximation solution
![Page 29: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/29.jpg)
Evaluating HeuristicsFractional Approximation
40+s20+s
Big Degree
10s20+
s
4x-50x speedup
No heuristic
Practical Scheme: Preprocessing + Big-Degree +
Chen’s algorithm --> further 2-3x speedup
![Page 30: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/30.jpg)
Practical Application:Deadlock Recovery
t4
t1
L3
t2
t3
request
grant
ownDeadlock
Could DFVS help us for deadlock recovery?
No overlapping cycles
Cycle detection is enough
R1: one lock owned by only one thread
R2: one thread can wait on only one lock
![Page 31: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/31.jpg)
A Real System
• The Deadlock Immunity System
– OSDI ’08 (top system conference)– Use cycle detection to enable deadlock
immunity– 10% overhead on average
• instrumentations, framework overhead, etc.
![Page 32: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/32.jpg)
Conclusion
• Quantitative analysis of Chen’s FPT algorithm for DFVS
• New reduction rules–With significant performance benefits– Quantitative analysis
![Page 33: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/33.jpg)
Open Problems
• Reduction rules when 2 ≤ |petal(u)| ≤ k ?
|petal(u)| ≥ (k+1), flower rule|petal(u)| = 1, shortcut
• Kernelization for DFVS problem
• Better heuristicsBetter approximation algorithm?
![Page 34: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/34.jpg)
Thanks !
?
![Page 35: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/35.jpg)
FPT search with different parameter k
![Page 36: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/36.jpg)
Backup Slides
![Page 37: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/37.jpg)
Skew Separator
(F-F’) is acyclic.Guess a toporder.
v1 v2 v3 vn…
G - F: Acyclic
uFind (k-|F’|) vertices to block back edges go from vi to vj (i>j)
Skew separator problem. FPT
algorithm using branching
![Page 38: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/38.jpg)
Example of Applying Reductions
4
2
5
6
8
3
7
K = 2. FVS:
9
Delete Parallel Edges
Delete Self Loops1
Delete Dummy
Find a Flower
K = 1
K = 0 and Acyclic
Done
1 2
![Page 39: Experimental Study of Directed Feedback Vertex Set Problem](https://reader035.vdocument.in/reader035/viewer/2022062409/56814e4a550346895dbbd031/html5/thumbnails/39.jpg)
Generation Strategy
• Generation strategy– The edges of connected DAG are ¼ of the
total edge bound
– Each cycle has at most ¼ of nodes
– Generate cycles until reaching the edge bound