EFFICIENT ALGORITHMS FOR (δ,γ,α) AND (δ, kΔ, α)-MATCHING

2008 ◽  
Vol 19 (01) ◽  
pp. 163-183 ◽  
Author(s):  
KIMMO FREDRIKSSON ◽  
SZYMON GRABOWSKI

We propose new algorithms for (δ,γ,α)-matching. In this string matching problem we are given a pattern P = p0p1 … pm−1 and a text T = t0t1 … tn−1 over some integer alphabet Σ = {0…σ − 1}. The pattern symbol pi δ-matches the text symbol tj iff |pi − tj| ≤ δ. The pattern P (δ,γ)-matches some text substring tj … tj+m−1 iff for all i it holds that |pi − tj+i| ≤ δ and Σ |pi − tj+i| ≤ γ. Finally, in (δ,γ,α)-matching we also permit at most α-symbol gaps between each matching text symbol. The only known previous algorithm runs in O(nm) time. We give several algorithms that improve the average case up to O(n) for small α, and the worst case to [Formula: see text] or O(nm log (γ)/w), where [Formula: see text] and w is the number of bits in a machine word. The proposed algorithms can be easily modified to solve several other related problems, we explicitly consider e.g. character classes (instead of δ-matching), (Δ-limited) k-mismatches (instead of γ-matching) and more general gaps, including negative ones. These find important applications in computational biology. We conclude with experimental results showing that the algorithms are very efficient in practice.

2015 ◽  
Vol 27 (2) ◽  
pp. 143-156 ◽  
Author(s):  
TANVER ATHAR ◽  
CARL BARTON ◽  
WIDMER BLAND ◽  
JIA GAO ◽  
COSTAS S. ILIOPOULOS ◽  
...  

Circular string matching is a problem which naturally arises in many contexts. It consists in finding all occurrences of the rotations of a pattern of length m in a text of length n. There exist optimal worst- and average-case algorithms for circular string matching. Here, we present a suboptimal average-case algorithm for circular string matching requiring time $\mathcal{O}$(n) and space $\mathcal{O}$(m). The importance of our contribution is underlined by the fact that the proposed algorithm can be easily adapted to deal with circular dictionary matching. In particular, we show how the circular dictionary-matching problem can be solved in average-case time $\mathcal{O}$(n + M) and space $\mathcal{O}$(M), where M is the total length of the dictionary patterns, assuming that the shortest pattern is sufficiently long. Moreover, the presented average-case algorithms and other worst-case approaches were also implemented. Experimental results, using real and synthetic data, demonstrate that the implementation of the presented algorithms can accelerate the computations by more than a factor of two compared to the corresponding implementation of other approaches.


1995 ◽  
Vol 2 (46) ◽  
Author(s):  
Dany Breslauer ◽  
Livio Colussi ◽  
Laura Toniolo

In this paper we study the exact comparison complexity of the string<br />prefix-matching problem in the deterministic sequential comparison model<br />with equality tests. We derive almost tight lower and upper bounds on<br />the number of symbol comparisons required in the worst case by on-line<br />prefix-matching algorithms for any fixed pattern and variable text. Unlike<br />previous results on the comparison complexity of string-matching and<br />prefix-matching algorithms, our bounds are almost tight for any particular pattern.<br />We also consider the special case where the pattern and the text are the<br />same string. This problem, which we call the string self-prefix problem, is<br />similar to the pattern preprocessing step of the Knuth-Morris-Pratt string-matching<br />algorithm that is used in several comparison efficient string-matching<br />and prefix-matching algorithms, including in our new algorithm.<br />We obtain roughly tight lower and upper bounds on the number of symbol<br />comparisons required in the worst case by on-line self-prefix algorithms.<br />Our algorithms can be implemented in linear time and space in the<br />standard uniform-cost random-access-machine model.


2001 ◽  
Vol 01 (04) ◽  
pp. 591-603 ◽  
Author(s):  
MUNAGA V. N. K. PRASAD ◽  
K. K. SHUKLA

This paper presents new algorithms for image compression that are an improvement on the recently published Binary Tree Triangular Coding (BTTC). These algorithms are based on recursive decomposition of the image domain into triangles where the new triangle vertex is located at the point of maximum prediction error and does not require the constraints of right-angled isosceles triangle and square image as in previous algorithm. These algorithms execute in O(n log n) for encoding and θ(n) for decoding, where n is the number of image pixels. Simulation results show that the new algorithms have a significant execution time advantage over conventional BTTC while providing a quality of the reconstructed image as good as BTTC. This improvement is obtained by eliminating a major weakness of the standard BTTC, wherein the algorithm does not utilize the point of maximum error for domain decomposition despite performing an exhaustive search (in the worst case) over the triangular domain.


Author(s):  
IBRAHIEM M. M. EL EMARY ◽  
MOHAMMED S. M. JABER

The string matching problem consists of finding one or more, generally all, exact occurrences of a pattern P in a text T. This paper presents a new algorithm for solving the string matching problem. Application of the proposed algorithm assists in improving the search process of a specific pattern in a certain unchangeable text through decreasing the number of character comparisons. Operation concept of such an algorithm depends on pattern reading to obtain the pattern length and the pattern first character and then a search is done in a table of two columns: the first column represents the word length in the text and the second one represents the start positions of each word classified by the same length. After that the algorithm just searches the words of the same length. Our experimental results depend mainly on comparing the performance of our algorithm with the well-known pattern matching algorithms such as Boyer–Moor's and Boyer–Moor–Galil's. The comparison between our algorithm and others are done in terms of the number of characters compared for different sizes of text. The output results show that our algorithm performs better than the others in terms of this parameter.


Author(s):  
Sunil Pathak

Background: The significant work has been present to identify suspects, gathering information and examining any videos from CCTV Footage. This exploration work expects to recognize suspicious exercises, i.e. object trade, passage of another individual, peeping into other's answer sheet and individual trade from the video caught by a reconnaissance camera amid examinations. This requires the procedure of face acknowledgment, hand acknowledgment and distinguishing the contact between the face and hands of a similar individual and that among various people. Methods: Segmented frames has given as input to obtain foreground image with the help of Gaussian filtering and background modeling method. Suh foreground images has given to Activity Recognition model to detect normal activity or suspicious activity. Results: Accuracy rate, Precision and Recall are calculate for activities detection, contact detection for Best Case, Average Case and Worst Case. Simulation results are compare with performance parameter such as Material Exchange, Position Exchange, and Introduction of a new person, Face and Hand Detection and Multi Person Scenario. Conclusion: In this paper, a framework is prepared for suspect detection. This framework will absolutely realize an unrest in the field of security observation in the training area.


2014 ◽  
Vol 2014 ◽  
pp. 1-11
Author(s):  
Wei Zhou ◽  
Zilong Tan ◽  
Shaowen Yao ◽  
Shipu Wang

Resource location in structured P2P system has a critical influence on the system performance. Existing analytical studies of Chord protocol have shown some potential improvements in performance. In this paper a splay tree-based new Chord structure called SChord is proposed to improve the efficiency of locating resources. We consider a novel implementation of the Chord finger table (routing table) based on the splay tree. This approach extends the Chord finger table with additional routing entries. Adaptive routing algorithm is proposed for implementation, and it can be shown that hop count is significantly minimized without introducing any other protocol overheads. We analyze the hop count of the adaptive routing algorithm, as compared to Chord variants, and demonstrate sharp upper and lower bounds for both worst-case and average case settings. In addition, we theoretically analyze the hop reducing in SChord and derive the fact that SChord can significantly reduce the routing hops as compared to Chord. Several simulations are presented to evaluate the performance of the algorithm and support our analytical findings. The simulation results show the efficiency of SChord.


Algorithmica ◽  
2021 ◽  
Author(s):  
Jie Zhang

AbstractApart from the principles and methodologies inherited from Economics and Game Theory, the studies in Algorithmic Mechanism Design typically employ the worst-case analysis and design of approximation schemes of Theoretical Computer Science. For instance, the approximation ratio, which is the canonical measure of evaluating how well an incentive-compatible mechanism approximately optimizes the objective, is defined in the worst-case sense. It compares the performance of the optimal mechanism against the performance of a truthful mechanism, for all possible inputs. In this paper, we take the average-case analysis approach, and tackle one of the primary motivating problems in Algorithmic Mechanism Design—the scheduling problem (Nisan and Ronen, in: Proceedings of the 31st annual ACM symposium on theory of computing (STOC), 1999). One version of this problem, which includes a verification component, is studied by Koutsoupias (Theory Comput Syst 54(3):375–387, 2014). It was shown that the problem has a tight approximation ratio bound of $$(n+1)/2$$ ( n + 1 ) / 2 for the single-task setting, where n is the number of machines. We show, however, when the costs of the machines to executing the task follow any independent and identical distribution, the average-case approximation ratio of the mechanism given by Koutsoupias (Theory Comput Syst 54(3):375–387, 2014) is upper bounded by a constant. This positive result asymptotically separates the average-case ratio from the worst-case ratio. It indicates that the optimal mechanism devised for a worst-case guarantee works well on average.


2017 ◽  
Vol 5 (5) ◽  
pp. 776-794
Author(s):  
Benjamin Fish ◽  
Rahul Kushwaha ◽  
György Turán

Abstract Betweenness centrality of a vertex in a graph measures the fraction of shortest paths going through the vertex. This is a basic notion for determining the importance of a vertex in a network. The $k$-betweenness centrality of a vertex is defined similarly, but only considers shortest paths of length at most $k$. The sequence of $k$-betweenness centralities for all possible values of $k$ forms the betweenness centrality profile of a vertex. We study properties of betweenness centrality profiles in trees. We show that for scale-free random trees, for fixed $k$, the expectation of $k$-betweenness centrality strictly decreases as the index of the vertex increases. We also analyse worst-case properties of profiles in terms of the distance of profiles from being monotone, and the number of times pairs of profiles can cross. This is related to whether $k$-betweenness centrality, for small values of $k$, may be used instead of having to consider all shortest paths. Bounds are given that are optimal in order of magnitude. We also present some experimental results for scale-free random trees.


Sign in / Sign up

Export Citation Format

Share Document