首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 187 毫秒
1.
Fast Algorithms for the Density Finding Problem   总被引:1,自引:0,他引:1  
We study the problem of finding a specific density subsequence of a sequence arising from the analysis of biomolecular sequences. Given a sequence A=(a 1,w 1),(a 2,w 2),…,(a n ,w n ) of n ordered pairs (a i ,w i ) of numbers a i and width w i >0 for each 1≤in, two nonnegative numbers , u with u and a number δ, the Density Finding Problem is to find the consecutive subsequence A(i *,j *) over all O(n 2) consecutive subsequences A(i,j) with width constraint satisfying w(i,j)=∑ r=i j w r u such that its density is closest to δ. The extensively studied Maximum-Density Segment Problem is a special case of the Density Finding Problem with δ=∞. We show that the Density Finding Problem has a lower bound Ω(nlog n) in the algebraic decision tree model of computation. We give an algorithm for the Density Finding Problem that runs in optimal O(nlog n) time and O(nlog n) space for the case when there is no upper bound on the width of the sequence, i.e., u=w(1,n). For the general case, we give an algorithm that runs in O(nlog 2 m) time and O(n+mlog m) space, where and w min=min  r=1 n w r . As a byproduct, we give another O(n) time and space algorithm for the Maximum-Density Segment Problem. Grants NSC95-2221-E-001-016-MY3, NSC-94-2422-H-001-0001, and NSC-95-2752-E-002-005-PAE, and by the Taiwan Information Security Center (TWISC) under the Grants NSC NSC95-2218-E-001-001, NSC95-3114-P-001-002-Y, NSC94-3114-P-001-003-Y and NSC 94-3114-P-011-001.  相似文献   

2.
《国际计算机数学杂志》2012,89(9):1863-1873
The n-dimensional locally twisted cube LTQn is a promising alternative to the hypercube because of its great properties. Not only is LTQn n-connected, but also meshes, torus, and edge-disjoint Hamiltonian cycles can embed in it. Ma and Xu [Panconnectivity of locally twisted cubes, Appl. Math. Lett. 19 (2006), pp. 681–685] investigated the panconnectivity of LTQn for flexible routing. In this paper, we combine panconnectivity with Hamiltonian connectedness to define Hamiltonian r-panconnectedness: a graph G of m vertices, m≥3, is Hamiltonian r-panconnected if for any three distinct vertices x, y, and z of G there exists a Hamiltonian path P of G such that P(1)=x, P(l+1)=y, and P(m)=z for every rlm?1?r, where P(i) denotes the ith vertex of P for 1≤im. Then, we show that LTQn is Hamiltonian n-panconnected for n≥5. This property admits the path embedding via an intermediate node at any prescribed position, and our result achieves an improvement over that of Ma and Xu.  相似文献   

3.
A vertex v of a connected graph G distinguishes a pair u, w of vertices of G if d(v, u)≠d(v, w), where d(·,·) denotes the length of a shortest path between two vertices in G. A k-partition Π={S 1, S 2, …, S k } of the vertex set of G is said to be a locatic partition if for every pair of distinct vertices v and w of G, there exists a vertex sS i for all 1≤ik that distinguishes v and w. The cardinality of a largest locatic partition is called the locatic number of G. In this paper, we study the locatic number of paths, cycles and characterize all the connected graphs of order n having locatic number n, n?1 and n?2. Some realizable results are also given in this paper.  相似文献   

4.
《国际计算机数学杂志》2012,89(8):1692-1708
Given (i) any k vertices u 1, u 2, …, u k (1≤k<n) in the n-cube Q n , where (u 1, u 2), (u 3, u 4), …, (u 2m?1, u 2m ) (m≤? k\2 ?) are edges of the same dimension, (ii) any k positive integers a 1, a 2, …, a k such that a 1, a 2, …, a 2m are odd and a 2m+1, …, a k are even, with a 1+a 2+···+a k =2 n , and (iii) k subsets W 1, W 2, …, W k of V(Q n ) with |W i |≤n?k and if a i =1, then u i ¬∈W i , for 1≤ik, we show that there exist k vertex-disjoint paths P (1), P (2), …, P (k) in Q n where P (i) contains a i vertices, its origin is u i , and its terminus is in V(Q n )/ W i , for 1≤ik. We also prove a similar result which extends two well-known results of Havel, [I. Havel On hamilton circuits and spanning trees of hypercubes, ?asopis pro P?stování Matematiky, 109 (1984), pp. 135–152.] and Nebeský, [L. Nebeský Embedding m-quasistars into n-cubes, Czech. Math. J. 38 (1988), pp. 705–712].  相似文献   

5.
An optimal piecewise linear continuous fit to a given set of n data points D = {(xi, yi) : 1 ≤ in} in two dimensions consists of a continuous curve defined by k linear segments {L1, L2,…,Lk} which minimizes a weighted least squares error function with weight wi at (xi, yi), where k ≥ 1 is a given integer. A key difficulty here is the fact that the linear segment Lj, which approximates a subset of consecutive data points DjD in an optimal solution, is not necessarily an optimal fit in itself for the points Dj. We solve the problem for the special case k = 2 by showing that an optimal solution essentially consists of two least squares linear regression lines in which the weight wj of some data point (xj, yj) is split into the weights λwj and (1 − λ)wj, 0 ≤ λ ≤ 1, for computations of these lines. This gives an algorithm of worst-case complexity O(n) for finding an optimal solution for the case k = 2.  相似文献   

6.
The generalized windows scheduling problem for n jobs on multiple machines is defined as follows: Given is a sequence, I=〈(w 1, 1),(w 2, 2),…,(w n , n )〉 of n pairs of positive integers that are associated with the jobs 1,2,…,n, respectively. The processing length of job i is i slots where a slot is the processing time of one unit of length. The goal is to repeatedly and non-preemptively schedule all the jobs on the fewest possible machines such that the gap (window) between two consecutive beginnings of executions of job i is at most w i slots. This problem arises in push broadcast systems in which data are transmitted on multiple channels. The problem is NP-hard even for unit-length jobs and a (1+ε)-approximation algorithm is known for this case by approximating the natural lower bound W(I)=?i=1n(1/wi)W(I)=\sum_{i=1}^{n}(1/w_{i}). The techniques used for approximating unit-length jobs cannot be extended for arbitrary-length jobs mainly because the optimal number of machines might be arbitrarily larger than the generalized lower bound W(I)=?i=1n(li/wi)W(I)=\sum_{i=1}^{n}(\ell_{i}/w_{i}). The main result of this paper is an 8-approximation algorithm for the WS problem with arbitrary lengths using new methods, different from those used for the unit-length case. The paper also presents another algorithm that uses 2(1+ε)W(I)+logw max machines and a greedy algorithm that is based on a new tree representation of schedules. The greedy algorithm is optimal for some special cases, and computational experiments show that it performs very well in practice.  相似文献   

7.
This paper introduces a general decomposition scheme for single stage scheduling problems with jobs that have arbitrary release dates. We assume that the objective function is monotone in the completion time of each job. The decomposition scheme has significant theoretical and practical relevance. When assuming equal processing times, we can reduce the number of steps required to solve several well-known nonpreemptive single machine scheduling problems by O(n3)\mathcal{O}(n^{3}), provided the processing time p is constant. Specifically, we develop new approaches that solve the problems 1|r i ,p i =p|∑f i (C i ) and 1|r i ,p i =p|∑w i U i in O(n4)\mathcal{O}(n^{4}) time; the algorithms that have been described in the literature for these problems operate in O(n7)\mathcal{O}(n^{7}). Moreover, solution approaches for NP\mathcal{NP}-hard problems with unequal processing times may also benefit from our decomposition rule. This is particularly true if p max/p min is close to 1. Using the decomposition rule, either the problem size is reduced or additional information about the maximal schedule length is obtained.  相似文献   

8.
9.
Dynamic Hotlinks     
Consider a directed rooted tree T=(V,E) representing a collection V of n web pages connected via a set E of links all reachable from a source home page, represented by the root of T. Each web page i carries a weight w i representative of the frequency with which it is visited. By adding hotlinks, shortcuts from a node to one of its descendants, we are interested in minimizing the expected number of steps needed to visit pages from the home page. We give the first linear time algorithm for assigning hotlinks so that the number of steps to access a page i from the root of the tree reaches the entropy bound, i.e. is at most O(log (W/w i )) where W=∑ iT w i . The best previously known algorithm for this task runs in time O(n 2). We also give the first efficient data structure for maintaining hotlinks when nodes are added, deleted or their weights modified, in amortized time O(log (W/w i )) per update. The data structure can be made adaptive, i.e. reaches the entropy bound in the amortized sense without knowing the weights w i in advance.  相似文献   

10.
Given an alphabet Σ={1,2,…,|Σ|} text string T∈Σ n and a pattern string P∈Σ m , for each i=1,2,…,nm+1 define L p (i) as the p-norm distance when the pattern is aligned below the text and starts at position i of the text. The problem of pattern matching with L p distance is to compute L p (i) for every i=1,2,…,nm+1. We discuss the problem for d=1,2,∞. First, in the case of L 1 matching (pattern matching with an L 1 distance) we show a reduction of the string matching with mismatches problem to the L 1 matching problem and we present an algorithm that approximates the L 1 matching up to a factor of 1+ε, which has an O(\frac1e2nlogmlog|S|)O(\frac{1}{\varepsilon^{2}}n\log m\log|\Sigma|) run time. Then, the L 2 matching problem (pattern matching with an L 2 distance) is solved with a simple O(nlog m) time algorithm. Finally, we provide an algorithm that approximates the L matching up to a factor of 1+ε with a run time of O(\frac1enlogmlog|S|)O(\frac{1}{\varepsilon}n\log m\log|\Sigma|) . We also generalize the problem of String Matching with mismatches to have weighted mismatches and present an O(nlog 4 m) algorithm that approximates the results of this problem up to a factor of O(log m) in the case that the weight function is a metric.  相似文献   

11.
12.
The authors consider the mth-order neutral difference equation Dm(y(n) + p(n)y(nk) + q(n)f(y(σ(n))) = e(n), where m ≥ 1, {p(n)}, {q(n)}, {e(n)}, and {a1(n)}, {a2(n)}, …, {am−1(n)} are real sequences, ai(n) > 0 for i = 1,2,…, m−1, am(n) ≡ 1, D0z(n) = y(n)+p(n)y(nk), Diz(n) = ai(n)ΔDi−1z(n) for i = 1,2, …, m, k is a positive integer, {σ(n)} → ∞ is a sequence of positive integers, and RR is continuous with u f(u) > 0 for u ≠ 0. In the case where {q(n)} is allowed to oscillate, they obtain sufficient conditions for all bounded nonoscillatory solutions to converge to zero, and if {q(n)} is a nonnegative sequence, they establish sufficient conditions for all nonoscillatory solutions to converge to zero. Examples illustrating the results are included throughout the paper.  相似文献   

13.
14.
Given a polygonal curve P =[p1, p2, . . . , pn], the polygonal approximation problem considered calls for determining a new curve P′ = [p1, p2, . . . , pm] such that (i) m is significantly smaller than n, (ii) the vertices of P′ are an ordered subset of the vertices of P, and (iii) any line segment [pA, pA + 1 of P′ that substitutes a chain [pB, . . . , pC] in P is such that for all i where BiC, the approximation error of pi with respect to [pA, pA + 1], according to some specified criterion and metric, is less than a predetermined error tolerance. Using the parallel-strip error criterion, we study the following problems for a curve P in Rd, where d = 2, 3: (i) minimize m for a given error tolerance and (ii) given m, find the curve P′ that has the minimum approximation error over all curves that have at most m vertices. These problems are called the min-# and min-ϵ problems, respectively. For R2 and with any one of the L1, L2, or L distance metrics, we give algorithms to solve the min-# problem in O(n2) time and the min-ϵ problem in O(n2 log n) time, improving the best known algorithms to date by a factor of log n. When P is a polygonal curve in R3 that is strictly monotone with respect to one of the three axes, we show that if the L1 and L metrics are used then the min-# problem can be solved in O(n2) time and the min-ϵ problem can be solved in O(n3) time. If distances are computed using the L2 metric then the min-# and min-ϵ problems can be solved in O(n3) and O(n3 log n) time, respectively. All of our algorithms exhibit O(n2) space complexity. Finally, we show that if it is not essential to minimize m, simple modifications of our algorithms afford a reduction by a factor of n for both time and space.  相似文献   

15.
In its simplest form, the longest common substring problem is to find a longest substring common to two or multiple strings. Using (generalized) suffix trees, this problem can be solved in linear time and space. A first generalization is the k -common substring problem: Given m strings of total length n, for all k with 2≤km simultaneously find a longest substring common to at least k of the strings. It is known that the k-common substring problem can also be solved in O(n) time (Hui in Proc. 3rd Annual Symposium on Combinatorial Pattern Matching, volume 644 of Lecture Notes in Computer Science, pp. 230–243, Springer, Berlin, 1992). A further generalization is the k -common repeated substring problem: Given m strings T (1),T (2),…,T (m) of total length n and m positive integers x 1,…,x m , for all k with 1≤km simultaneously find a longest string ω for which there are at least k strings \(T^{(i_{1})},T^{(i_{2})},\ldots,T^{(i_{k})}\) (1≤i 1<i 2<???<i k m) such that ω occurs at least \(x_{i_{j}}\) times in \(T^{(i_{j})}\) for each j with 1≤jk. (For x 1=???=x m =1, we have the k-common substring problem.) In this paper, we present the first O(n) time algorithm for the k-common repeated substring problem. Our solution is based on a new linear time algorithm for the k-common substring problem.  相似文献   

16.
Let f(xθ) = αθαx−(α+1)I(x>θ) be the pdf of a Pareto distribution with known shape parameter α>0, and unknown scale parameter θ. Let {(Xi, θi)} be a sequence of independent random pairs, where Xi's are independent with pdf f(xαi), and θi are iid according to an unknown distribution G in a class of distributions whose supports are included in an interval (0, m), where m is a positive finite number. Under some assumption on the class and squared error loss, at (n + 1)th stage we construct a sequence of empirical Bayes estimators of θn+1 based on the past n independent observations X1,…, Xn and the present observation Xn+1. This empirical Bayes estimator is shown to be asymptotically optimal with rate of convergence O(n−1/2). It is also exhibited that this convergence rate cannot be improved beyond n−1/2 for the priors in class .  相似文献   

17.
The recurrencex o =a o x i =a i+b i x i–1,i = 1, 2,...,n–1 requiresO(n) operations on a sequential computer. Elegant parallel solutions exist, however, that reduce the complexity toO(logN) usingNn processors. This paper discusses one such solution, designed for a tree-structured network of processors.A tree structure is ideal for solving recurrences. It takes exactly one sweep up and down the tree to solve any of several classes of recurrences, thus guaranteeing a solution inO(logN) time for a tree withNn leaf nodes. Ifn exceedsN, the algorithm efficiently pipelines the operation and solves the recurrence inO(n/N + logN) time.  相似文献   

18.
A chained-matrices approach for parallel computing thenth convergent of continued fractions is presented. The resulting algorithm computes the entire prefix values of any continued fraction inO(logn) time on the EREW PRAM model or a network withO(n/logn) processors connected by the cube-connectedcycles, binary tree, perfect shuffle, or hypercube. It can be applied to approximate the transcendental numbers, such as ande, inO(logm) time by usingO(m/logm) processors for a result withm-digit precision. We also use it to costoptimally solve the second-order linear recurrence, the polynomial evaluation, the recurrence of vector norm, the general class of recurrence equation defined by Kogge and Stone (1973), and the generalmth order linear recurrence. It is easy to implement because there are only some matrix multiplications and a division operation involved.This work was supported in part by National Science Council of the Republic of China under Contract NSC 77-0408-E002-09.  相似文献   

19.
We present a nearly-linear time algorithm for counting and randomly generating simple graphs with a given degree sequence in a certain range. For degree sequence (d i ) i=1 n with maximum degree d max?=O(m 1/4?τ ), our algorithm generates almost uniform random graphs with that degree sequence in time O(md max?) where $m=\frac{1}{2}\sum_{i}d_{i}We present a nearly-linear time algorithm for counting and randomly generating simple graphs with a given degree sequence in a certain range. For degree sequence (d i ) i=1 n with maximum degree d max =O(m 1/4−τ ), our algorithm generates almost uniform random graphs with that degree sequence in time O(md max ) where m=\frac12?idim=\frac{1}{2}\sum_{i}d_{i} is the number of edges in the graph and τ is any positive constant. The fastest known algorithm for uniform generation of these graphs (McKay and Wormald in J. Algorithms 11(1):52–67, 1990) has a running time of O(m 2 d max 2). Our method also gives an independent proof of McKay’s estimate (McKay in Ars Combinatoria A 19:15–25, 1985) for the number of such graphs.  相似文献   

20.
《国际计算机数学杂志》2012,89(10):2212-2225
A Hamiltonian cycle C=? u 1, u 2, …, u n(G), u 1 ? with n(G)=number of vertices of G, is a cycle C(u 1; G), where u 1 is the beginning and ending vertex and u i is the ith vertex in C and u i u j for any ij, 1≤i, jn(G). A set of Hamiltonian cycles {C 1, C 2, …, C k } of G is mutually independent if any two different Hamiltonian cycles are independent. For a hamiltonian graph G, the mutually independent Hamiltonianicity number of G, denoted by h(G), is the maximum integer k such that for any vertex u of G there exist k-mutually independent Hamiltonian cycles of G starting at u. In this paper, we prove that h(B n )=n?1 if n≥4, where B n is the n-dimensional bubble-sort graph.  相似文献   

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

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