Tamanna Chhabra, M. Oguzhan Kulekci, and Jorma Tarhio Aalto University.

Slides:



Advertisements
Similar presentations
Indexing DNA Sequences Using q-Grams
Advertisements

Streaming SIMD Extension (SSE)
ECE291 Computer Engineering II Lecture 24 Josh Potts University of Illinois at Urbana- Champaign.
Time Optimization of HEVC Encoder over X86 Processors using SIMD
Genome-scale disk-based suffix tree indexing Benjarath Phoophakdee Mohammed J. Zaki Compiled by: Amit Mahajan Chaitra Venus.
String Searching Algorithms Problem Description Given two strings P and T over the same alphabet , determine whether P occurs as a substring in T (or.
Multithreaded FPGA Acceleration of DNA Sequence Mapping Edward Fernandez, Walid Najjar, Stefano Lonardi, Jason Villarreal UC Riverside, Department of Computer.
Boyer-Moore string search algorithm Book by Dan Gusfield: Algorithms on Strings, Trees and Sequences (1997) Original: Robert S. Boyer, J Strother Moore.
String Matching COMP171 Fall String matching 2 Pattern Matching * Given a text string T[0..n-1] and a pattern P[0..m-1], find all occurrences of.
Basic Computer Organization, CPU L1 Prof. Sin-Min Lee Department of Computer Science.
Elementary Data Types Scalar Data Types Numerical Data Types Other
Pattern Matching COMP171 Spring Pattern Matching / Slide 2 Pattern Matching * Given a text string T[0..n-1] and a pattern P[0..m-1], find all occurrences.
Fast binary and multiway prefix searches for pachet forwarding Author: Yeim-Kuan Chang Publisher: COMPUTER NETWORKS, Volume 51, Issue 3, pp , February.
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.
A Fast Algorithm for Multi-Pattern Searching Sun Wu, Udi Manber May 1994.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Lecture 12: Computer Arithmetic Today’s topic –Numerical representations –Addition / Subtraction –Multiplication / Division 1.
1 Pattern Matching Using n-grams With Algebraic Signatures Witold Litwin[1], Riad Mokadem1, Philippe Rigaux1 & Thomas Schwarz[2] [1] Université Paris Dauphine.
String Matching. Problem is to find if a pattern P[1..m] occurs within text T[1..n] Simple solution: Naïve String Matching –Match each position in the.
Chapter 2 Source Coding (part 2)
1 Template-Based Classification Method for Chinese Character Recognition Presenter: Tienwei Tsai Department of Informaiton Management, Chihlee Institute.
Modularizing B+-trees: Three-Level B+-trees Work Fine Shigero Sasaki* and Takuya Araki NEC Corporation * currently with 1st Nexpire Inc.
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
Computer Arithmetic.
VAX-11/780 – A Virtual Address Extension to the DEC PDP-11 Family ( Author : W.D.Strecker ) By Padmaja chowti.
Presented by Tienwei Tsai July, 2005
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
CS212: DATA STRUCTURES Lecture 10:Hashing 1. Outline 2  Map Abstract Data type  Map Abstract Data type methods  What is hash  Hash tables  Bucket.
An Improved Algorithm to Accelerate Regular Expression Evaluation Author: Michela Becchi, Patrick Crowley Publisher: 3rd ACM/IEEE Symposium on Architecture.
Tamanna Chhabra, Sukhpal Singh Ghuman, Jorma Tarhio Tuning Algorithms for Jumbeled Matching.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
MCS 101: Algorithms Instructor Neelima Gupta
1 Pattern Matching Using n-gram Sampling Of Cumulative Algebraic Signatures : Preliminary Results Witold Litwin[1], Riad Mokadem1, Philippe Rigaux1 & Thomas.
Strings and Pattern Matching Algorithms Pattern P[0..m-1] Text T[0..n-1] Brute Force Pattern Matching Algorithm BruteForceMatch(T,P): Input: Strings T.
Presented by: Aneeta Kolhe. Named Entity Recognition finds approximate matches in text. Important task for information extraction and integration, text.
Chapter 10 Hashing. The search time of each algorithm depend on the number n of elements of the collection S of the data. A searching technique called.
Recent Results in Combined Coding for Word-Based PPM Radu Rădescu George Liculescu Polytechnic University of Bucharest Faculty of Electronics, Telecommunications.
Hannu Peltola Jorma Tarhio Aalto University Finland Variations of Forward-SBNDM.
Protein motif extraction with neuro-fuzzy optimization Bill C. H. Chang and Author : Bill C. H. Chang and Saman K. Halgamuge Saman K. Halgamuge Adviser.
Introduction to MMX, XMM, SSE and SSE2 Technology
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],
Other Processors. Having learnt MIPS, we can learn other major processors. Not going to be able to cover everything; will pick on the interesting aspects.
With a focus on floating point.  For floating point (i.e., real numbers), MASM supports:  real4  single precision; IEEE standard; analogous to float.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
Author : Sarang Dharmapurikar, John Lockwood Publisher : IEEE Journal on Selected Areas in Communications, 2006 Presenter : Jo-Ning Yu Date : 2010/12/29.
1 An Efficient Classification Approach Based on Grid Code Transformation and Mask-Matching Method Presenter: Yo-Ping Huang.
Joint Advanced Student School Compressed Suffix Arrays Compression of Suffix Arrays to linear size Fabian Pache.
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures.
ELEC692 VLSI Signal Processing Architecture Lecture 12 Numerical Strength Reduction.
C.E. Goutis V.I.Kelefouras University of Patras Department of Electrical and Computer Engineering VLSI lab Date: 20/11/2015 Compilers for Embedded Systems.
Chapter 15 Running Time Analysis. Topics Orders of Magnitude and Big-Oh Notation Running Time Analysis of Algorithms –Counting Statements –Evaluating.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Computer Science 516 Intel x86 Overview. Intel x86 Family Eight-bit 8080, 8085 – 1970s 16-bit 8086 – was internally 16 bits, externally 8 bits.
Other Processors.
MMX Multi Media eXtensions
Statistical Optimal Hash-based Longest Prefix Match
Kiran Subramanyam Password Cracking 1.
Accelerating Approximate Pattern Matching with Processing-In-Memory (PIM) and Single-Instruction Multiple-Data (SIMD) Programming Damla Senol Cali1, Zülal.
A.R. Hurson 323 CS Building, Missouri S&T
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Binary Numbers The Binary number system is derived from Base 2. In base 2 there are only 2 numerical options 0 and 1. The computer sees these as Off.
Knuth-Morris-Pratt Algorithm.
Jumbled Matching with SIMD
Morgan Kaufmann Publishers Arithmetic for Computers
Improved Two-Way Bit-parallel Search
Other Processors Having learnt MIPS, we can learn other major processors. Not going to be able to cover everything; will pick on the interesting aspects.
Computer Architecture and System Programming Laboratory
Presentation transcript:

Tamanna Chhabra, M. Oguzhan Kulekci, and Jorma Tarhio Aalto University

 Order preserving matching has gained much attention lately.  String of numbers.  Finding all substrings in the text which have the same relative order and length as the pattern.  Relative order means the numerical order of the numbers in the string. 2

 Suppose P = (10, 22, 15, 30, 20, 18, 27) and T = (22, 85, 79, 24, 42, 27,62, 40, 32, 47, 69, 55, 25), then the relative order of P matches the substring u = (24, 42, 27, 62, 40, 32, 47) of T.  In the pattern P the relative order of the numbers is: 1, 5, 2, 7, 4, 3, 6.  This means 10 is the smallest number in the string, 15 is the second smallest, 18 the third smallest and so on.  Similarly in the substring u of text T, 24 is the smallest number, 27 is the second smallest and so on. 3

4

 T = (22, 85, 79, 24, 42, 27,62, 40, 32, 47, 69, 55, 25)  t r[i] <= t r[j] 5

 Kubica et al. and Kim et al. have presented solutions based on the KMP algorithm.  Both the solutions were linear.  Later, Cho et al. demonstrated that the bad character heuristic works. 6

 The BMH approach is based on the bad character rule applied to q-grams, i.e. strings of q characters.  A q-gram is treated as a single character to make shifts longer.  A large amount of text can be skipped for long patterns, and the algorithm is sublinear on the average.  First sublinear solution for order-preserving matching. 7

 At the same time, Belazzougui et al. derived an optimal algorithm which is sublinear on average.  Chhabra and Tarhio presented another sublinear average-case solution based on filtration.  Faster in practice than the previous solutions and we will refer to this solution as OPMF.  Crochemore et al. proposed an offline solution based on indexing. 8

 Two new online solutions utilizing the SIMD (single instruction, multiple data) architecture and one offline solution based on the FM-index.  The OPMF algorithm is based on computing a transformed pattern and text by creating their respective bitmaps where a 1 bit means the successive element is greater than the current one and a 0 bit means the opposite. 9

 The SIMD architecture allows the execution of multiple data on single instruction.  Intel added sixteen new 128-bit registers known as XMM0 through XMM15.  Four floating point numbers could be handled at the same time.  AVX provides support for 256-bit registers known as YMM0 through YMM15. 10

 We aimed to perform this transformation quickly with SSE4.2 (streaming SIMD extensions) and AVX (Advanced Vector Extensions) instructions.  Otherwise, approach is similar as is used in the OPMF algorithm.  The text is filtered and then verified using a checking routine. 11

 The consecutive numbers in the pattern P = p 1 p 2 …p m are compared pairwise.  This is achieved effectively by using the _mm_cmpgt_ps instruction.  Compares the packed single precision floating-point values in the source operand and the destination operand. and  Returns the results of the comparison to the destination operand. 12

 MOVMSK instruction ( mm128 movemask ps()) is used which extracts the most significant bits from the packed single-precision floating-point value.  Thus a mask is obtained.  Thereafter a shift table is constructed which is initialized to m- 1.  We apply binary 4 - grams and set the size of the shift table delta to

 The entry delta[x] is zero if x is the reverse of the last 4- gram of P 0.  The tested 4-gram is formed online with SIMD instructions in the same way as used for the pattern.  As each occurrence of P 0 in T 0 is only a match candidate, it should be verified. 14

15

 If P = (15, 18, 20, 16) and T = (2, 4, 6, 1, 5, 3)  Transformed pattern P 0 and T 0 are 110 and  The relative order of the numbers is 0,2,3,1 in the pattern and 1,2,3,0 in the text.  The potential candidates obtained from the filtration phase are traversed in accordance with the table r. 16

 t r[i] <= t r[j] 17

 Difference is that eight numbers can be compared simultaneously since it has 256 bit registers.  Therefore is fast as compared to SSE

 Also enumerates the bitmaps but they are stored in the compressed form via the FM-index.  Pattern P is transformed into a bitmap P 0 in the same way as in OPMF.  The text is also encoded and an FM-index is created of the encoded text.  Occurrences of transformed pattern P 0 are found within the compressed text. 19

 We compared our new solutions with our earlier OPMF solutions based on the SBNDM2 and SBNDM4 algorithms. 20

21

22

 Introduced two online solutions and one offline solution.  The experimental results proved that our solutions were the fastest irrespective of the data. 23

24