1 / 35

A Variation of Minimum Latency Problem on Path, Tree and DAG

A Variation of Minimum Latency Problem on Path, Tree and DAG. Author: Yung-Hui Huang, Yaw-Ling Lin, Chuan-Yi Tang. Problem Definition. Given a graph G(V,E) with a distance matrix d i,j and the weight function of each vertices v i

Download Presentation

A Variation of Minimum Latency Problem on Path, Tree and DAG

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. A Variation of Minimum Latency Problemon Path, Tree and DAG Author: Yung-Hui Huang, Yaw-Ling Lin, Chuan-Yi Tang

  2. Problem Definition • Given a graph G(V,E) with a distance matrix di,j and the weight function of each vertices vi • If the vertex vi wants to be completed, at least one ancestor of vimust be finished. • Let defined to be the distance traveled before first visiting vi • The problem is to find out the minimum latency tour traversal all vertices. • The objective function:

  3. Problem Sample

  4. Compare with original MLP • The new problem is equivalent to the original MLP with no edge distance but vertex latency time and vertex weight. • In other words, we assume that the walk back latency of completed jobs be “0”.

  5. Our Result • Given a starting point of G • K-path : O(n log k) where k is a constant • Full k-ary tree with constant weight: O(n) • Tree : O(n log n) • DAG : NP-Hard (Reduce from 3-SAT) • Find the best starting point of G • Path : O(n) to find the best starting point.

  6. Inseparable Property • Let (vi)= w(vi)/d(vi) be the ratio cost of vi • If u and v are inseparable, then there exist an optimal solution containing uv sequence contiguously. (uv)= w(u)+w(v)/ d(u)+d(v) • Inseparable property: • If v is the onlydecedent of u, and (v)  (u) then u and v are inseparable. • If u have multiple decedents V. Let vV has the maximum ratio cost among all others and (v)  (u). u and v are inseparable.

  7. 7/2 3 4 2 2 7/2 11/3 5 4 4 Inseparable Sample Single decedent Shrink 3 and 4 3 4 2 Multiple decedents 2,5,4

  8. 2 2 5 4 5 4 Right Skew property • If a vertex sequence <v1,v2…vn> is right skew then (<v1…vi>) <(<vi+1…vn>) for all n i 1 • The Inseparable is right skew.

  9. 4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 12/2 17/3 16/3 Decreasing right skew Property • G has decreasing property if for all u,v in G, u is the ancestor of v, then (u)  (v) and u,v are both right skew. • Also, if G is a tree then G is a max-heap tree.

  10. 3-path Problem on K-path • We say a connected graph is the K-path if there exist a vertex has degree k and all other vertices have degree 2.

  11. Algorithm 1.Partition each paths into decreasing right skew. 2.Iterative select and output a maximum ratio cost from k candidate.

  12. 4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 Partition a path into several inseparable - O(n) 7 > 6 3 < 7 (3+7)/2 <6

  13. Partition a path into several inseparable - O(n) • After the partition steps, a path will be partition into several inseparable and the partition result will meet the decreasing right skew property. • We partition each paths in k-path graph individually. And get k decreasing right skew partition.

  14. Merge k decreasing right skew 5 S 13 10 1 6 2 Result : S 13 10 6 5 2 1 Time Complexity: n log(k)

  15. Problem on Tree • Observation: A node have maximum ratio cost is inseparable with its parent. • Algorithm: 1.Build a Fibonacci heap 2.Select a maximum vertex v and shrink with its parent. If v is the root, then output v.

  16. 5 15/2 5 14/2 10 14/2 3 10 8 2 8 2 8 11 2 15/2 22/3 22/3 2 2 Example on Tree Select 11 Select 10 Result : 5,10,3,11,8,2 Select 8 Select and output 2 Select and output 15/2 Select and output 22/3 2

  17. Time Complexity • Construct a Fibonacci heap - O(n) • Select maximum - O(1) • Increasing Key - O(log n) • The time complexity is O(nlogn)

  18. 1 1 2 2 2 Problem on full k-ary tree • If G is a full k-ary tree and external nodes have the constant weight we and the internal nodes also have the constant weight wi, then the problem can be solved in linear time. Full k-ary tree

  19. 1 1 2 2 2 Related Lemma 1. Any sub tree of full k-ary tree is inseparable

  20. (T2) 2/1 1 1 2 T2 (T1) 5/3 2 2 T1 Related Lemma 2. Let T1, T2 be the sub trees of full k-ary tree. If the T1 has more nodes, then (T2)  (T1) and T2 will be visited before T1.

  21. Algorithm 1.Compute the internal node number of each sub trees. 2. Use a radix sort to sort all nodes by the internal node number of sub tree rooted by each vertex. 3.According to the sorting result, we can build priority queues in each internal nodes. 4.Use a DFS to traversal the full k-ary tree.

  22. 3 A A 2 0 B B C C 0 1 D D E E 0 0 F F G G Example Sorting Result: G,F,D,C,E,B,A C B E D G F

  23. A C B B C E D D E G F F G Example

  24. Problem on DAG • The problem on DAGs is NP-Hard. • We can reduce from the 3-SAT. • Given a 3-CNF F=C1 C2 ….Ck [k clauses] with n literals {x1, x2,... xn} we can construct a DAG with 1+3n+4k vertices and 2n+6k edges.

  25. S … n literals x3 x4 x1 x2 x3 x4 x1 x2     0 0 0 0 0 0 … k clauses   Construct a DAG Given an instance of 3-SAT=(x1v x2v x3) (x3v x2v x4)...

  26. S x3 x4 x1 x2 x3 x4 x1 x2     1 literal Constructing Step 1. If F has n literals. … n literals

  27. 1 caluse 0 0 0 0 0 0   Constructing Step 2. If F has k clauses. … k clauses

  28. S … n literals x3 x4 x1 x2 x3 x4 x1 x2     0 0 0 0 0 0 … k clauses   Construct a DAG Given an instance of 3-SAT=(x1v x2v x3) (x3v x2v x4)...

  29. ... ... S 0  0  0  0  0  0 0 0 0  n+2k 2k vertices 2n vertices The problem on DAG is NP-Hard • Let the w(xi) =0 • If F is satisfiable  the result of problem on DAG is match the following format: ...

  30. Find the best starting point on Path • The simplest way to find out the best starting point is perform the O(n) algorithm n times and select the starting point of the minimum result as the answer. • The simplest way cost O(n2). • We propose an O(n) time algorithm to solve the problem.

  31. 1.Find the partition starting from left point 4 8 5 3 9 3 7 6 2.Find the partition starting from right point 4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 Example to demonstration O(n) algorithm 3.Iterative select the minimum inseparable from Step 1 and 2 and remove it from 1 and 2

  32. Result : 4 4 8 5 3 9 3 7 6 8 5 3 9 3 7 6 Result : 358,4 8 5 3 9 3 7 6 4 8 5 3 9 3 7 6 Iterative select the minimum

  33. 9 3 7 6 Result : 376,358,4 9 3 7 6 9 Result : 9,376,358,4 9 Iterative select the minimum

  34. Our Result • Given a starting point of G • K-path : O(n log k) where k is a constant • Full k-ary tree with constant weight: O(n) • Tree : O(n log n) • DAG : NP-Hard (Reduce from 3-SAT) • Find the best starting point of G • Path : O(n) to find the best starting point.

  35. Q & A Thank you! Future Work • Find the best starting point of Tree • Consider the on-line version. • Consider the parallel version.

More Related