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

Slides:



Advertisements
Similar presentations
Single Source Shortest Paths
Advertisements

Max- coloring in trees SRIRAM V.PEMMARAJU AND RAJIV RAMAN BY JAYATI JENNIFER LAW.
O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
Comp 122, Spring 2004 Greedy Algorithms. greedy - 2 Lin / Devi Comp 122, Fall 2003 Overview  Like dynamic programming, used to solve optimization problems.
1 Paths in Graphs Oscar Miguel Alonso M. 2 Outline The problem to be solved Breadth first search Dijkstra's Algorithm Bellman-Ford Algorithm Shortest.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
Approximation Algorithms
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2006 Lecture 7 Monday, 4/3/06 Approximation Algorithms.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Minimum Back-Walk-Free Latency Problem Yaw-Ling Lin Dept Computer Sci. & Info. Management, Providence University, Taichung, Taiwan.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
Elementary graph algorithms Chapter 22
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
TECH Computer Science Graph Optimization Problems and Greedy Algorithms Greedy Algorithms  // Make the best choice now! Optimization Problems  Minimizing.
Minimum Spanning Trees What is a MST (Minimum Spanning Tree) and how to find it with Prim’s algorithm and Kruskal’s algorithm.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
Priority Queues Two kinds of priority queues: Min priority queue. Max priority queue. Nov 4,
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Final Review Chris and Virginia. Overview One big multi-part question. (Likely to be on data structures) Many small questions. (Similar to those in midterm.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
CSE 589 Applied Algorithms Spring 1999 Prim’s Algorithm for MST Load Balance Spanning Tree Hamiltonian Path.
The Theory of NP-Completeness
More NP-Complete and NP-hard Problems
More NP-complete problems
Trees Chapter 15.
Minimum Spanning Trees
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
Lecture 2-2 NP Class.
Priority Queues An abstract data type (ADT) Similar to a queue
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
CSE 2331/5331 Topic 9: Basic Graph Alg.
Topological Sort Minimum Spanning Tree
CS 3343: Analysis of Algorithms
Topological Sort (topological order)
Computability and Complexity
Graph Algorithm.
Approximation Algorithms for TSP
ICS 353: Design and Analysis of Algorithms
Intro to NP Completeness
Parameterised Complexity
Minimum Spanning Trees
Richard Anderson Lecture 25 NP-Completeness
Elementary graph algorithms Chapter 22
Algorithms (2IL15) – Lecture 5 SINGLE-SOURCE SHORTEST PATHS
Richard Anderson Lecture 28 NP-Completeness
Approximation Algorithms
Problem Solving 4.
Priority Queues An abstract data type (ADT) Similar to a queue
CS 3343: Analysis of Algorithms
Richard Anderson Lecture 26 NP-Completeness
Algorithms (2IL15) – Lecture 7
Text Book: Introduction to algorithms By C L R S
The Theory of NP-Completeness
CSE 417: Algorithms and Computational Complexity
Elementary graph algorithms Chapter 22
Richard Anderson Winter 2019 Lecture 5
Heaps & Multi-way Search Trees
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

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 di,j and the weight function of each vertices vi If the vertex vi wants to be completed, at least one ancestor of vi must 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:

Problem Sample

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”.

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.

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 only decedent 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.

Inseparable Sample Single decedent 3 4 2 7/2 3 4 2 Multiple decedents Shrink 3 and 4 3 4 2 7/2 3 4 2 Multiple decedents 2 5 4 7/2 4 11/3 2,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. 2 5 4 2 5 4

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. 4 8 5 3 9 7 6 4 8 5 3 9 7 6 12/2 17/3 16/3 Also, if G is a tree then G is a max-heap tree.

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. 3-path

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

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

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.

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)

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.

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

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

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. 1 2 Full k-ary tree

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

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. 1 2 (T2) 2/1 T2 (T1) 5/3 T1

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.

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

Example G A B C D E F

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.

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

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

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

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

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: S  ... ... 2n vertices 2k vertices n+2k

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.

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

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

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

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.

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