Alignment in linear space

Similar documents
Lecture 12: Divide and Conquer Algorithms. Divide and Conquer Algorithms

Making sure metrics are meaningful

Application of Improved Genetic Algorithm to Two-side Assembly Line Balancing

x y z HD(x, y) + HD(y, z) HD(x, z)

H2 Mathematics Pure Mathematics Section A Comprehensive Checklist of Concepts and Skills by Mr Wee Wen Shih. Visit: wenshih.wordpress.

On Parity based Divide and Conquer Recursive Functions

POWERS OF 3RD ORDER MAGIC SQUARES

Logarithms APPENDIX IV. 265 Appendix

COS 126 Atomic Theory of Matter

CHAPTER 5 A NEAR-LOSSLESS RUN-LENGTH CODER

Permutation Enumeration

COMBINATORICS 2. Recall, in the previous lesson, we looked at Taxicabs machines, which always took the shortest path home

Intermediate Information Structures

ASample of an XML stream is:

CS3203 #5. 6/9/04 Janak J Parekh

(2) The MOSFET. Review of. Learning Outcome. (Metal-Oxide-Semiconductor Field Effect Transistor) 2.0) Field Effect Transistor (FET)

Data Mining the Online Encyclopedia of Integer Sequences for New Identities Hieu Nguyen

APPLICATION NOTE UNDERSTANDING EFFECTIVE BITS

1. How many possible ways are there to form five-letter words using only the letters A H? How many such words consist of five distinct letters?

ELEN 624 Signal Integrity

Roberto s Notes on Infinite Series Chapter 1: Series Section 2. Infinite series

Laboratory Exercise 3: Dynamic System Response Laboratory Handout AME 250: Fundamentals of Measurements and Data Analysis

Arithmetic Sequences and Series Sequences and Series Preliminary Maths

Ch 9 Sequences, Series, and Probability

IEC Robot Control TM. Familiar programming opens up future possibilities. yaskawa.com

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 12

PV200. Solar PV tester and I-V curve tracer

ECONOMIC LOT SCHEDULING

We often find the probability of an event by counting the number of elements in a simple sample space.

Cross-Entropy-Based Sign-Selection Algorithms for Peak-to-Average Power Ratio Reduction of OFDM Systems

Counting on r-fibonacci Numbers

Compression Programs. Compression Outline. Multimedia. Lossless vs. Lossy. Encoding/Decoding. Analysis of Algorithms

Extra Practice 1. Name Date. Lesson 1.1: Patterns in Division

Procedia - Social and Behavioral Sciences 128 ( 2014 ) EPC-TKS 2013

7. Counting Measure. Definitions and Basic Properties

Combinatorics. Chapter Permutations. Reading questions. Counting Problems. Counting Technique: The Product Rule

Spread Spectrum Signal for Digital Communications

Lecture 4: Frequency Reuse Concepts

Electromechanical Oscillations Influence to Iductance of Arc Furnace Second Circuit

arxiv: v2 [math.co] 15 Oct 2018

X-Bar and S-Squared Charts

IEC Robot Control. Familiar programming opens up future possibilities. yaskawa.com. When the background color is black or dark color

Combined Scheme for Fast PN Code Acquisition

Adaptive Resource Allocation in Multiuser OFDM Systems

Department of Electrical and Computer Engineering, Cornell University. ECE 3150: Microelectronics. Spring Due on April 26, 2018 at 7:00 PM

Novel pseudo random number generation using variant logic framework

}, how many different strings of length n 1 exist? }, how many different strings of length n 2 exist that contain at least one a 1

Sorting, Selection, and Routing on the Array with Reconfigurable Optical Buses

Fingerprint Classification Based on Directional Image Constructed Using Wavelet Transform Domains

WAVE-BASED TRANSIENT ANALYSIS USING BLOCK NEWTON-JACOBI

PV210. Solar PV tester and I-V curve tracer

A New Design of Log-Periodic Dipole Array (LPDA) Antenna

Test Time Minimization for Hybrid BIST with Test Pattern Broadcasting

CS 201: Adversary arguments. This handout presents two lower bounds for selection problems using adversary arguments ëknu73,

CS 111: Program Design I Lecture 13: Supreme Court Basics, Files

Geometrical Optics Fiber optics

lecture notes September 2, Sequential Choice

Chapter 3 Digital Logic Structures

NOISE IN A SPECTRUM ANALYZER. Carlo F.M. Carobbi and Fabio Ferrini Department of Information Engineering University of Florence, Italy

Measurement of Equivalent Input Distortion AN 20

Lecture 28: MOSFET as an Amplifier. Small-Signal Equivalent Circuit Models.

A Novel Three Value Logic for Computing Purposes

EECE 301 Signals & Systems Prof. Mark Fowler

Efficient Energy Consumption Scheduling: Towards Effective Load Leveling

ONDURA-9. 9-Corrugation Asphalt Roofing Sheets I N S T A L L A T I O N I N S T R U C T I O N S

A New Space-Repetition Code Based on One Bit Feedback Compared to Alamouti Space-Time Code

AC : USING ELLIPTIC INTEGRALS AND FUNCTIONS TO STUDY LARGE-AMPLITUDE OSCILLATIONS OF A PENDULUM

n4ce Professional Fact Sheet

E X P E R I M E N T 13

Fast Sensor Deployment for Fusion-based Target Detection

Schillinger s Special Theory of Harmony: Hybrid 5- and 4-part harmony

Hybrid BIST Optimization for Core-based Systems with Test Pattern Broadcasting

GENERALIZED FORM OF A 4X4 STRONGLY MAGIC SQUARE

Computational Algorithm for Higher Order Legendre Polynomial and Gaussian Quadrature Method

A study on the efficient compression algorithm of the voice/data integrated multiplexer

Faulty Clock Detection for Crypto Circuits Against Differential Faulty Analysis Attack

Single Bit DACs in a Nutshell. Part I DAC Basics

Name Class. Date Section. Test Form A Chapter Chapter 9 Infinite Series. 1 n 1 2 n 3n 1, n 1, 2, 3, Find the fourth term of the sequence

On Balancing Exploration vs. Exploitation in a Cognitive Engine for Multi-Antenna Systems

AMC AMS AMR ACS ACR ASR MSR MCR MCS CRS

8. Combinatorial Structures

Grade 6 Math Review Unit 3(Chapter 1) Answer Key

HOW BAD RECEIVER COORDINATES CAN AFFECT GPS TIMING

A SELECTIVE POINTER FORWARDING STRATEGY FOR LOCATION TRACKING IN PERSONAL COMMUNICATION SYSTEMS

Yuletide Glitz Linens

COMPRESSION OF TRANSMULTIPLEXED ACOUSTIC SIGNALS

Delta- Sigma Modulator with Signal Dependant Feedback Gain

Acquisition of GPS Software Receiver Using Split-Radix FFT

International Power, Electronics and Materials Engineering Conference (IPEMEC 2015)

Data Acquisition System for Electric Vehicle s Driving Motor Test Bench Based on VC++ *

A Comparison on FPGA of Modular Multipliers Suitable for Elliptic Curve Cryptography over GF(p) for Specific p Values

Shuli s Math Problem Solving Column

TRAIN TIMETABLE AND ROUTE GENERATION USING A CONSTRAINT-BASED APPROACH

By: Pinank Shah. Date : 03/22/2006

Resource Utilization in Cloud Computing as an Optimization Problem

Sampling. Introduction to Digital Data Acquisition: Physical world is analog CSE/EE Digital systems need to

ECE 333: Introduction to Communication Networks Fall Lecture 4: Physical layer II

A New FDTD Method for the Study of MRI Pulsed Field Gradient- Induced Fields in the Human Body

Lecture 29: Diode connected devices, mirrors, cascode connections. Context

EMPIRICAL MODE DECOMPOSITION IN AUDIO WATERMARKING BY USING WAVELET METHOD

Transcription:

Sequece Aligmet: Liear Space Aligmet i liear space Chapter 7 of Joes ad Pevzer Q. Ca we avoid usig quadratic space? Easy. Optimal value i O(m + ) space ad O(m) time. Compute OPT(i, ) from OPT(i-1, ). No easy way to recover aligmet itself. Optimal logest commo subsequece i O(m + ) space ad O(m) time [Hirschberg (1975)]. Clever combiatio of divide-ad-coquer ad dyamic programmig. Applicatio to sequece aligmet: E.W. Myers ad W. Miller. Optimal aligmets i liear space. Computer Applicatios i Bioscieces, 4:11-17, 1988. Divide ad Coquer Algorithms Divide problem ito sub-problems Coquer by solvig sub-problems recursively. If the sub-problems are small eough, solve them i brute force fashio Combie the solutios of sub-problems ito a solutio of the origial problem Sortig Give: a usorted array Goal: sort it 1 2 2 3 4 5 6 7 Mergesort: Divide log() divisios to split a array of size ito sigle elemet arrays Mergesort: Coquer 2 5 4 7 1 3 2 6 2 4 5 7 1 2 3 6 1 2 2 3 4 5 6 7 log() iteratios, each iteratio takes O() time Total time: O( log ) O() O() O() 1

Mergesort: Merge Step Mergig 2 4 5 7 1 2 3 6 1 1 2 Mergesort: Example Divide 1 2 2 1 2 2 3 1 2 2 3 4 Etcetera 1 2 2 3 4 5 6 7 Coquer 4 20 6 7 1 3 5 9 4 6 7 20 1 3 5 9 2 sorted arrays of size ad m ca be merged i O(+m) time to form a sorted array of size +m 1 3 4 5 6 7 9 20 MergeSort Algorithm MergeSort(c) size of array c if = 1 retur c left list of first /2 elemets of c right list of last -/2 elemets of c sortedleft MergeSort(left) sortedright MergeSort(right) sortedlist Merge(sortedLeft,sortedRight) retur sortedlist MergeSort: Ruig Time i the ith iteratio we do O() work umber of iteratios is O(log ) ruig time: O( log ) Back to sequece aligmet The Problem: Computig Aligmet Path Requires Quadratic Memory Aligmet Path Space complexity for computig aligmet path for sequeces of legth ad m is O(m) We eed to keep all backtrackig refereces i memory to recostruct the path (backtrackig) m 2

Computig Aligmet Score usig Liear Memory Space complexity of computig just the score itself is O() Oly eed the previous colum to calculate the curret colum 2 Fidig the Middle Poit Ad Agai Ad Agai Crossig the Middle Lie Crossig the Middle Lie m/2 m (i, m/2) Defie: score(i) - the score of the optimal path from (0,0) to (,m) that passes through (i, m/2) m/2 m (i, m/2) (mid,m/2): the positio where the optimal path crosses the middle colum. mid = argmi 0 i score(i) 3

Crossig the Middle Lie score(i) = prefix(i) + suffix(i) prefix(i): score of the optimal aligmet of a legth m/2 prefix of y to a prefix of x (takes a path from (0,0) to (i,m/2) ) suffix(i): score of the optimal aligmet of a legth m/2 suffix of y to a suffix of x (takes a path from (i,m/2) to (,m) ) prefix(i) m/2 m suffix(i) Computig prefix(i) prefix(i): legth of the logest path from (0,0) to (i,m/2) Compute prefix(i) by dyamic programmig i the left half of the matrix store prefix(i) colum 0 m/2 m Computig suffix(i) suffix(i): score of optimal aligmet from (i,m/2) to (,m) Ca be computed by goig i reverse from (,m) to (i,m/2) Fidig the Middle Poit store suffix(i) colum 0 m/2 m Ad Agai Ad Agai 4

Time = Area: First Pass O first pass, the algorithm covers the etire area Time = Area: First Pass O first pass, the algorithm covers the etire area Area = m Area = m Computig prefix(i) Computig suffix(i) Time = Area: Secod Pass O secod pass, the algorithm covers oly 1/2 of the area Time = Area: Third Pass O third pass, oly 1/4th is covered. Area/2 Area/4 Geometric Reductio At Each Iteratio 1 + ½ + ¼ +... + (½) k 2 Rutime: O(Area) = O(m) first pass: 1 3 rd pass: 1/4 2 d pass: 1/2 5 th pass: 1/16 4 th pass: 1/8 Ru Time Aalysis Let T(m, ) = max ruig time of algorithm o strigs of legth m ad. O(m) time to compute prefix(, m/2) ad "suffix(, m/2) ad fid midpoit q. T(q, m/2) + T( - q, m/2) time for two recursive calls. Choose costat c so that: T(m, 2)! 2cm T(2, )! 2c T(m, )! cm + T(q, m / 2) + T( " q, m / 2) Claim: T(m, ) <= 2cm (proof by iductio) 30 5

Is it Possible to Alig Sequeces i Subquadratic Time? Dyamic programmig takes O( 2 ) for various aligmet methods Ca we do better? Yes: The Four-Russias Speedup (works for LCS but ot for geeral sequece aligmet problem) O( 2 /log ) 6