On The Connections Between Sorting Permutations By Interchanges and Generalized Swap Matching Joint work of: Amihood Amir, Gary Benson, Avivit Levy, Ely.

Slides:



Advertisements
Similar presentations
Randomness Conductors Expander Graphs Randomness Extractors Condensers Universal Hash Functions
Advertisements

Xiaoming Sun Tsinghua University David Woodruff MIT
The beauty of prime numbers vs the beauty of the random Ely Porat Bar-Ilan University Israel.
CS 336 March 19, 2012 Tandy Warnow.
Sorting by reversals Bogdan Pasaniuc Dept. of Computer Science & Engineering.
Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
Longest Common Subsequence
Embedding the Ulam metric into ℓ 1 (Ενκρεβάτωση του μετρικού χώρου Ulam στον ℓ 1 ) Για το μάθημα “Advanced Data Structures” Αντώνης Αχιλλέως.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Greedy Algorithms Amihood Amir Bar-Ilan University.
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
22C:19 Discrete Structures Trees Spring 2014 Sukumar Ghosh.
Asynchronous Pattern Matching - Metrics Amihood Amir CPM 2006.
Approximate On-line Palindrome Recognition, and Applications Amihood Amir Benny Porat.
Complexity class NP Is the class of languages that can be verified by a polynomial-time algorithm. L = { x in {0,1}* | there exists a certificate y with.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Bar Ilan University And Georgia Tech Artistic Consultant: Aviya Amir.
Asynchronous Pattern Matching - Metrics Amihood Amir.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Advanced Topics in Algorithms and Data Structures Page 1 Parallel merging through partitioning The partitioning strategy consists of: Breaking up the given.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Function Matching Amihood Amir Yonatan Aumann Moshe Lewenstein Ely Porat Bar Ilan University.
Symmetry Detection via String Matching Sergey Kiselev Symmetry Seminar Haifa University, Spring 2005.
Computability and Complexity 32-1 Computability and Complexity Andrei Bulatov Boolean Circuits.
Property Matching and Weighted Matching Amihood Amir, Eran Chencinski, Costas Iliopoulos, Tsvi Kopelowitz and Hui Zhang.
Parallel Merging Advanced Algorithms & Data Structures Lecture Theme 15 Prof. Dr. Th. Ottmann Summer Semester 2006.
Chapter 1 The Self-Reducibility Technique Matt Boutell and Bill Scherer CSC 486 April 4, 2001.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
Deterministic Length Reduction: Fast Convolution in Sparse Data and Applications Written by: Amihood Amir, Oren Kapah and Ely Porat.
1 Efficient String Matching : An Aid to Bibliographic Search Alfred V. Aho and Margaret J. Corasick Bell Laboratories.
EXPANDER GRAPHS Properties & Applications. Things to cover ! Definitions Properties Combinatorial, Spectral properties Constructions “Explicit” constructions.
Derandomizing LOGSPACE Based on a paper by Russell Impagliazo, Noam Nissan and Avi Wigderson Presented by Amir Rosenfeld.
Aho-Corasick String Matching An Efficient String Matching.
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
Composition Alignment Gary Benson Departments of Computer Science and Biology Boston University.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Faster Algorithm for String Matching with k Mismatches Amihood Amir, Moshe Lewenstin, Ely Porat Journal of Algorithms, Vol. 50, 2004, pp Date.
Data Structures – LECTURE 10 Huffman coding
Pattern Matching in Weighted Sequences Oren Kapah Bar-Ilan University Joint Work With: Amihood Amir Costas S. Iliopoulos Ely Porat.
Asynchronous Pattern Matching - Address Level Errors Amihood Amir Bar Ilan University 2010.
S C A L E D Pattern Matching Amihood Amir Ayelet Butman Bar-Ilan University Moshe Lewenstein and Johns Hopkins University Bar-Ilan University.
1 A Simpler 1.5- Approximation Algorithm for Sorting by Transpositions Combinatorial Pattern Matching (CPM) 2003 Authors: T. Hartman & R. Shamir Speaker:
Chapter 14 Randomized algorithms Introduction Las Vegas and Monte Carlo algorithms Randomized Quicksort Randomized selection Testing String Equality Pattern.
On realizing shapes in the theory of RNA neutral networks Speaker: Leszek Gąsieniec, U of Liverpool, UK Joint work with: Peter Clote, Boston College, USA.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Length Reduction in Binary Transforms Oren Kapah Ely Porat Amir Rothschild Amihood Amir Bar Ilan University and Johns Hopkins University.
Faster Algorithm for String Matching with k Mismatches (II) Amihood Amir, Moshe Lewenstin, Ely Porat Journal of Algorithms, Vol. 50, 2004, pp
Combinatorial Optimization Problems in Computational Biology Ion Mandoiu CSE Department.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
Probabilistic verification Mario Szegedy, Rutgers www/cs.rutgers.edu/~szegedy/07540 Lecture 5.
06/12/2015Applied Algorithmics - week41 Non-periodicity and witnesses  Periodicity - continued If string w=w[0..n-1] has periodicity p if w[i]=w[i+p],
Permuted Scaled Matching Ayelet Butman Noa Lewenstein Ian Munro.
Ravello, Settembre 2003Indexing Structures for Approximate String Matching Alessandra Gabriele Filippo Mignosi Antonio Restivo Marinella Sciortino.
1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Interchange and Weighted-Interchange Rearrangement Distances in Strings Joint work of: Amihood Amir, Tzvika Hartman, Oren Kapah and Avivit Levy.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
On the Hardness of Optimal Vertex Relabeling and Restricted Vertex Relabeling Amihood Amir Benny Porat.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
A new matching algorithm based on prime numbers N. D. Atreas and C. Karanikas Department of Informatics Aristotle University of Thessaloniki.
1 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true?
Sorting by placement and Shift Sergi Elizalde Peter Winkler By 資工四 B 周于荃.
Amihood Amir, Gary Benson, Avivit Levy, Ely Porat, Uzi Vishne
Lecture 3: Genome Rearrangements and Duplications
ICS 353: Design and Analysis of Algorithms
Richard Anderson Winter 2019 Lecture 6
Richard Anderson Winter 2019 Lecture 5
Presentation transcript:

On The Connections Between Sorting Permutations By Interchanges and Generalized Swap Matching Joint work of: Amihood Amir, Gary Benson, Avivit Levy, Ely Porat, Uzi Vishne

Motivation Biology: sorting permutations Reversals (Berman & Hannenhalli, 1996) Transpositions (Bafna & Pevzner, 1998) Pattern Matching: Swaps (Amir, Lewenstein & Porat, 2002) NP-hard ? Block interchanges O(n 2 ) (Christie, 1996) O(n log m) Note: A swap is a block interchange simplification 1. Block size2. Only once3. Adjacent

Motivation: Edit operations map Reversal, Transposition, Block interchange: 1. arbitrary block size 2. not once 3. non adjacent 4. permutation5. optimization Interchange: 1. block of size 1 2. not once 3. non adjacent 4. permutation5. optimization Generalized-swap: 1. block of size 12. once 3. non adjacent 4. repetitions 5. optimization/decision Swap: 1. block of size 1 2. once 3. adjacent 4. repetitions 5. optimization/decision

S=abacbF=bbaca interchange S=abacbF=bbaac interchange matches S 1 =bbaca S 2 =bbaac S=abacbF=bcaba generalized-swap matches S 1 =bbaca S 2 =bcaba Definitions

Generalized Swap Matching INPUT:text T[0..n], pattern P[0..m] OUTPUT: all i s.t. P generalized-swap matches T[i..i+m] Reminder:Convolution The convolution of the strings t[1..n] and p[1..m] is the string t*p such that: Fact: The convolution of n-length text and m-length pattern can be done in O(n log m) time using FFT.

Generalized Swap Matching a Randomized Algorithm Idea:assign natural numbers to alphabet symbols, and construct: T’:replacing the number a by the pair a 2,-a P’:replacing the number b by the pair b, b 2. Convolution of T’ and P’ gives at every location 2i:  j=0..m h(T’[2i+j],P’[j]) where h(a,b)=ab(a-b).  3-degree multivariate polynomial.

Generalized Swap Matching: a Randomized Algorithm… Since: h(a,a)=0 h(a,b)+h(b,a)=ab(b-a)+ba(a-b)=0, a generalized-swap match  0 polynomial. What about 0’s of the polynomial? By Schwartz-Zippel Lemma prob. of 0  degree/|domain|. Theorem: There exist an O(n log m) algorithm that reports all generalized-swap matches and reports false matches with prob.  1/n.

Generalized Swap Matching: De-randomization? Can we detect 0’s thus de-randomize the algorithm? Suggestion: Take h 1,…h k having no common root. It won’t work, k would have to be too large !

Generalized Swap Matching: De-randomization?… Theorem:  (m/log m) polynomial functions are required to guarantee a 0 convolution value is a 0 polynomial. Proof: By a linear reduction from word equality. Given: m-bit words w1 w2 at processors P1 P2 Construct: T=w1,1,2,…,m P=1,2,…,m,w2. Now, T generalized-swap matches P iff w1=w2. Communication Complexity: word equality requires exchanging  (m) bits, We get: k  log m=  (m), so k must be  (m/log m). P1 computes: w1 * (1,2,…,m) log m bit result P2 computes: (1,2,…,m) * w2

Interchange Distance Problem INPUT:text T[0..n], pattern P[0..m] OUTPUT: The minimum number of interchanges s.t. T[i..i+m] interchange matches P. Reminder:permutation cycle The cycles (143) 3-cycle, (2) 1-cycle represent Fact: The representation of a permutation as a product of disjoint permutation cycles is unique.

Interchange Distance Problem… Lemma: Sorting a k-length permutation cycle requires exactly k-1 interchanges. Proof: By induction on k. Theorem: The interchange distance of an m-length permutation  is m-c(  ), where c(  ) is the number of permutation cycles in . Result: An O(nm) algorithm to solve the interchange distance problem. A connection between sorting by interchanges and generalized-swap matching? Cases: (1), (2 1), (3 1 2)

Interchange Generation Distance Problem INPUT:text T[0..n], pattern P[0..m] OUTPUT: The minimum number of interchange- generations s.t. T[i..i+m] interchange matches P. Definition: Let S=S 1,S 2,…,S k =F, S l+1 derived from S l via interchange I l. An interchange-generation is a subsequence of I 1,…,I k-1 s.t. the interchanges have no index in common. Note: Interchanges in a generation may occur in parallel.

Interchange Generation Distance Problem… Lemma: Let  be a cycle of length k>2. It is possible to sort  in 2 generations and k-1 interchanges. Example:(1,2,3,4,5,6,7,8,0) generation 1: (1,8),(2,7),(3,6),(4,5) (8,7,6,5,4,3,2,1,0) generation 2: (0,8),(1,7),(2,6),(3,5) (0,1,2,3,4,5,6,7,8)

Interchange Generation Distance Problem… Theorem: Let maxl(  ) be the length of the longest permutation cycle in an m-length permutation . The interchange generation distance of  is exactly: 1.0, if maxl(  )=1. 2.1, if maxl(  )=2. 3.2, if maxl(  )>2. Note: There is a generalized-swap match iff sorting by interchanges is done in 1 generation.

The End