5 research outputs found

    A Simple Algorithm for Approximating the Text-To-Pattern Hamming Distance

    Get PDF
    The algorithmic task of computing the Hamming distance between a given pattern of length m and each location in a text of length n, both over a general alphabet Sigma, is one of the most fundamental algorithmic tasks in string algorithms. The fastest known runtime for exact computation is tilde O(nsqrt m). We recently introduced a complicated randomized algorithm for obtaining a (1 +/- eps) approximation for each location in the text in O( (n/eps) log(1/eps) log n log m log |Sigma|) total time, breaking a barrier that stood for 22 years. In this paper, we introduce an elementary and simple randomized algorithm that takes O((n/eps) log n log m) time

    Order-Preserving Pattern Matching Indeterminate Strings

    Get PDF
    Given an indeterminate string pattern p and an indeterminate string text t, the problem of order-preserving pattern matching with character uncertainties (muOPPM) is to find all substrings of t that satisfy one of the possible orderings defined by p. When the text and pattern are determinate strings, we are in the presence of the well-studied exact order-preserving pattern matching (OPPM) problem with diverse applications on time series analysis. Despite its relevance, the exact OPPM problem suffers from two major drawbacks: 1) the inability to deal with indetermination in the text, thus preventing the analysis of noisy time series; and 2) the inability to deal with indetermination in the pattern, thus imposing the strict satisfaction of the orders among all pattern positions. In this paper, we provide the first polynomial algorithms to answer the muOPPM problem when: 1) indetermination is observed on the pattern or text; and 2) indetermination is observed on both the pattern and the text and given by uncertainties between pairs of characters. First, given two strings with the same length m and O(r) uncertain characters per string position, we show that the muOPPM problem can be solved in O(mr lg r) time when one string is indeterminate and r in N^+ and in O(m^2) time when both strings are indeterminate and r=2. Second, given an indeterminate text string of length n, we show that muOPPM can be efficiently solved in polynomial time and linear space

    수치 문자열의 순서를 보존하는 매칭 기법

    Get PDF
    학위논문 (박사)-- 서울대학교 대학원 : 전기·컴퓨터공학부, 2014. 2. 박근수.String matching is a fundamental problem in computer science and has been extensively studied. Sometimes a string consists of numeric values instead of alphabet characters, and we are interested in some trends in the text rather than specific patterns. We introduce a new string matching problem called order-preserving matching on numeric strings, where a pattern matches a text substring of the same length if the relative orders in the substring coincide with those of the pattern. Order-preserving matching is applicable to many scenarios such as stock price analysis and musical melody matching. In this thesis, we define order-preserving matching in numeric strings, and present various representations of order relations and efficient algorithms of order-preserving matching with those representations. For single pattern matching, we give an O(n log m) time algorithm with the prefix representation based on the KMP algorithm, and optimize it further to obtain O(n + m log m) time with the nearest neighbor representation, where n and m are the lengths of the text and the pattern, respectively. For multiple pattern matching, we present an O((n+m) log m) time algorithm with the prefix representation based on the Aho-Corasick algorithm, where n is the text length and m is the sum of the lengths of the patterns. Our algorithms are presented in binary order relations first, and then extended to ternary order relations. With our extensions, the time complexities in binary order relations can be achieved in ternary order relations as well.Contents Abstract i Contents ii List of Figures iv List of Tables v Chapter 1 Introduction 1 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Chapter 2 Order-Preserving Pattern Matching 6 2.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.1 Definitions of Order Relations . . . . . . . . . . . . . . . . 6 2.1.2 Number of Representations . . . . . . . . . . . . . . . . . 8 2.1.3 Problem Formulation . . . . . . . . . . . . . . . . . . . . 8 2.2 O(n logm) Algorithm . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2.1 Prefix Representation . . . . . . . . . . . . . . . . . . . . 10 2.2.2 KMP Failure Function . . . . . . . . . . . . . . . . . . . . 11 ii 2.2.3 Text Search . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.4 Construction of KMP Failure Function . . . . . . . . . . . 15 2.2.5 Correctness and Time Complexity . . . . . . . . . . . . . 17 2.3 O(n + mlogm) Algorithm . . . . . . . . . . . . . . . . . . . . . . 17 2.3.1 Nearest Neighbor Representation . . . . . . . . . . . . . . 17 2.3.2 Text Search . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.3.3 Construction of KMP Failure Function . . . . . . . . . . . 21 2.3.4 Correctness and Time Complexity . . . . . . . . . . . . . 22 2.3.5 Generalized Order-Preserving Matching . . . . . . . . . . 23 2.3.6 Remark on Alphabet Size . . . . . . . . . . . . . . . . . . 23 Chapter 3 Order-Preserving Multiple Pattern Matching 25 3.1 O((n + m) logm) Algorithm . . . . . . . . . . . . . . . . . . . . . 25 3.1.1 Aho-Corasick Automaton . . . . . . . . . . . . . . . . . . 26 3.1.2 Aho-Corasick Failure Function . . . . . . . . . . . . . . . 27 3.1.3 Text Search . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.1.4 Construction of Aho-Corasick Failure Function . . . . . . 29 3.1.5 Correctness and Time Complexity . . . . . . . . . . . . . 32 Chapter 4 Extensions to Ternary Order Relations 33 4.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Extension of Prefix Representation . . . . . . . . . . . . . . . . . 34 4.3 Extension of Nearest Neighbor Representation . . . . . . . . . . . 38 4.4 Generalized Order-Preserving KMP Algorithm . . . . . . . . . . 42 Chapter 5 Conclusion 45 Bibliography 47Docto

    A multi-zone model of the CFR engine : investigating cascading autoignition and octane rating

    Get PDF
    Includes abstract.Includes bibliographical references (p. 103-109).The CFR engine is the standardised research engine used for the measurement of knock resistance of fuels through the Research Octane Number (RON) and Motor Octane Number(MON) tests. In standard production engines, knock manifests as an almost instantaneous pressure rise followed by knock ringing" pressure oscillations of similar magnitude. However, knock in the CFR engine is characterised, and measured by, a steep, but more gradual pressure rise, followed by ringing of much lesser magnitude. It has been previously proposed that a cascading autoignition", resulting from an in-cylinder temperature gradient, is responsible for this unique pressure development

    Length-based methods in fisheries research

    Get PDF
    Stock assessment, Population dynamics, Length, Size distribution, Methodology
    corecore