Longest Increasing Subsequences in Windows Based on Canonical Antichain Partition Erdong Chen (Joint work with Linji Yang & Hao Yuan) Shanghai Jiao Tong.

Slides:



Advertisements
Similar presentations
Xiaoming Sun Tsinghua University David Woodruff MIT
Advertisements

Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
Longest Common Subsequence
Dynamic Programming Nithya Tarek. Dynamic Programming Dynamic programming solves problems by combining the solutions to sub problems. Paradigms: Divide.
AVL Trees1 Part-F2 AVL Trees v z. AVL Trees2 AVL Tree Definition (§ 9.2) AVL trees are balanced. An AVL Tree is a binary search tree such that.
Theory of Computing Lecture 3 MAS 714 Hartmut Klauck.
Longest Increasing Subsequence and Distance to Monotonicity in Data Stream Model Hossein Jowhari Simon Fraser University Joint work with Funda Ergun Dagstuhl.
© The McGraw-Hill Companies, Inc., Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
Deterministic Selection and Sorting Prepared by John Reif, Ph.D. Analysis of Algorithms.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Advanced Topics in Algorithms and Data Structures Page 1 Parallel merging through partitioning The partitioning strategy consists of: Breaking up the given.
Lower bound for sorting, radix sort COMP171 Fall 2006.
Lecture 5: Linear Time Sorting Shang-Hua Teng. Sorting Input: Array A[1...n], of elements in arbitrary order; array size n Output: Array A[1...n] of the.
CS 253: Algorithms Chapter 8 Sorting in Linear Time Credit: Dr. George Bebis.
CSE115/ENGR160 Discrete Mathematics 02/24/11 Ming-Hsuan Yang UC Merced 1.
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
CSC 2300 Data Structures & Algorithms March 27, 2007 Chapter 7. Sorting.
2 -1 Analysis of algorithms Best case: easiest Worst case Average case: hardest.
© 2004 Goodrich, Tamassia Sorting Lower Bound1. © 2004 Goodrich, Tamassia Sorting Lower Bound2 Comparison-Based Sorting (§ 10.3) Many sorting algorithms.
Parallel Merging Advanced Algorithms & Data Structures Lecture Theme 15 Prof. Dr. Th. Ottmann Summer Semester 2006.
TTIT33 Algorithms and Optimization – Dalg Lecture 2 HT TTIT33 Algorithms and optimization Lecture 2 Algorithms Sorting [GT] 3.1.2, 11 [LD] ,
2 -1 Chapter 2 The Complexity of Algorithms and the Lower Bounds of Problems.
1 A Linear Space Algorithm for Computing Maximal Common Subsequences Author: D.S. Hirschberg Publisher: Communications of the ACM 1975 Presenter: Han-Chen.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
The Complexity of Algorithms and the Lower Bounds of Problems
Sorting Lower Bound1. 2 Comparison-Based Sorting (§ 4.4) Many sorting algorithms are comparison based. They sort by making comparisons between pairs of.
Aaron Bernstein Analysis of Algorithms I. Sorting Algorithms Insertion Sort: Θ(n 2 ) Merge Sort:Θ(nlog(n)) Heap Sort:Θ(nlog(n)) We seem to be stuck at.
9/4/ VLSI Physical Design Automation Prof. David Pan Office: ACES Detailed Routing (I)
Chapter Complexity of Algorithms –Time Complexity –Understanding the complexity of Algorithms 1.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
B-trees and kd-trees Piotr Indyk (slides partially by Lars Arge from Duke U)
The Lower Bounds of Problems
The Selection Problem. 2 Median and Order Statistics In this section, we will study algorithms for finding the i th smallest element in a set of n elements.
Sorting Fun1 Chapter 4: Sorting     29  9.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
Longest increasing subsequences in sliding windows Michael H. Albert, Alexander Golynski, Angele M. Hamel, Alejandro Lopez-Ortiz, S. Srinivasa Rao, Mohammad.
Data Structures and Algorithms (AT70.02) Comp. Sc. and Inf. Mgmt. Asian Institute of Technology Instructor: Prof. Sumanta Guha Slide Sources: CLRS “Intro.
Chapter Algorithms 3.2 The Growth of Functions 3.3 Complexity of Algorithms 3.4 The Integers and Division 3.5 Primes and Greatest Common Divisors.
Trapezoid graphs and generalizations, geometry and algorithms Stefan Felsner, Rudolf Müller, LorenzWernisch.
Sorting Algorithms Insertion Sort: Θ(n 2 ) Merge Sort:Θ(nlog(n)) Heap Sort:Θ(nlog(n)) We seem to be stuck at Θ(nlog(n)) Hypothesis: Every sorting algorithm.
LIMITATIONS OF ALGORITHM POWER
CSCE 411H Design and Analysis of Algorithms Set 10: Lower Bounds Prof. Evdokia Nikolova* Spring 2013 CSCE 411H, Spring 2013: Set 10 1 * Slides adapted.
Lecture 9COMPSCI.220.FS.T Lower Bound for Sorting Complexity Each algorithm that sorts by comparing only pairs of elements must use at least 
Sorting Lower Bounds n Beating Them. Recap Divide and Conquer –Know how to break a problem into smaller problems, such that –Given a solution to the smaller.
On the R ange M aximum-Sum S egment Q uery Problem Kuan-Yu Chen and Kun-Mao Chao Department of Computer Science and Information Engineering, National Taiwan.
1 Chapter 8-1: Lower Bound of Comparison Sorts. 2 About this lecture Lower bound of any comparison sorting algorithm – applies to insertion sort, selection.
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
David Kauchak cs062 Spring 2010
Sorting Lower Bound 4/25/2018 8:49 PM
CPSC 411 Design and Analysis of Algorithms
(2,4) Trees 11/15/2018 9:25 AM Sorting Lower Bound Sorting Lower Bound.
Lecture 5 Algorithm Analysis
Analysis and design of algorithm
Lecture 5 Algorithm Analysis
(2,4) Trees 12/4/2018 1:20 PM Sorting Lower Bound Sorting Lower Bound.
CS200: Algorithm Analysis
Chapter 11 Limitations of Algorithm Power
The Lower Bounds of Problems
Minimizing the Aggregate Movements for Interval Coverage
(2,4) Trees 2/28/2019 3:21 AM Sorting Lower Bound Sorting Lower Bound.
Topic 5: Heap data structure heap sort Priority queue
CMPS 3120: Computational Geometry Spring 2013
CPSC 411 Design and Analysis of Algorithms
Divide & Conquer Sorting
David Kauchak cs302 Spring 2012
CS 583 Analysis of Algorithms
Lecture 5 Algorithm Analysis
Presentation transcript:

Longest Increasing Subsequences in Windows Based on Canonical Antichain Partition Erdong Chen (Joint work with Linji Yang & Hao Yuan) Shanghai Jiao Tong Univ.

Outline Problem Definition Canonical Antichain Partition Sweep Algorithm Complexity Analysis Conclusion

Longest Increasing Subsequence (LIS) Input sequence: All Longest Increasing Subsequences:

LIS in a Window The length of LIS within the window is 2 69 Sequence a Window

Longest Increasing Sequence in A Set of Variable-size Windows (LISSET) Length of LIS = 2 Length of LIS = 3 Length of LIS = 2 Length of LIS = 4 OUTPUT = 11 + = + +

Longest Increasing Sequence in A Set of Variable-size Windows (LISSET) Length of LIS = 2 Length of LIS = 3 Length of LIS = 2 Length of LIS = 4 OUTPUT = 11 + = + +

Related Works Knuth proposed an O(n log n) algorithm for LIS problem Fredman proved an Ω(n log n) lower bound under the decision tree model An O(n log log n) algorithm is possible by using van Emde Boas tree on a permutation.

Related Works (Cont.) Longest Increasing Subsequences in Sliding Windows (LISW problem) (by Michael H. Albert et al), Time Complexity O(OUTPUT + n log log n) We called it Longest Increasing Subsequences in Fixed-size windows

LISW Problem OUTPUT = 14 + = n = 6 w = 3 Length of LIS = 1 Length of LIS = 2 Length of LIS = 1 Length of LIS = 2 Length of LIS = 3 Length of LIS = 2 Length of LIS = n+w-1 = 8 windows

Our Contribution A algorithm for the generalized problem LISSET To solve the sub case LISW problem, our algorithm runs in O(OUTPUT) time. The best result among previous attempts on LISW is O(OUTPUT + n log log n)

Canonical Antichain Partition The sequence: 6, 9, 8, 2, 3, 5, 1, 4, 7 p1(1,6) p4(4,2) p7(7,1) p2(2,9) p3(3,8) p5(5,3) p6(6,5) p8(8,4) p9(9,7)

Dominance Order p1(1,6) p4(4,2) p7(7,1) p2(2,9) p3(3,8) p5(5,3) p6(6,5) p8(8,4) p9(9,7) Points in this region dominates p1 Points in this region dominates p4 a<b iff x a <x b & y a <y b

Height of points by Dominance Order p1 p4 p7 p2 p3 p5 p6 p8 p9 Height = 1

p1 p4 p7 p2 p3 p5 p6 p8 Height of points by Dominance Order Height = 1 Height = 2

p1 p4 p7 p2 p3 p5 p6 p8 Height of points by Dominance Order Height = 1 Height = 2 Height = 3 Height = 4

Antichain and Chain p1=HEAD(1) p4 p7=TAIL(1) p2=HEAD(2) p3 p5=TAIL(2) p6=HEAD(3) p8=TAIL(3) p9=HEAD(4) =TAIL(4) L(1) L(2) L(3) L(4) Antichain: x i =y i+1

p1 p4 p7 p2 p3 p5 p6 p8 p9 L(1) L(2) L(3) L(4) Antichain and Chain Chain: x i <x i+1 & y i <y i+1 Max Element Min Element The longest chain corresponds the LIS The sequence: 6, 9, 8, 2, 3, 5, 1, 4, 7

Sweep Algorithm Sweep from left to right Operations – DELETE operation (Delete at left) e.g.: delete 6 – INSERT operation (Insert at right) e.g.: insert 2 – QUERY operation Algorithm Flow

DELETE operation p1=pdel p3 p7 p5 p2 p4 p6 L(1) L(2) L(3) D(1) = {p1} D(2) = {p2} D(3) = {p4,p5}

DELETE operation (Cont.) p1=pdel p3 p7 p5 p2 p4 p6 D(2) L(1)/D(1) D(3) L(2)/D(2) L(3)/D(3)

After the Delete operation p1=pdel p3 p7 p5 p2 p4 p6 L’(3) L’(1) L’(2)

Analysis of Delete operation Theorem 2. The cost of one DELETE operation equals the total number of points whose height decreases, i.e., O(|D|).

INSERT & QUERY operations Theorem 3. The cost of INSERT operation equals the length of the LIS with the pINS as the maximum element. Theorem 4. The cost of outputting a longest chain equals to the length of the output subsequence.

Algorithm Flow Step 1: Sort the windows W i by their left endpoints (if two windows share the same left endpoint, the longer window comes first) O(n+m) Step 2: initialize current window to ∅ Step 3: slide the window from W j to W j+1 (j=1,2,…m-1)

Details of Step 3 Move from W j to W j+1, W j =(a 1,b 1 ), W j+1 =(a 2,b 2 ) Disjoint Overlap Contain – Same left endpoint – Different left endpoints QUERY(r 2 ) to output a LIS within W j+1

Amotized Complexity Analysis Given a sequence π = π 1 π 2... π n depth i is defined to be the largest height that π i achieved in the m windows. In other words, among all increasing subsequences in m windows, depth i is the length of the longest one with π i as the maximal element.

Complexity of each operation by Amortize Analysis QUERY operation: O(OUTPUT) INSERT operation: DELETE operations: (A point p i can decrease at most depth i times)

Complexity Analysis of LISSET Theorem 5 (LISSET Problem). The algorithm described above computes the m longest increasing subsequences, one for each window, in total time:

Complexity Analysis of LISW depth i equals the length of the output in window π i-w+1, π i-w+2, …, π i So, And, Thus,

Complexity Analysis of LISW Theorem 6 (LISW Problem). Our algorithm finds the longest increasing subsequence in a sliding window over a sequence of n elements in O(OUTPUT) time.

Future Works…

Questions?