500 likes | 830 Views
Fast FAST. By Noga Alon , Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger. Fast FAST?. Fast – A relative fast algorithm for an NP- Complete problem. FAST – (minimal) Feedback Arc Set in Tournaments. Feedback Arc Set. Given a Directed Graph
E N D
Fast FAST By NogaAlon, Daniel Lokshtanov And SaketSaurabh Presentation by Gil Einziger
Fast FAST? • Fast – A relative fast algorithm for an NP- Complete problem. • FAST – (minimal) Feedback Arc Set in Tournaments.
Feedback Arc Set • Given a Directed Graph • We want to find a set of arcs such as: is a DAG. We want F to be minimal, how?
Feedback Arc Set – The Problem: • NP Complete – but we can expect it. • In a general Directed graph, un-weighted Feedback arc set is APX- Hard – meaning that there exist a constant k such as there is no polynomial time k approximation algorithm for this problem.
What is A Tournament? • A tournament is a directed graph (digraph) obtained by assigning a direction for each edge in an undirectedcomplete graph. • A tournament is, a directed graph in which every pair of vertices is connected by a single directed edge.
Not a tournament, 2 possible topological orders… Tournament, only one topological order… 3 3 1-2 1 1-2 2 Tournament Important Observations • Let T(V,A) be a Tournament • 1. for is a Tournament • 2. if a Tournament is DAG, it have a unique topological order. 1-2
Tournament and FAS • Assume we have n tennis players. • each tennis player is playing 1 game against all other tennis player. • How can we decide who the best tennis player is? • How can we rank the players?
Tournament and FAS 1 • If the results of the tournament are acyclic, we can use topological ordering to determine both the winner and the full rank of the players. • No player have any reason to complain since all the players I won, are always ranked lower then me.
Tournament and FAS 2 • If the results aren’t acyclic, we can’t satisfy ALL the players. • So we want a solution satisfying as many players as possible. • Given a minimal feedback arc set, we have such solution. • Why?
K-Weighted Feedback Arc Set On Tournaments • Given a tournament T=(V,A). • A weight function • And an Integer k. Question: Is there an arc set such that and T’=(V,A\S) is a DAG.
K-FAST • NP-Complete • FPT – (the parameter will be k.) • Article improves a previous result in this problem • from: • to: • Interested?
Preliminaries: w* • For an arc weighted tournament we define the weight function w*
Preliminaries: D{F} • Let D=(V,A) a directed graph. • And a set F of arcs in A. • We define D{F} to be a directed graph obtained from D by reversing all arcs of F.
D{F} And FAS 1 • Claim: let T=(V,A) be a tournament. • F is a minimal FAS of T=(V,A) if and only if F is a minimal set of arcs such that T{F} is a DAG. In other words, you don’t have to remove FAS arcs in a minimal solution, you can simply REVERSE them.
D{F} And FAS 2 • Explanation/Prove: • Given a minimal feedback arc set F of a tournament T, the ordering corresponding to F is the unique topological ordering of T{F}
D{F} And FAS 3 • Conversely, given an ordering of the vertices of T, the feedback arc set F corresponding to is the set of arcs whose endpoint appears before their start point in
D{F} And FAS conclusion • We showed that every vertex ordering define a FAS and that every FAS define a vertex ordering. • The cost of an arc set F is: • And the cost of a vertex ordering is the cost of the corresponding FAS.
The Algorithm • 1 Perform a data reduction to obtain a tournament T’ of size • 2. Let . Color the vertices of T’ uniformly at random with colors from {1,…,t} • 3.Let be the set of arcs whose endpoints have different color, find a minimum FAS contained in , or conclude that no such FAS exist
Step 1:Kernelization • Lemma 1: k-FAST has a kernel with vertices. Proof: by explicit build of such kernel!
Lemma 1: k-FAST has a kernel with vertices • We use these reduction rules: • If an arc (e) is contained in at least k+1 directed triangles reverse the arc and reduce k by w(e). • If a vertex (v) is not contained in any triangle delete v from T.
Is the 1st rule safe ? First rule is safe because any feedback arc set that does not contain the arc (e) must contain at least one arc from each of the k+1 triangles containing e, and thus must have weight of at least k+1. (remember why?) Refresh the definition of W in the start:
Is the 2nd rule safe ? • Looking at a vertex (v), and assume v is not contained on any triangle. • Observation 1: Since we are in a tournament each vertex in the graph is either in • Observation 2: Any arc connecting And is in the direction from to
V 2nd rule drawing/intuitive explanation • Since all the arcs go only from N-(v) to N+(v)… if both sub-graphs are DAG, adding v and all the arcs associated with v won’t add a cycle to the graph.
Is the 2nd rule safe ? • From Observation 1 + Observation 2 one can deduce that any optimal FAS S1 on and an optimal FAS S2 on satisfy: • Is an optimal FAS on T • Therefore the 2nd rule is safe.
Lemma 1: k-FAST has a kernel with vertices • We showed the build to be legal build. • We still need to count now how many vertices are there in the reduced graph (T’). • Claim1: T’ has at most k(k+2) vertices
Claim1: T’ has at most k(k+2) vertices • Let S be a feedback arc set of T’ with weight of at most k’ . • The Set S contains at most k arcs. • For every arc (e) in S, aside from the two endpoints of e, there are at most k vertices that are contained in a triangle containing e, (otherwise 1st rule will apply) • Since every triangle in T’ contains an arc of S and every vertex of T’ is in a triangle T’ has at most k(k+2) vertices.
Step 2:color the vertices of T’ uniformly at random with colors from {1,…,t} • What is the probability of a a good coloring? • Lemma 2: if a graph on q edges is colored randomly with colors then the probability that G is properly colored is at least
Calculating the probability of a good coloring. • To prove the lemma we will make use of the following build: • Arrange the vertices of the graph by repeatedly removing a vertex of lowest degree. • Let be the degrees of the vertices when they have been removed. What can we say about ?
Analyzing the build: • First we notice that for all i, since the degree of the vertex removed can not exceed the number of remaining vertices. • Now what can we say about: ?
Analyzing the build 2 • since when a vertex i is removed each vertex had degree of at least • Why is that? • Sum of all vertex degrees in a graph is 2q. Therefore for the i’th step:
The build and coloring? • Combining two observations: we get: • Above hold for all i. • But what do these calculations have to do with coloring?
The Build and coloring. • Consider the colors of each vertex one by one starting from the last one, that is vertex number s. • When vertex number i is colored, the probability that it will be colored by a color that differs from all those di neighbors following it is at least…
The Build and coloring. • The probability that vertex number i is colored by a different color from all the other vertices is: • Because: why?
Why? Indeed, the inequality holds…
So what is the probobility that G is properly colored? • From previous result:
Solving a Colored Instance • Definitions: • Given a t-colored tournament T, We will say that an arc set F is colorful if no arc of F is monochromatic. • An ordering of T is colorful if the feed back arc set corresponding to it is colorful. • An optimal colorful ordering of T is a color ordering of T with the minimum cost among all other colorful orderings.
More Definitions • For a pair of integer vectors:
Solving a Colored Instance 2 • Let be a t-colored tournament. There exists a colorful feedback arc set of T if and only if induces an acyclic tournament for every i. (and we’ll call such T feasible)
Solving a Colored Instance 3 • Lemma 3: Given a feasible t-colored tournament T, we can find a minimum weight colorful feedback arc set in • For an integer , define and
2 2 3 1 2 3 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 4 4 Lemma 3: proofLemma 3: Given a feasible t-colored tournament T, we can find a minimum weight colorful feedback arc set in Given an integer vector of length t in witch the i’th entry is between 0 and and let be observe that for any ordering of V corresponding to a colorful FAS F of T and any integer x there exist a such that .
1 1 2 4 2 3 3 4 Definition Example What vertices does the vector: [1,2] stand for?
The Algorithm-idea • The Idea is to try all possible candidates for the last vertex v of an optimal ordering of • For every i the vertex is the only candidate for v with color i.
(1) • The idea behind (1) is to try all possible candidates for the last vertex v of an optimal ordering of • For every i the vertex is the only candidate with color i.
(1) • Proof: • Let i be an integer that minimizes the right side. Taking the optimal ordering of and appending it with gives an ordering of with cost of at most
(1) • Proof: • Let be an optimal colorful ordering of and let v be the last vertex in this ordering. • There is an i such as . Thus is a colorful ordering of and the total weight of arcs with start points in v and end points in is exactly: Completing the Proof!
Dynamic Programming:Implementation • Table: containing for every p . • There are table entries. • For each entry it takes us: nt time • Thus we can get: • Working a bit harder and calculating: • will yield the result of:
Summery: • Lemma 4: k-fast (for a tournament of size can be solved in expected time of • Combining lemma 1, 2 and 3 yields expected running time of:
Summery: • Lemma 4: k-fast (for a tournament of size can be solved in expected time of • Space required by algorithm is:
More Results: • An algorithm to solve K-FAST in polynomial space and time. • De-Randomization