201,642 research outputs found

    External inverse pattern matching

    Get PDF
    We consider {\sl external inverse pattern matching} problem. Given a text \t of length nn over an ordered alphabet Σ\Sigma, such that Σ=σ|\Sigma|=\sigma, and a number mnm\le n. The entire problem is to find a pattern \pe\in \Sigma^m which is not a subword of \t and which maximizes the sum of Hamming distances between \pe and all subwords of \t of length mm. We present optimal O(nlogσ)O(n\log\sigma)-time algorithm for the external inverse pattern matching problem which substantially improves the only known polynomial O(nmlogσ)O(nm\log\sigma)-time algorithm introduced by Amir, Apostolico and Lewenstein. Moreover we discuss a fast parallel implementation of our algorithm on the CREW PRAM model

    Refactoring pattern matching

    Get PDF
    Defining functions by pattern matching over the arguments is advantageous for understanding and reasoning, but it tends to expose the implementation of a datatype. Significant effort has been invested in tackling this loss of modularity; however, decoupling patterns from concrete representations while maintaining soundness of reasoning has been a challenge. Inspired by the development of invertible programming, we propose an approach to program refactoring based on a right-invertible language rinv—every function has a right (or pre-) inverse. We show how this new design is able to permit a smooth incremental transition from programs with algebraic datatypes and pattern matching, to ones with proper encapsulation, while maintaining simple and sound reasoning

    A Model of Two-Way Selection System for Human Behavior

    Full text link
    We propose a model of two-way selection system. It appears in the processes like choosing a mate between men and women, making contracts between job hunters and recruiters, and trading between buyers and sellers. In this paper, we propose a model of two-way selection system, and present its analytic solution for the expectation of successful matching total and the regular pattern that the matching rate trends toward an inverse proportion to either the ratio between the two sides or the ratio of the state total to the smaller people number. The proposed model is verified by empirical data of the matchmaking fairs. Results indicate that the model well predicts this typical real-world two- way selection behavior to the bounded error extent, thus it is helpful for understanding the dynamics mechanism of the real-world two-way selection system.Comment: 8 pages, 4 figure

    A local global pattern matching method for subsurface stochastic inverse modeling

    Full text link
    Inverse modeling is an essential step for reliable modeling of subsurface flow and transport, which is important for groundwater resource management and aquifer remediation. Multiple-point statistics (MPS) based reservoir modeling algorithms, beyond traditional two-point statistics-based methods, offer an alternative to simulate complex geological features and patterns, conditioning to observed conductivity data. Parameter estimation, within the framework of MPS, for the characterization of conductivity fields using measured dynamic data such as piezometric head data, remains one of the most challenging tasks in geologic modeling. We propose a new local global pattern matching method to integrate dynamic data into geological models. The local pattern is composed of conductivity and head values that are sampled from joint training images comprising of geological models and the corresponding simulated piezometric heads. Subsequently, a global constraint is enforced on the simulated geologic models in order to match the measured head data. The method is sequential in time, and as new piezometric head become available, the training images are updated for the purpose of reducing the computational cost of pattern matching. As a result, the final suite of models preserve the geologic features as well as match the dynamic data. This local global pattern matching method is demonstrated for simulating a two-dimensional, bimodally-distributed heterogeneous conductivity field. The results indicate that the characterization of conductivity as well as flow and transport predictions are improved when the piezometric head data are integrated into the geological modeling. (C) 2015 Elsevier Ltd. All rights reserved.The authors gratefully acknowledge the financial support by DOE through projects DE-FE0004962 and DE-SC0001114. The last author acknowledges the support of the Spanish Ministry of Economy and Competitiveness through project CGL2011-23295. We greatly thank the three anonymous reviewers for their comments, which substantially improved the manuscript.Li ., L.; Srinivasan, S.; Zhou, H.; Gómez Hernández, JJ. (2015). A local global pattern matching method for subsurface stochastic inverse modeling. Environmental Modelling and Software. 70:55-64. https://doi.org/10.1016/j.envsoft.2015.04.008S55647

    Multi-point geostatistics for ore grade estimation

    Get PDF
    A multi-point geostatistical method for ore grade estimation is introduced in order to fully utilize existing sampling information. A block model is used to construct a new three-dimensional training image instead of a variogram. Data events and pattern matching is improved, and the directionality of the data template is considered in the matching. The inverse distance weighted method is used to make up for the lack of multi-point geostatistics. The research improves the reliability of multi-point geostatistical estimation. Optimal estimation results for Li2O and Ta2O5 come from the inverse distance weighted, ordinary Kriging, and multi-point geostatistical methods. Multi-point geostatistical estimation results are compared with those of the inverse distance weighted and ordinary Kriging methods. Deviation, trend, and variogram analyses are used to assess the effect of multipoint geostatistical estimation. This study shows that reducing the samples participating in the estimation can reduce the maximum and minimum deviation of the estimated grade to a certain extent. The grade distribution pattern is the primary factor affecting minimum and maximum deviation. This study proves the reliability and accuracy of the multi-point geostatistical method for ore grade estimation.</p

    Data-Structure Rewriting

    Full text link
    We tackle the problem of data-structure rewriting including pointer redirections. We propose two basic rewrite steps: (i) Local Redirection and Replacement steps the aim of which is redirecting specific pointers determined by means of a pattern, as well as adding new information to an existing data ; and (ii) Global Redirection steps which are aimed to redirect all pointers targeting a node towards another one. We define these two rewriting steps following the double pushout approach. We define first the category of graphs we consider and then define rewrite rules as pairs of graph homomorphisms of the form "L R". Unfortunately, inverse pushouts (complement pushouts) are not unique in our setting and pushouts do not always exist. Therefore, we define rewriting steps so that a rewrite rule can always be performed once a matching is found

    Inverse Suffix Array Queries for 2-Dimensional Pattern Matching in Near-Compact Space

    Get PDF
    corecore