Longest increasing subsequences in sliding windows Michael H. Albert, Alexander Golynski, Angele M. Hamel, Alejandro Lopez-Ortiz, S. Srinivasa Rao, Mohammad.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science for Some.
Advertisements

Improved Algorithms for Inferring the Minimum Mosaic of a Set of Recombinants Yufeng Wu and Dan Gusfield UC Davis CPM 2007.
Introduction to Computer Science 2 Lecture 7: Extended binary trees
Longest Common Subsequence
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
Chapter 5 Shortest Paths: Label-Correcting Algorithms
Parallel Sorting Algorithms Comparison Sorts if (A>B) { temp=A; A=B; B=temp; } Potential Speed-up –Optimal Comparison Sort: O(N lg N) –Optimal Parallel.
CS 253: Algorithms Chapter 8 Sorting in Linear Time Credit: Dr. George Bebis.
Pattern Discovery in RNA Secondary Structure Using Affix Trees (when computer scientists meet real molecules) Giulio Pavesi& Giancarlo Mauri Dept. of Computer.
4 -1 Chapter 4 The Sequence Alignment Problem The Longest Common Subsequence (LCS) Problem A string : S 1 = “ TAGTCACG ” A subsequence of S 1 :
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez May 20, 2003.
Implementation of Planted Motif Search Algorithms PMS1 and PMS2 Clifford Locke BioGrid REU, Summer 2008 Department of Computer Science and Engineering.
Efficient algorithms for the scaled indexing problem Biing-Feng Wang, Jyh-Jye Lin, and Shan-Chyun Ku Journal of Algorithms 52 (2004) 82–100 Presenter:
Building Suffix Trees in O(m) time Weiner had first linear time algorithm in 1973 McCreight developed a more space efficient algorithm in 1976 Ukkonen.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez May 10, 2005.
CS 202, Spring 2003 Fundamental Structures of Computer Science II Bilkent University1 Sorting CS 202 – Fundamental Structures of Computer Science II Bilkent.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 20: Binary Trees.
Developing Pairwise Sequence Alignment Algorithms
B+ Tree What is a B+ Tree Searching Insertion Deletion.
Balanced Trees Ellen Walker CPSC 201 Data Structures Hiram College.
CHAPTER 71 TREE. Binary Tree A binary tree T is a finite set of one or more nodes such that: (a) T is empty or (b) There is a specially designated node.
Pairwise Alignment, Part I Constructing the Values and Directions Tables from 2 related DNA (or Protein) Sequences.
Longest Increasing Subsequences in Windows Based on Canonical Antichain Partition Erdong Chen (Joint work with Linji Yang & Hao Yuan) Shanghai Jiao Tong.
1 Verifying and Mining Frequent Patterns from Large Windows ICDE2008 Barzan Mozafari, Hetal Thakkar, Carlo Zaniolo Date: 2008/9/25 Speaker: Li, HueiJyun.
Feature Selection in Nonlinear Kernel Classification Olvi Mangasarian Edward Wild University of Wisconsin Madison.
Merge Sort. What Is Sorting? To arrange a collection of items in some specified order. Numerical order Lexicographical order Input: sequence of numbers.
DATA STRUCTURE & ALGORITHMS (BCS 1223) CHAPTER 8 : SEARCHING.
CSIT 402 Data Structures II
Data Structures Simple Sorts Phil Tayco Slide version 1.0 Feb. 8, 2015.
Efficient Elastic Burst Detection in Data Streams Yunyue Zhu and Dennis Shasha Department of Computer Science Courant Institute of Mathematical Sciences.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
Memory Allocation of Multi programming using Permutation Graph By Bhavani Duggineni.
Synthesizing Natural Textures Michael Ashikhmin University of Utah.
Lecture #9: Sorting Algorithms خوارزميات الترتيب Dr. Hmood Al-Dossari King Saud University Department of Computer Science 22 April 2012.
Linked List by Chapter 5 Linked List by
OPTIMIZING DSP SCHEDULING VIA ADDRESS ASSIGNMENT WITH ARRAY AND LOOP TRANSFORMATION Chun Xue, Zili Shao, Ying Chen, Edwin H.-M. Sha Department of Computer.
Experimenting an approximation algorithm for the LCS Paola Bonizzoni, Gianluca Della Vedova., Giancarlo Mauri Discrete Applied Mathematics 110 (2001) 13–24.
Lecture 8 : Priority Queue Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
FALL 2005CENG 213 Data Structures1 Priority Queues (Heaps) Reference: Chapter 7.
Lecture 9COMPSCI.220.FS.T Lower Bound for Sorting Complexity Each algorithm that sorts by comparing only pairs of elements must use at least 
Ludim Castillo. How does the algorithm work? 2 step algorithm 1 st step Build heap out of the data 2 nd step Remove the largest element of the heap. Insert.
1Computer Sciences Department. 2 Advanced Design and Analysis Techniques TUTORIAL 7.
BINARY TREES Objectives Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms Discuss a binary.
Today’s Material Sorting: Definitions Basic Sorting Algorithms
MotivationLocating the k largest subsequences: Main ideasResults Problem definitions Problem instance ( k=5 ) Bibliography
Great Theoretical Ideas in Computer Science for Some.
1 Binary Search Trees  Average case and worst case Big O for –insertion –deletion –access  Balance is important. Unbalanced trees give worse than log.
Experimental Study on the Five Sort Algorithms You Yang, Ping Yu, Yan Gan School of Computer and Information Science Chongqing Normal University Chongqing,
An O(bn 2 ) Time Algorithm for Optimal Buffer Insertion with b Buffer Types Authors: Zhuo Li and Weiping Shi Presenter: Sunil Khatri Department of Electrical.
1 Priority Queues (Heaps). 2 Priority Queues Many applications require that we process records with keys in order, but not necessarily in full sorted.
Experience Report: System Log Analysis for Anomaly Detection
Decision Trees DEFINITION: DECISION TREE A decision tree is a tree in which the internal nodes represent actions, the arcs represent outcomes of an action,
Multiway Search Trees Data may not fit into main memory
CS202 - Fundamental Structures of Computer Science II
CS202 - Fundamental Structures of Computer Science II
Program Design Introduction to Computer Programming By:
CS202 - Fundamental Structures of Computer Science II
Sequence Alignment with Traceback on Reconfigurable Hardware
Searching and BST Exercises
Heapsort and d-Heap Neil Tang 02/11/2010
The algorithm of Garsia and Wachs
Data Structures Sorted Arrays
CS202 - Fundamental Structures of Computer Science II
Chapter 7: Eligibility Traces
Heapsort and d-Heap Neil Tang 02/14/2008
CS202 - Fundamental Structures of Computer Science II
Applications of Arrays
CS202 - Fundamental Structures of Computer Science II
Presentation transcript:

Longest increasing subsequences in sliding windows Michael H. Albert, Alexander Golynski, Angele M. Hamel, Alejandro Lopez-Ortiz, S. Srinivasa Rao, Mohammad Ali Safari Theoretical Computer Science 321 (2004) 405–414 Presenter: Yung-Hsing Peng Date:

Definition for the Problem Local Max Value For each window report the length k of the longest increasing subsequence in that window. Local Max Sequence Explicitly list a longest increasing subsequence for each window Global Max Sequence Find the window with the longest increasing sequence among all windows. *The algorithm in this paper deals with the second problem

Previous Work (no sliding) Average length of LIS is Robinson-Schensted-Knuth Algorithm O(nlogn) for finding the LIS, which is optimal in comparison model van Emde Boas data structure O(nloglogn) for finding the LIS using a special data structure. These previous works will be used to describe the new algorithm.

Robinson-Schensted-Knuth Algorithm We can trace the LIS using an implicit tree if we record the left neighbor of when an element is inserted.

Data Structure in This Paper

Efficient Method to Maintain the Row Towers (1) m Sequence (run length coding)  Used to delete duplicate rows (2) d Sequence  Used to record the valid range of every element (3)σSequence  Used to record the valid range of every element when the tower is run length coded. (It will also be used when tracing the LIS sequence) (4)Principle Row  Used to maintain every element (It is the result of RSK algorithm, but using Emde Boas data structure to keep them will only cost O(nloglogn))

An Example PR = (1,4,7,8) m = (1,2,2,2) d = (7,3,1,5) σ= (4,2,1,3) PR = (1,4,6,8) m = (1,2,4,1) d = (7,3,8,1) σ= (3,2,4,1)

Some Important Tips R i includes R i+1, and only differs from R i+1 by at most one element. σ is the permutation from 1 to l, where l is the length of LIS in this window When a new element is inserted, d and σ can be updated by replacing and shifting some elements.

Updating the Row Towers (1/2) Expire The expire operation simply subtracts 1 from each element of d and deletes the element with expiry time 0 (if there is one) from R. If no deletion occurs then σ is unchanged. Otherwise, the element 1 is deleted from σ and the remaining values are decreased by 1.  This operation cost O(l), where l is the length of LIS in the processing window

Updating the Row Towers (2/2) ADD (new element b) So there is a sequence of indices i 1 d(i t ). These indices represent the elements of the principal row which are bumped by b. Since b is placed in position i 1 in the first row and does not drop out until the very end, the sequence d is updated according to: d(i t+1 ) = d(i t ) for t = 1,2… k-1, (means “shift”) d(i 1 ) = w + 1: Similarly, the update of σ is σ(i t+1 ) = σ(i t ) for t = 1,2…k-1, (also means “shift”) σ(i 1 ) = l  This operation cost O(l), where l is the length of LIS in the processing window

An Example PR=(2,3,6,8) m=(1,3,1,1) d=(1,4,5,6) σ=(1,2,3,4) PR=(3,4,8) m=(3,1,2) d=(3,6,4) σ=(1,3,2) PR=(3,4,8,9) m=(2,1,2,1) d=(2,5,3,6) σ=(1,3,2,4) PR=(1,4,8,9) m=(1,1,2,2) d=(6,1,2,4) σ=(4,1,2,3) PR=(3,6,8) m=(3,1,1) d=(3,4,5) σ=(1,2,3) PR=(3,4,8) m=(2,1,2) d=(2,5,3) σ=(1,3,2) PR=(3,4,8,9) m=(1,1,2,1) d=(1,4,2,5) σ=(1,3,2,4) EXP ADD Red numbers will shift during the “ADD” operation, and blue color labels all i 1

Analysis

Conclusion