首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Let a text string T of n symbols and a pattern string P of m symbols from alphabet Σ be given. A swapped version T′ of T is a length n string derived from T by a series of local swaps (i.e., t ← tℓ + 1 and tℓ + 1 ← t), where each element can participate in no more than one swap. The pattern matching with swaps problem is that of finding all locations i for which there exists a swapped version T′ of T with an exact matching of P in location i of T′. It has been an open problem whether swapped matching can be done in less than O(nm) time. In this paper we show the first algorithm that solves the pattern matching with swaps problem in time o(nm). We present an algorithm whose time complexity is O(nm1/3 log m log σ) for a general alphabet Σ, where σ = min(m,Σ).  相似文献   

2.
Given a set of strings U={T1,T2,…,T}, the longest common repeat problem is to find the longest common substring that appears at least twice in each string of U. We also consider reversed and reverse-complemented repeats as well as normal repeats. We present a linear time algorithm for the longest common repeat problem.  相似文献   

3.
The previous paper in this series introduced a class of infinite binary strings, called two-pattern strings, that constitute a significant generalization of, and include, the much-studied Sturmian strings. The class of two-pattern strings is a union of a sequence of increasing (with respect to inclusion) subclasses Tλ of two-pattern strings of scope λ, λ=1,2,…. Prefixes of two-pattern strings are interesting from the algorithmic point of view (their recognition, generation, and computation of repetitions and near-repetitions) and since they include prefixes of the Fibonacci and the Sturmian strings, they merit investigation of how many finite two-pattern strings of a given size there are among all binary strings of the same length. In this paper we first consider the frequency fλ(n) of occurrence of two-pattern strings of length n and scope λ among all strings of length n on {a,b}: we show that limn→∞fλ(n)=0, but that for strings of lengths n2λ, two-pattern strings of scope λ constitute more than one-quarter of all strings. Since the class of Sturmian strings is a subset of two-pattern strings of scope 1, it was natural to focus the study of the substring complexity of two-pattern strings to those of scope 1. Though preserving the aperiodicity of the Sturmian strings, the generalization to two-pattern strings greatly relaxes the constrained substring complexity (the number of distinct substrings of the same length) of the Sturmian strings. We derive upper and lower bounds on C1(k) (the number of distinct substring of length k) of two-pattern strings of scope 1, and we show that it can be considerably greater than that of a Sturmian string. In fact, we describe circumstances in which limk→∞(C1(k)−k)=∞.  相似文献   

4.
Character sets of strings   总被引:2,自引:1,他引:1  
Given a string S over a finite alphabet Σ, the character set (also called the fingerprint) of a substring S of S is the subset CΣ of the symbols occurring in S. The study of the character sets of all the substrings of a given string (or a given collection of strings) appears in several domains such as rule induction for natural language processing or comparative genomics. Several computational problems concerning the character sets of a string arise from these applications, especially:
(1) Output all the maximal locations of substrings having a given character set.
(2) Output for each character set C occurring in a given string (or a given collection of strings) all the maximal locations of C.
Denoting by n the total length of the considered string or collection of strings, we solve the first problem in Θ(n) time using Θ(n) space. We present two algorithms solving the second problem. The first one runs in Θ(n2) time using Θ(n) space. The second algorithm has Θ(n|Σ|log|Σ|) time and Θ(n) space complexity and is an adaptation of an algorithm by Amir et al. [A. Amir, A. Apostolico, G.M. Landau, G. Satta, Efficient text fingerprinting via Parikh mapping, J. Discrete Algorithms 26 (2003) 1–13].  相似文献   

5.
In this paper, which is a continuation of Timofte (J. Approx. Theory 119 (2002) 291–299, we give special uniform approximations of functions from CXY(T×S) and C(T×S,XY) by elements of the tensor products CX(T)CY(S), respectively C0(T,X)C0(S,Y), for topological spaces T,S and Γ-locally convex spaces X,Y (all four being Hausdorff).  相似文献   

6.
Treated in this paper is the problem of estimating with squared error loss the generalized variance | Σ | from a Wishart random matrix S: p × p Wp(n, Σ) and an independent normal random matrix X: p × k N(ξ, Σ Ik) with ξ(p × k) unknown. Denote the columns of X by X(1) ,…, X(k) and set ψ(0)(S, X) = {(np + 2)!/(n + 2)!} | S |, ψ(i)(X, X) = min[ψ(i−1)(S, X), {(np + i + 2)!/(n + i + 2)!} | S + X(1) X(1) + + X(i) X(i) |] and Ψ(i)(S, X) = min[ψ(0)(S, X), {(np + i + 2)!/(n + i + 2)!}| S + X(1) X(1) + + X(i) X(i) |], i = 1,…,k. Our result is that the minimax, best affine equivariant estimator ψ(0)(S, X) is dominated by each of Ψ(i)(S, X), i = 1,…,k and for every i, ψ(i)(S, X) is better than ψ(i−1)(S, X). In particular, ψ(k)(S, X) = min[{(np + 2)!/(n + 2)!} | S |, {(np + 2)!/(n + 2)!} | S + X(1)X(1)|,…,| {(np + k + 2)!/(n + k + 2)!} | S + X(1)X(1) + + X(k)X(k)|] dominates all other ψ's. It is obtained by considering a multivariate extension of Stein's result (Ann. Inst. Statist. Math. 16, 155–160 (1964)) on the estimation of the normal variance.  相似文献   

7.
Bivariate Tensor-Product B-Splines in a Partly Linear Model   总被引:1,自引:0,他引:1  
In some applications, the mean or median response is linearly related to some variables but the relation to additional variables are not easily parameterized. Partly linear models arise naturally in such circumstances. Suppose that a random sample {(TiXiYi),i=1, 2, …, n} is modeled byYi=XTiβ0+g0(Ti)+errori, whereYiis a real-valued response,XiRpandTiranges over a unit square, andg0is an unknown function with a certain degree of smoothness. We make use of bivariate tensor-product B-splines as an approximation of the functiong0and consider M-type regression splines by minimization of ∑ni=1 ρ(YiXTiβgn(Ti)) for some convex functionρ. Mean, median and quantile regressions are included in this class. We show under appropriate conditions that the parameter estimate ofβachieves its information bound asymptotically and the function estimate ofg0attains the optimal rate of convergence in mean squared error. Our asymptotic results generalize directly to higher dimensions (for the variableT) provided that the functiong0is sufficiently smooth. Such smoothness conditions have often been assumed in the literature, but they impose practical limitations for the application of multivariate tensor product splines in function estimation. We also discuss the implementation of B-spline approximations based on commonly used knot selection criteria together with a simulation study of both mean and median regressions of partly linear models.  相似文献   

8.
For a string A=a1an, a reversalρ(i,j), 1?i?j?n, transforms the string A into a string A=a1ai-1ajaj-1aiaj+1an, that is, the reversal ρ(i,j) reverses the order of symbols in the substring aiaj of A. In the case of signed strings, where each symbol is given a sign + or -, the reversal operation also flips the sign of each symbol in the reversed substring. Given two strings, A and B, signed or unsigned, sorting by reversals (SBR) is the problem of finding the minimum number of reversals that transform the string A into the string B.Traditionally, the problem was studied for permutations, that is, for strings in which every symbol appears exactly once. We consider a generalization of the problem, k-SBR, and allow each symbol to appear at most k times in each string, for some k?1. The main result of the paper is an O(k2)-approximation algorithm running in time O(n). For instances with , this is the best known approximation algorithm for k-SBR and, moreover, it is faster than the previous best approximation algorithm.  相似文献   

9.
Let (X, Y) be an d × -valued random vector and let (X1, Y1),…,(XN, YN) be a random sample drawn from its distribution. Divide the data sequence into disjoint blocks of length l1, …, ln, find the nearest neighbor to X in each block and call the corresponding couple (Xi*, Yi*). It is shown that the estimate mn(X) = Σi = 1n wniYi*i = 1n wni of m(X) = E{Y|X} satisfies E{|mn(X) − m(X)|p} 0 (p ≥ 1) whenever E{|Y|p} < ∞, ln ∞, and the triangular array of positive weights {wni} satisfies supinwnii = 1n wni 0. No other restrictions are put on the distribution of (X, Y). Also, some distribution-free results for the strong convergence of E{|mn(X) − m(X)|p|X1, Y1,…, XN, YN} to zero are included. Finally, an application to the discrimination problem is considered, and a discrimination rule is exhibited and shown to be strongly Bayes risk consistent for all distributions.  相似文献   

10.
In the case where a 2π-periodic function f is twice continuously differentiable on the real axis ℝ and changes its monotonicity at different fixed points y i ∈ [− π, π), i = 1,…, 2s, s ∈ ℕ (i.e., on ℝ, there exists a set Y := {y i } i∈ℤ of points y i = y i+2s + 2π such that the function f does not decrease on [y i , y i−1] if i is odd and does not increase if i is even), for any natural k and n, nN(Y, k) = const, we construct a trigonometric polynomial T n of order ≤n that changes its monotonicity at the same points y i Y as f and is such that
*20c || f - Tn || £ \fracc( k,s )n2\upomega k( f",1 \mathord\vphantom 1 n n ) ( || f - Tn || £ \fracc( r + k,s )nr\upomega k( f(r),1 \mathord/ \vphantom 1 n n ),    f ? C(r),    r 3 2 ), \begin{array}{*{20}{c}} {\left\| {f - {T_n}} \right\| \leq \frac{{c\left( {k,s} \right)}}{{{n^2}}}{{{\upomega }}_k}\left( {f',{1 \mathord{\left/{\vphantom {1 n}} \right.} n}} \right)} \\ {\left( {\left\| {f - {T_n}} \right\| \leq \frac{{c\left( {r + k,s} \right)}}{{{n^r}}}{{{\upomega }}_k}\left( {{f^{(r)}},{1 \mathord{\left/{\vphantom {1 n}} \right.} n}} \right),\quad f \in {C^{(r)}},\quad r \geq 2} \right),} \\ \end{array}  相似文献   

11.
Let (X t , tZ) be a stationary process, and let S n = ∑1⩽ in X i . In this paper, we consider the central limit theorem for the self-normalized sequence S n /U n , where U n 2 = ∑1⩽jN Y j 2 , Y j = ∑(j−1)m<ijm X i , n = mN. We show how such a self-normalization works for AR(1) and MA(q) processes.__________Published in Lietuvos Matematikos Rinkinys, Vol. 45, No. 2, pp. 173–183, April–June, 2005.  相似文献   

12.
We consider asymptotic expansions for sums Sn on the form Sn = ƒ0(X0) + ƒ(X1, X0) + … + ƒ(Xn, Xn−1), where Xi is a Markov chain. Under different ergodicity conditions on the Markov chain and certain conditional moment conditions on ƒ(Xi, Xi−1), a simple representation of the characteristic function of Sn is obtained. The representation is in term of the maximal eigenvalue of the linear operator sending a function g(x) into the function xE(g(Xi)exp[itƒ(Xi, x)]|Xi−1 = x).  相似文献   

13.
We introduce a new condition for {Yτn} to have the same asymptotic distribution that {Yn} has, where {Yn} is a sequence of random elements of a metric space (S, d) and {τn} is a sequence of random indices. The condition on {Yn} is that maxiDnd(Yi, Yan)→p0 as n → ∞, where Dn = {i: |kikan| ≤ δankan} and {δn} is a nonincreasing sequence of positive numbers. The condition on {τn} is that P(|(kτn/kan)−1| > δan) → 0 as n → ∞. Under these conditions, we will show that d(Yτn, Yan) → P0 and apply this result to the CLT for a general class of sequences of dependent random variables.  相似文献   

14.
The string matching with mismatches problem requires finding the Hamming distance between a pattern P of length m and every length m substring of text T with length n. Fischer and Paterson's FFT-based algorithm solves the problem without error in O(σnlogm), where σ is the size of the alphabet Σ [SIAM–AMS Proc. 7 (1973) 113–125]. However, this in the worst case reduces to O(nmlogm). Atallah, Chyzak and Dumas used the idea of randomly mapping the letters of the alphabet to complex roots of unity to estimate the score vector in time O(nlogm) [Algorithmica 29 (2001) 468–486]. We show that the algorithm's score variance can be substantially lowered by using a bijective mapping, and specifically to zero in the case of binary and ternary alphabets. This result is extended via alphabet remappings to deterministically solve the string matching with mismatches problem with a constant factor of 2 improvement over Fischer–Paterson's method.  相似文献   

15.
Let (X1) and (Y2) be two Hausdorff locally convex spaces with continuous duals X′ and Y′, respectively, L(X,Y) be the space of all continuous linear operators from X into Y, K(X,Y) be the space of all compact operators of L(X,Y). Let WOT and UOT be the weak operator topology and uniform operator topology on K(X,Y), respectively. In this paper, we characterize a full-invariant property of K(X,Y); that is, if the sequence space λ has the signed-weak gliding hump property, then each λ-multiplier WOT-convergent series ∑iTi in K(X,Y) must be λ-multiplier convergent with respect to all topologies between WOT and UOT if and only if each continuous linear operator T :(X1)→(λβ,σ(λβ,λ)) is compact. It follows from this result that the converse of Kalton's Orlicz–Pettis theorem is also true.  相似文献   

16.
Let ℓ(n) be the smallest possible length of addition chains for a positive integer n. Then Scholz conjectured that ℓ(2n − 1) ≤ n + ℓ(n) − 1, which still remains open. It is known that the Scholz conjecture is true when ν(n) ≤ 4, where ν(n) is the number of 1's in the binary representation of n. In this paper, we give some properties of nonstar steps in addition chains and prove that the Scholz conjecture is true for infinitely many new integers including the case where ν(n) = 5.  相似文献   

17.
Let {T1, Y1}i=1 be a sequence of positive independent random variables. Let, also, Z1 = βY1 ? πTi, i = 1, 2, …, where Y1 = Max(0, Yi ? w), w ? 0, and where β < 0 and π is such that E(Z1) < 0. We consider the random walk of partial sums Sn = ?ni=1Zi in the presence of an absorbing region (u, ∞), u ? 0, and S0 ≡ 0. Of interest is ψ(u) = Pr(S? ≤ u) where S? = Sup(0, S1, S2, …, Sn, …).  相似文献   

18.
It is known that if a smooth function h in two real variables x and y belongs to the class Σn of all sums of the form Σnk=1ƒk(x) gk(y), then its (n + 1)th order "Wronskian" det[hxiyj]ni,j=0 is identically equal to zero. The present paper deals with the approximation problem h(x, y) Σnk=1ƒk(x) gk(y) with a prescribed n, for general smooth functions h not lying in Σn. Two natural approximation sums T=T(h) Σn, S=S(h) Σn are introduced and the errors |h-T|, |h-S| are estimated by means of the above mentioned Wronskian of the function h. The proofs utilize the technique of ordinary linear differential equations.  相似文献   

19.
The aim of this paper is to explain how, starting from a Goppa code C(X,G,P1,…,Pn) and a cyclic covering π:YX of degree m, one can twist the initial code to another one C(X,G+Dχ,P1,…,Pn), where Dχ is a non-principal degree 0 divisor on X associated to a character χ of Gal(Y/X), in the hope that X(G+Dχ)>X(G). We give, using a MAGMA program, several examples where this occurs, and where both the initial and twisted codes have same minimum distance, so that initial codes have been improved.  相似文献   

20.
We give a direct formulation of the invariant polynomials μGq(n)(, Δi,;, xi,i + 1,) characterizing U(n) tensor operators p, q, …, q, 0, …, 0 in terms of the symmetric functions Sλ known as Schur functions. To this end, we show after the change of variables Δi = γi − δi and xi, i + 1 = δi − δi + 1 thatμGq(n)(,Δi;, xi, i + 1,) becomes an integral linear combination of products of Schur functions Sα(, γi,) · Sβ(, δi,) in the variables {γ1,…, γn} and {δ1,…, δn}, respectively. That is, we give a direct proof that μGq(n)(,Δi,;, xi, i + 1,) is a bisymmetric polynomial with integer coefficients in the variables {γ1,…, γn} and {δ1,…, δn}. By making further use of basic properties of Schur functions such as the Littlewood-Richardson rule, we prove several remarkable new symmetries for the yet more general bisymmetric polynomials μmGq(n)1,…, γn; δ1,…, δm). These new symmetries enable us to give an explicit formula for both μmG1(n)(γ; δ) and 1G2(n)(γ; δ). In addition, we describe both algebraic and numerical integration methods for deriving general polynomial formulas for μmGq(n)(γ; δ).  相似文献   

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

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