1 / 30

2-Layer Crossing Minimisation

2-Layer Crossing Minimisation. Johan van Rooij. Overview. Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer: ILP, Branch & Cut Two layer: local search. Crossing Number.

Télécharger la présentation

2-Layer Crossing Minimisation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 2-Layer Crossing Minimisation Johan van Rooij

  2. Overview • Problem definitions • NP-Hardness proof • Heuristics & Performance • Practical Computation • One layer: ILP, Branch & Cut • Two layer: local search

  3. Crossing Number • The number crossings for a bipartite graph only depends on the ordering of the vertices in both layers. • So for a bipartite graph G=(V0,V1,E) and two orderings x0 of V0 and x1 of V1 we can compute the crossing number: cr(G,x0,x1)

  4. Problem Definitions • One-sided two layer crossing minimisation problem: • Given a graph and a fixed ordering x0 of V0, find an ordering x1 of V1 such that cr(G,x0,x1) is as small as possible. • Two-sided two layer problem: • Given a graph find two orderings x0 of V0 and x1 of V1 such that cr(G,x0,x1) is as small as possible.

  5. NP-Hardness • We are going to prove NP-Hardness of the one-sided problem. • Two-sided problem also is NP-Hard. • For this we prove the decision problem NP-Complete: • Given a graph G, ordering x0 of V0, and integer M, is there and ordering x1 of V1 such that: cr(G,x0,x1) ≤ M ?

  6. NP-Completeness of DP • We use a reduction from a known NP-Complete problem: • Feedback Arc Set: • Given a directed graph G and an integer K, does there exist a feedback arc set of size at most K? • A feedback arc set is a subset of the arcs of G, such that when these edges are removed G is acyclic

  7. From FAS to crossing problem • Variable layer: vertex for each vertex in the FAS problem. • Fixed layer: six vertices in fixed order v1, v2,…, v6 for each arc in the FAS problem. • Edges: two from each vertex v to each clump corresponding to and arc (u,w): • v≠u and v≠w: connect v to v3 and v4 • v=u: connect v to v1 and v5 • v=w: connect v to v2 and v6

  8. Lemma for new instance Lemma: Number of crossings in constructed graph equals: Where: A’ = {(v,w) ∊A : x1(v) > x1(w)} Count crossings!

  9. NP-Hardness Proof • Decision version in NP! • For any FAS problem (≤K) we can construct an decision crossing problem with: • FAS has a feedback are set ≤K: A’ has property of lemma; topological ordering • Crossing problem ≤M: A’ is the FAS set.

  10. Heuristics • Barycenter Heuristic • Median Heuristic • Penalty Minimisation Heuristic • Assignment Heuristic • Performance of the Heuristics

  11. Barycenter Heuristic • One of the first and still one of the best. • Given the ordering of the fixed layer x0, place the vertices at positions 1,2… • The Barycenter is the average of the positions of connected vertices. • Compute Barycenters of vertices in variable layer and place according to increasing barycenters.

  12. Barycenter heuristic for two-sided problem. Obtain initial ordering x0 for V0 Repeat until convergence compute the barycenters in V1 compute the ordering x1 flip roles of V0 and V1 for next iteration Output x0 and x1

  13. Properties of the Barycenter • Li and Stallman proved an approximation ratio d-1 for the one-sided problem • Where d is the maximum degree of a vertex in the variable layer • Although not indicated by the above: the barycenter performs better on dense graphs compared to sparse

  14. Median Heuristic • The median heuristic is very much alike to the barycenter heuristic. • We now do not compute barycenters, but we compute medians to place the vertices in the variable layer • Eades and Wormald proved an performance ratio of 3. Or when there are more than cn2 edge a ratio of:

  15. Penalty Minimisation Heuristic • Uses an approximation algorithm for the Feedback Arc Set problem. • First observe ‘trivial’ lower bound to crossing minimisation: • Where cuv is the number of crossing between edges incident to u and v if x1(u) < x1(v)

  16. Penalty Digraph • It may be clear that this lower bound can not always be obtained: • The minimum chooses a vertex before another, but these choices can contradict. • Penalty digraph: directed graph which captures these choices: • cuv – cvu edges from v to u • Cycle is a contradiction • Find minimum FAS to obtain topological sort

  17. Approximation ratioof the PM-Heuristic • Solution of FAS problem to the penalty digraph directly relates to the number of crossings: • sol(crossmin) = LB(G,x0) + sol(FAS) • Demetrescu and Finocchi show an approximation ratio equal to the longest simple cycle found in graph • This extends to the crossing minimisation problem

  18. The Assignment Heuristic • Also a very popular heuristic • Does not take edges from other vertices into account, but all possible edges • Uses the O(n3) solvable assignment problem: • Assign n items to n positions with minimal cost where for each item-position combination we have cost cij (cost matrix)

  19. Construction of the cost matrix • For each vertex and position construct the full bipartite graph and insert the vertex at that position, with edges to connected vertices in the original graph. • Number of crossings in this graph is upper bound for real number of crossings, we use this for the cost. • From the minimal cost assignment we obtain the positions of the vertices.

  20. Performace • Hard to say which heuristic is better. • One sided problem (random graphs) • Barycenter best • Assignment next • Median slightly worse • PM varies much in performance • Depends too much on graphs used by the different researchers.

  21. Performace • Two sided problem (random graphs) • Barycenter again the best • But almost equal to the median heuristic • Assignment worse • Barycenter and Median very fast to compute • Assignment and Penalty Minimisation slower

  22. Practical Computation • Heuristics were the first approaches introduced by the literature • Heuristics are very nice for very large instances because of limited computation time • For smaller instances we can do significantly better. • For both problems we will show this

  23. One sided problem:ILP and Branch & Cut • Crossings only depend on ordering of vertices. • We can base our search on relative orderings of each pair (as PM-heurstic) • We use an ILP-formulation of the linear ordering problem.

  24. ILP Formulation min Σi=1n-1 Σj=in(cij – cji)xij s.t.: 0 ≤ xij + xjk– xik ≤ 1 (all 1≤i<j<k≤1) 0 ≤ xij ≤ 1 xij integral • Xij = 1 means i before j • First constraints prevent 3-cycles (thus all cycles) in the ordering

  25. How to solve the ILP problem • First the LP-relaxation (not xij integral) • Use LP-Solver directly is too slow. • Send all hypercube constraints to solver and obtain solution • Repeat until no violations: • Add all violated 3-cycle constraints to the problem for the solver and remove all earlier added but no longer violated constraints and use the LP-solver again.

  26. Now the full ILP problem • If LP-relaxation integral: done • Otherwise: select non-integral xij and recursively solve subproblems with xij = 1 and xij = 0. • If LP-relaxation of subproblem worse than optimum found so far – cut this branch of the search tree.

  27. What can we do with this? • Efficiently solve one-sided problem instances with up to 40 vertices in variable layer! • Not very usefull for two-layer approach, a similar ILP can only efficiently handle up to 15 vertices in the smallest layer.

  28. So what do we do for the two-layer problem? • The best solutions are obtained by means of local search. • In our survey we briefly explain an algorithm based on GRASP (Greedy RAndomised Search Procedure) and Path Relinking • Not in the scope of this presentation to explain this in more detail

  29. Conclusion • The 2-layer crossing minimisation is important for other crossing minimisation problems • NP-Hard so no algorithm known that can compute the optimum in polynomial time • Many heuristics proposed with approximation ratios with often good performance • Practical computations of one-sided problem with ILP and Branch & Cut • For the two-layer problem: local search

  30. Questions?

More Related