首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 73 毫秒
1.
Related problems of scaled matching and indexing, which aim to determine all positions in a text T that a pattern P occurs in its scaled form, are considered important because of their applications to computer vision. However, previous results only focus on enlarged patterns, and do not allow shrunk patterns since they may disappear. In this paper, we give the definition and an efficient indexing algorithm for proportionally-scaled patterns that can be visually enlarged or shrunk. The proposed indexing algorithm takes O(|T|) time in its preprocessing phase, and achieves time in its answering phase, where |T|, |P|, Up, and m denote the length of T, the length of P, the number of reported positions, and the length of T under run-length representation, respectively.  相似文献   

2.
In this paper, we solve the two-fixed-endpoint Hamiltonian path problem on distance-hereditary graphs efficiently in parallel. Let Td(|V|,|E|) and Pd(|V|,|E|) denote the parallel time and processor complexities, respectively, required to construct a decomposition tree of a distance-hereditary graph G=(V,E) on a PRAM model Md. We show that this problem can be solved in O(Td(|V|,|E|)+log|V|) time using O(Pd(|V|,|E|)+(|V|+|E|)/log|V|) processors on Md. Moreover, if G is represented by its decomposition tree form, the problem can be solved optimally in O(log|V|) time using O((|V|+|E|)/log|V|) processors on an EREW PRAM. We also obtain a linear-time algorithm which is faster than the previous known O(|V|3) sequential algorithm.  相似文献   

3.
Repeated computation of associative functions is central to many asynchronous distributed algorithms reported in the literature. We present efficient distributed algorithms for computing associative functions in spite of undetectable link failures in non-partitioned distributed systems. Two distributed; algorithms are presented for function computation assuming that the distributed system is preprocessed by a one-time preprocessing step that uses O(|E| |V|) messages (where |E| and |V| are the number of links and the number of nodes of the system, respectively). The first algorithm tolerates single link failures using O(|V| log |V|) messages and the second algorithm, which is an extension of the first algorithm, copes with the simultaneous failure of k links using O(k|E| log |V|) messages. Efficient computation of associative functions in the presence of multiple link failures has been an open problem, and our work solves this open problem.  相似文献   

4.
Short PCPPs verifiable in polylogarithmic time with O(1) queries   总被引:1,自引:0,他引:1  
In this paper we show for every pair language $L\subseteq \{0,1\}^*\times\{0,1\}^*$ in ${\ensuremath{\mathsf{NTIME}}}(T)$ for some non-decreasing function $T:{{\mathbb Z}}^+\rightarrow {{\mathbb Z}}^+$ there is a ${\ensuremath{\mathsf{PCPP}}}$ -verifier such that the following holds. In time poly (|x|,log|y|,logT(|x|?+?|y|)) it decides the membership of a purported word (x,y) by reading the explicit input x entirely and querying the implicit input y and the auxiliary proof of length T(|x|?+?|y|)·poly log T(|x|?+?|y|) in a constant number of positions.  相似文献   

5.
A tandem repeat (or square) is a string αα, where α is a non-empty string. We present an O(|S|)-time algorithm that operates on the suffix tree T(S) for a string S, finding and marking the endpoint in T(S) of every tandem repeat that occurs in S. This decorated suffix tree implicitly represents all occurrences of tandem repeats in S, and can be used to efficiently solve many questions concerning tandem repeats and tandem arrays in S. This improves and generalizes several prior efforts to efficiently capture large subsets of tandem repeats.  相似文献   

6.
This paper revisits the problem of indexing a text for approximate string matching. Specifically, given a text T of length n and a positive integer k, we want to construct an index of T such that for any input pattern P, we can find all its k-error matches in T efficiently. This problem is well-studied in the internal-memory setting. Here, we extend some of these recent results to external-memory solutions, which are also cache-oblivious. Our first index occupies O((nlogkn)/B) disk pages and finds all k-error matches with O((|P|+occ)/B+logknloglogBn) I/Os, where B denotes the number of words in a disk page. To the best of our knowledge, this index is the first external-memory data structure that does not require Ω(|P|+occ+poly(logn)) I/Os. The second index reduces the space to O((nlogn)/B) disk pages, and the I/O complexity is O((|P|+occ)/B+logk(k+1)nloglogn).  相似文献   

7.
We consider the XPath evaluation problem: Evaluate an XPath query Q on a streaming XML document D; i.e., determine the set Q(D) of document elements selected by Q. We mainly consider Conjunctive XPath queries that involve only the child and descendant axes. Previously known in-memory algorithms for this problem use O(|D|) space and O(|Q||D|) time. Several previously known algorithms for the streaming version use Ω(dn) space and Ω(dn|D|) time in the worst case; d denotes the depth of D, and n denotes the number of location steps in Q. Their exponential space requirement could well exceed the O(|D|) space used by the in-memory algorithms. We present an efficient algorithm that uses O(d|Q|+nc) space and O((|Q|+dn)|D|) time in the worst case; c denotes the maximum number of elements of D that can be candidates for output, at any one instant. For some worst case Q and D, the memory space used by our algorithm matches our lower bound proved in a different paper; so, our algorithm uses optimal memory space in the worst case.  相似文献   

8.
Bang Ye Wu 《Algorithmica》2013,65(2):467-479
Given an undirected graph G=(V,E) with positive edge lengths and two vertices s and t, the next-to-shortest path problem is to find an st-path which length is minimum amongst all st-paths strictly longer than the shortest path length. In this paper we show that the problem can be solved in linear time if the distances from s and t to all other vertices are given. Particularly our new algorithm runs in O(|V|log|V|+|E|) time for general graphs, which improves the previous result of O(|V|2) time and takes only linear time for unweighted graphs, planar graphs, and graphs with positive integer edge lengths.  相似文献   

9.
In this paper, we revisit the Property Matching problem studied by Amir et al. [Property Matching and Weighted Matching, CPM 2006] and present a better indexing scheme for the problem. In particular, the data structure by Amir et al., namely PST, requires O(nlog|Σ|+nloglogn) construction time and O(mlog|Σ|+K) query time, where n and m are the length of, respectively, the text and the pattern, Σ is the alphabet and K is the output size. On the other hand, the construction time of our data structure, namely IDS_PIP, is dominated by the suffix tree construction time and hence is O(n) time for alphabets that are natural numbers from 1 to a polynomial in n and O(nlogσ) time otherwise, where σ=min(n,|Σ|). The query time is same as that of PST. Also, IDS_PIP has the advantage that it can be built on either a suffix tree or a suffix array and additionally, it retains the capability of answering normal pattern matching queries.  相似文献   

10.
M. C. Golumbic 《Computing》1977,18(3):199-208
Using the notion ofG-decomposition introduced in Golumbic [8, 9], we present an implementation of an algorithm which assigns a transitive orientation to a comparability graph inO(δ·|E|) time andO(|E|) space where δ is the maximum degree of a vertex and |E| is the number of edges. A quotient operation reducing the graph in question and preservingG-decomposition and transitive orientability is shown, and efficient solutions to a number ofNP-complete problems which reduce to polynomial time for comparability graphs are discussed.  相似文献   

11.
We present a new simple algorithm that constructs an Aho Corasick automaton for a set of patterns, P, of total length n, in O(n) time and space for integer alphabets. Processing a text of size m over an alphabet Σ with the automaton costs O(mlog|Σ|+k), where there are k occurrences of patterns in the text.A new, efficient implementation of nodes in the Aho Corasick automaton is introduced, which works for suffix trees as well.  相似文献   

12.
Approximate string matching is about finding a given string pattern in a text by allowing some degree of errors. In this paper we present a space efficient data structure to solve the 1-mismatch and 1-difference problems. Given a text T of length n over an alphabet A, we can preprocess T and give an -bit space data structure so that, for any query pattern P of length m, we can find all 1-mismatch (or 1-difference) occurrences of P in O(|A|mlog log n+occ) time, where occ is the number of occurrences. This is the fastest known query time given that the space of the data structure is o(nlog 2 n) bits. The space of our data structure can be further reduced to O(nlog |A|) with the query time increasing by a factor of log  ε n, for 0<ε≤1. Furthermore, our solution can be generalized to solve the k-mismatch (and the k-difference) problem in O(|A| k m k (k+log log n)+occ) and O(log  ε n(|A| k m k (k+log log n)+occ)) time using an -bit and an O(nlog |A|)-bit indexing data structures, respectively. We assume that the alphabet size |A| is bounded by for the -bit space data structure.  相似文献   

13.
14.
15.
A bipartite graph G=(U,W,E) with vertex set V=UW is convex if there exists an ordering of the vertices of W such that for each uU, the neighbors of u are consecutive in W. A compact representation of a convex bipartite graph for specifying such an ordering can be computed in O(|V|+|E|) time. The paired-domination problem on bipartite graphs has been shown to be NP-complete. The complexity of the paired-domination problem on convex bipartite graphs has remained unknown. In this paper, we present an O(|V|) time algorithm to solve the paired-domination problem on convex bipartite graphs given a compact representation. As a byproduct, we show that our algorithm can be directly applied to solve the total domination problem on convex bipartite graphs in the same time bound.  相似文献   

16.
We study the problem of listing all closed sets of a closure operator σ that is a partial function on the power set of some finite ground set E, i.e., σ:FF with FP(E). A very simple divide-and-conquer algorithm is analyzed that correctly solves this problem if and only if the domain of the closure operator is a strongly accessible set system. Strong accessibility is a strict relaxation of greedoids as well as of independence systems. This algorithm turns out to have delay O(|E|(TF+Tσ+|E|)) and space O(|E|+SF+Sσ), where TF, SF, Tσ, and Sσ are the time and space complexities of checking membership in F and computing σ, respectively. In contrast, we show that the problem becomes intractable for accessible set systems. We relate our results to the data mining problem of listing all support-closed patterns of a dataset and show that there is a corresponding closure operator for all datasets if and only if the set system satisfies a certain confluence property.  相似文献   

17.
Two flow network simplification algorithms   总被引:1,自引:0,他引:1  
Flow network simplification can reduce the size of the flow network and hence the amount of computation performed by flow algorithms. We present the first linear time algorithm for the undirected network case. We also give an O(|E|∗(|V|+|E|)) time algorithm for the directed case, an improvement over the previous best O(|V|+2|E|log|V|) time solution. Both of our algorithms are quite simple.  相似文献   

18.
Adleman and Manders (Proc. 17th IEEE Symposium on Foundations of Computer Science, 1976) obtained a near characterization of NP using Diophantine predicates with quantifier bounds. We characterize NP as the class of sets definable by a polynomial predicate preceded by a string of quantifiers where each universal variable has a bound of the form p(|n|) and each existential variable has a bound of the form 2q(|n|) for input n and polynomials p and q.  相似文献   

19.
String matching is the problem of finding all the occurrences of a pattern P in a text T, where P and T are strings over a finite alphabet Σ. A variable length don′t care is a special character, not belonging to Σ, which can match any string in Σ*. The string-matching problem with variable length don′t cares is an extension of the classical string-matching problem in which the pattern P may contain an arbitrary number of don′t cares. An efficient parallel algorithm is given for solving the string-matching problem with variable length don′t cares. The EREW PRAM model of parallel computer with scan operations is used to obtain an O(log n) running time using O(mn/log n) processors, where m and n are, respectively, the lengths of P and T. The proposed parallel algorithm has an Ω(1/log n) processor utilization, since the fastest serial algorithm known so far has an O(mn/log n) running time.  相似文献   

20.
A string-based negative selection algorithm is an immune-inspired classifier that infers a partitioning of a string space Σ? into “normal” and “anomalous” partitions from a training set S containing only samples from the “normal” partition. The algorithm generates a set of patterns, called “detectors”, to cover regions of the string space containing none of the training samples. Strings that match at least one of these detectors are then classified as “anomalous”. A major problem with existing implementations of this approach is that the detector generating step needs exponential time in the worst case. Here we show that for the two most widely used kinds of detectors, the r-chunk and r-contiguous detectors based on partial matching to substrings of length r, negative selection can be implemented more efficiently by avoiding generating detectors altogether: for each detector type, training set SΣ? and parameter r? one can construct an automaton whose acceptance behaviour is equivalent to the algorithm’s classification outcome. The resulting runtime is O(|S|?r|Σ|) for constructing the automaton in the training phase and O(?) for classifying a string.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号