Swaps + Mismatches Based on Estrella Eizenberg M.Sc. Thesis Supervised by Ely Porat.

Slides:



Advertisements
Similar presentations
Dynamic Programming 25-Mar-17.
Advertisements

Start with your equation Move the # term to the other side, and leave a space Determine what HALF of the coefficient of X is Factor the left side Write.
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.
Lecture 3: Parallel Algorithm Design
Types of Algorithms.
Asynchronous Pattern Matching - Metrics Amihood Amir CPM 2006.
Bar Ilan University And Georgia Tech Artistic Consultant: Aviya Amir.
Quicksort Quicksort     29  9.
Deterministic Length Reduction: Fast Convolution in Sparse Data and Applications Written by: Amihood Amir, Oren Kapah and Ely Porat.
Faster Algorithm for String Matching with k Mismatches Amihood Amir, Moshe Lewenstin, Ely Porat Journal of Algorithms, Vol. 50, 2004, pp Date.
Pattern Matching in Weighted Sequences Oren Kapah Bar-Ilan University Joint Work With: Amihood Amir Costas S. Iliopoulos Ely Porat.
String Matching with Mismatches Some slides are stolen from Moshe Lewenstein (Bar Ilan University)
Survey: String Matching with k Mismatches Moshe Lewenstein Bar Ilan University.
Addition and Subtraction Investigation Algorithm for the investigation 1. Choose two or three numbers. 2. Arrange them in order, biggest first. 3. Reverse.
S L E O A V S L I M P E R P R O B E L M
U4L3 Solving Quadratic Equations by Completing the Square.
Lecture 5 Dynamic Programming. Dynamic Programming Self-reducibility.
Dynamic Programming. Well known algorithm design techniques:. –Divide-and-conquer algorithms Another strategy for designing algorithms is dynamic programming.
Dynamic Programming.
On The Connections Between Sorting Permutations By Interchanges and Generalized Swap Matching Joint work of: Amihood Amir, Gary Benson, Avivit Levy, Ely.
Length Reduction in Binary Transforms Oren Kapah Ely Porat Amir Rothschild Amihood Amir Bar Ilan University and Johns Hopkins University.
String Matching with k Mismatches Moshe Lewenstein Bar Ilan University Modified by Ariel Rosenfeld.
Improved string matching with k mismatches (The Kangaroo Method) Galil, R. Giancarlo SIGACT News, Vol. 17, No. 4, 1986, pp. 52–54 Original: Moshe Lewenstein.
Fast Algorithm for String Matching with k Mismatches by Amihood Amir, Moshe Lewenstein, and Ely Porat, Journal of Algorithms, to appear, 2003/2004 Speaker:
Faster Algorithm for String Matching with k Mismatches (II) Amihood Amir, Moshe Lewenstin, Ely Porat Journal of Algorithms, Vol. 50, 2004, pp
Algorithm Paradigms High Level Approach To solving a Class of Problems.
Analysis of Algorithms CSCI Previous Evaluations of Programs Correctness – does the algorithm do what it is supposed to do? Generality – does it.
( + ) ÷ ( + ) = ( + ) ( – ) ÷ ( – ) = ( + ) Simplify the following. ( + ) ÷ ( – ) = ( – ) ( – ) ÷ ( + ) = ( – ) 1) – 54 ÷ ( – 9 )= 6 2) – 48 ÷ 6= – 8 3)
Zero – product property
Using square roots to solve quadratic equations. 2x² = 8 22 x² = 4 The opposite of squaring a number is taking its square root √ 4= ± 2.
Real time pattern matching Porat Benny Porat Ely Bar-Ilan University.
6-1 6 th grade math Comparing and Ordering Positive and Negative Numbers.
¸üµÖŸÖ ×¿ÖÖÖ ÃÖÓãÖÖ,ÃÖÖ ŸÖÖ¸üÖ ú´ÖÔ¾Ö߸ü ×¾ÖªÖ¯ÖϲÖÖê× ¬Ö­Öß, ´Ö¬µÖ ×¾Ö³Ö֐Ö, ÃÖÖŸÖÖ¸üÖ ¿ÖÖ»ÖêµÖ †³µÖÖÃ֍Îú´ÖÖ­ÖãÃÖÖ¸ ÃÖÓãÖêŸÖᯙ ÃÖê¾ÖúÖÓ­Öß ŸÖµÖÖ¸ü.
Unit 7 Quadratics Radical Equations Goal: I can solve simple radical equations in one variable (A-REI.2)
Computer Science 101 A Survey of Computer Science QuickSort.
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
What are Integers?? Many situations cannot be represented by whole numbers. You may need negative numbers to show a loss, a temperature below zero, or.
Numerical Relationships
7 jumps right 12 jumps left Objective - To solve problems involving scientific notation Scientific Notation- used to write very large or very small numbers.
Complex Numbers Definitions Graphing 33 Absolute Values.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
Division by 2 Any number that ends is 0, 2, 4, 6, or 8 is evenly divisible by 2.
Square Numbers and Square Roots By Mrs Balfour. Square numbers are called square numbers because you can make a square out of that number of smaller squares.
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.
23 Jan, 2008SOFSEM A New Model to Solve the Swap Matching Problem and Efficient Algorithms for Short Patterns Costas Iliopoulos M. Sohel Rahman.
Pattern Matching With Don’t Cares Clifford & Clifford’s Algorithm Orgad Keller.
Dynamic Programming. What is Dynamic Programming  A method for solving complex problems by breaking them down into simpler sub problems. It is applicable.
Amihood Amir, Gary Benson, Avivit Levy, Ely Porat, Uzi Vishne
Divide and Conquer.
INTEGERS.
Lecture 5 Dynamic Programming
The Art of Problem Solving
Dynamic Programming Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Solve a quadratic equation
Adding and Subtracting Integers
Types of Algorithms.
Lecture 5 Dynamic Programming
Objective - To solve problems involving scientific notation
Data Structures: Segment Trees, Fenwick Trees
Fast Fourier Transform
Square Numbers and Square Roots
Types of Algorithms.
1-5 Absolute Value Equations
List of Some Perfect Squares
Solving the Quadratic Equation by Completing the Square
String Matching with k Mismatches
Binary counting challenge
Types of Algorithms.
Equations my dear Watson.
Warm-Up Set 1: Factor. 1) x2 + 6x + 9 2) x2 - 10x + 25 Set 2: Factor.
Presentation transcript:

Swaps + Mismatches Based on Estrella Eizenberg M.Sc. Thesis Supervised by Ely Porat

Swaps + Mismatches A paper on this subject by Amihood Amir, Estrella Eizenberg, Ohad Lipsky and Ely Porat Was submitted to ESA 2004

Problem definition T: a d b d a c b d a b c a b d a b b a a b c Mismatches: Abrahamson 87 K-mismatches Landau Vishkin 86 Amir Lewenstein Porat 00

Problem definition T: a d b d a c b d a b c a b d c a b d b a c Swaps: Amir Aumann Landau M.Lewenstein N.Lewenstein 87 Cole Hariharan 00 Amir Cole Hariharan Lewenstein Porat 2001 Amir Lewenstein Porat 2000

Problem definition T: a d b d a c b d a b c a b d c a b b b a c Minimum distance: Counting all as mismatches: 5 err Minimum distance: 3 err

Starting with simpler problem  ={0,1} T: We wish to count only the mismatches (we will leave the swaps for later) we call them non-swap-mismatches (NSM)

Starting with simpler problem  ={0,1} T: NSM[6]=2 Mismatches[6]=4 Minimum-distance[6]=(Mismatches[6]+NSM[6])/2 3-err O(nlogm) ???? O(????+nlogm)

Starting with simpler problem T: T 1 : * * * * * T 2 : * * * * * * * * * * 0 1

Starting with simpler problem P 2 : 1 0 * * * * * P 1 : * * We do the same for the pattern We will give solution only for the odd places (NSM[i] where i is odd) P:

Starting with simpler problem P 2 : 1 0 * * * * * P 1 : * * T 1 : * * * * * T 1 comparing with P 1 doesn’t give any err neither swap nor mismatch (the same is for T 2 against P 2 ) Without loss of generality we look only on T 1 against P 2

Starting with simpler problem P 2 : 1 0 * * * * * T 1 : * * * * * P 2 : 1 0 * * * * * 1 0 Even overlap Odd overlap We need to count how many odd overlaps we have One NSM err

Simpler problem We separate the sequence to 4 categories: 1.Starting at odd position and ending at odd position (called OO) 2.Starting at odd position and ending at even position (called OE) 3.Starting at even position and ending at odd position (called EO) 4.Starting at even position and ending at even position (called EE)

Simpler problem O O T P The overlap must start with P O(nlogm) – one convolution

Simpler problem O O T P The overlap must start with P O(nlogm) – one convolution OO O

Simpler problem  We deal with: O? against O? and with ?O against ?O  The same method work for E? against E? and ?E against ?E  We left to deal with: –OE against EO –EO against OE –OO against EE –EE against OO

OO against EE O E T P P E E E O E E E E Even overlap Odd overlap We need to recognized when the segment contain one other

Simpler problem  We can easily know if we are contained or we contain another segments if we know the segment size.  Smaller segments can’t contain larger segments

Simpler problem  Then for each segment we divide the computation against bigger segment and against smaller segments  We do it by computing the answer each time to all segments of size ‘x’

Simpler problem  The number of different sizes is at most square root of m

What we have  We have an algorithm for the Simpler problem that run in time O(n\sqrt{m}\logm)  We have an algorithm for binary alphabet that run in O(n\sqrt{m}\logm)  With several more techniques we develop an algorithm solving the original problem in O(n\sqrt{m}\logm)

Open problem  It is easy to see that our algorithm is at most factor of O(\sqrt{\logm}) from the optimal algorithm (due to redaction to counting mismatches)  But one can try to improve the small alphabet case