首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
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.  相似文献   

2.
LetW itk(n) be the minimax complexity of selecting thek largest elements ofn numbersx 1,x 2,...,x n by pairwise comparisonsx i :x j . It is well known thatW 2(n) =n?2+ [lgn], andW k (n) = n + (k?1)lg n +O(1) for all fixed k ≥ 3. In this paper we studyW k (n), the minimax complexity of selecting thek largest, when tests of the form “Isx i the median of {x i ,x j ,x t }?” are also allowed. It is proved thatW2(n) =n?2+ [lgn], andW k (n) =n + (k?1)lg2 n +O(1) for all fixedk≥3.  相似文献   

3.
We prove that there is a polynomial time substitution (y1,…,yn):=g(x1,…,xk) with k?n such that whenever the substitution instance A(g(x1,…,xk)) of a 3DNF formula A(y1,…,yn) has a short resolution proof it follows that A(y1,…,yn) is a tautology. The qualification “short” depends on the parameters k and n.  相似文献   

4.
We define the new notion of a (finite-state) unification automaton, a device for finite-state recognition of relational languages by means of unification transitions. Words in such a language are formed by composing base relations, and have the general form ri1(xj1, xk1)···rin(xjn, xkn) for some n. Generation of such languages by regarding Horn clauses as grammers has been considered before, but to the best of our knowledge, recognizing such languages by suitably designed automata is a new approach. The main result presented is a pumping lemma, forming a necessary condition for finite-state recognizability. Some example results about such automata are given.  相似文献   

5.
Given a real number sequence A=(a1,a2,…,an), an average lower bound L, and an average upper bound U, the Average-Constrained Maximum-Sum Segment problem is to locate a segment A(i,j)=(ai,ai+1,…,aj) that maximizes i?k?jak subject to . In this paper, we give an O(n)-time algorithm for the case where the average upper bound is ineffective, i.e., U=∞. On the other hand, we prove that the time complexity of the problem with an effective average upper bound is Ω(nlogn) even if the average lower bound is ineffective, i.e., L=−∞.  相似文献   

6.
7.
The Cocke-Younger-Kasami algorithm (CYK) always requires 0(n3) time and 0(n2) space to recognize a trial sentence ω = w1w2…wn, given an e-free context-free grammar in Chomsky Normal form. The same inductive rule that underlies the CYK algorithm may be used to produce a variant that computes the same information but requires (1) a maximum of 0(n3) time and 0(n2) space, and (2) only 0(s(n)) space and time for an unambiguous grammar, where s(n) is the number of triples (A,i,j) for which a nonterminal symbol A derives wiwi+1wi+j?1. In this case, time and space consumed are at worst 0(n2).It is shown in addition, for any grammar, that a parse may be obtained from the table left from the recognition algorithm in time 0(s(n)) whether or not the grammar is ambiguous. The same procedure for the CYK algorithm requires time 0(n2).The performance of our variant is quite similar to that of the Earley algorithm except that the Earley algorithm substitutes for s(n), a function which is usually smaller.The model we use of a RAM is strictly identical to the model used in the CYK algorithm. CR categories: 4.20, 5.23, 5.25.  相似文献   

8.
Given q+1 strings (a text t of length n and q patterns m1,…,mq) and a natural number w, the multiple serial episode matching problem consists in finding the number of size w windows of text t which contain patterns m1,…,mq as subsequences, i.e., for each mi, if mi=p1,…,pk, the letters p1,…,pk occur in the window, in the same order as in mi, but not necessarily consecutively (they may be interleaved with other letters). Our main contribution here is an algorithm solving this problem on-line in time O(nq) with an MP-RAM model (which is a RAM model equipped with extra operations).  相似文献   

9.
Let A=〈a1,a2,…,am〉 and B=〈b1,b2,…,bn〉 be two sequences, where each pair of elements in the sequences is comparable. A common increasing subsequence of A and B is a subsequence 〈ai1=bj1,ai2=bj2,…,ail=bjl〉, where i1<i2<?<il and j1<j2<?<jl, such that for all 1?k<l, we have aik<aik+1. A longest common increasing subsequence of A and B is a common increasing subsequence of the maximum length. This paper presents an algorithm for delivering a longest common increasing subsequence in O(mn) time and O(mn) space.  相似文献   

10.
In this paper, we give a relatively simple though very efficient way to color the d-dimensional grid G(n1,n2,…,nd) (with ni vertices in each dimension 1?i?d), for two different types of vertex colorings: (1) acyclic coloring of graphs, in which we color the vertices such that (i) no two neighbors are assigned the same color and (ii) for any two colors i and j, the subgraph induced by the vertices colored i or j is acyclic; and (2) k-distance coloring of graphs, in which every vertex must be colored in such a way that two vertices lying at distance less than or equal to k must be assigned different colors. The minimum number of colors needed to acyclically color (respectively k-distance color) a graph G is called acyclic chromatic number of G (respectively k-distance chromatic number), and denoted a(G) (respectively χk(G)).The method we propose for coloring the d-dimensional grid in those two variants relies on the representation of the vertices of Gd(n1,…,nd) thanks to its coordinates in each dimension; this gives us upper bounds on a(Gd(n1,…,nd)) and χk(Gd(n1,…,nd)).We also give lower bounds on a(Gd(n1,…,nd)) and χk(Gd(n1,…,nd)). In particular, we give a lower bound on a(G) for any graph G; surprisingly, as far as we know this result was never mentioned before. Applied to the d-dimensional grid Gd(n1,…,nd), the lower and upper bounds for a(Gd(n1,…,nd)) match (and thus give an optimal result) when the lengths in each dimension are “sufficiently large” (more precisely, if ). If this is not the case, then these bounds differ by an additive constant at most equal to . Concerning χk(Gd(n1,…,nd)), we give exact results on its value for (1) k=2 and any d?1, and (2) d=2 and any k?1.In the case of acyclic coloring, we also apply our results to hypercubes of dimension d, Hd, which are a particular case of Gd(n1,…,nd) in which there are only 2 vertices in each dimension. In that case, the bounds we obtain differ by a multiplicative constant equal to 2.  相似文献   

11.
We consider the combination of function and permuted matching, each of which has fast solutions in their own right. Given a pattern p of length m and a text t of length n, a function match at position i of the text is a mapping f from Σp to Σt with the property that f(pj)=ti+j−1 for all j. We show that the problem of determining for each substring of the text, if any permutation of the pattern has a function match is in general NP-Complete. However where the mapping is also injective, so-called parameterised matching, the problem can be solved efficiently in O(nlog|Σp|) time. We then give a 1/2-approximation for a Hamming distance based optimisation variant by reduction to multiple knapsack with colour constraints.  相似文献   

12.
The aim of this paper is to generalize a result given by Curry and Feys, who have shown that the only regular combinators possessing inverse in the λ-β-η-calculus are the permutators, whose definition is p=λzλx1λxn(zxi1xin) for n?0 where i1,…, ir is a permutation of 1,…, n. Here we extend this characterization to the set of normal forms, showing that the only normal forms possessing inverse in the λ-βη-calculus are the “hereditarily finite permutators” (h.f.p.), whose recursive definition is: if n?0, Pj (1?j?n) are h.f.p. and i1,…,in is a permutation of 1,…, n, then the normal form of P = λzλx1λxn(z(P1xi1))… (Pnin) is an h.f.p.  相似文献   

13.
《Computers & chemistry》1996,20(4):389-395
Three different geometric parameters, distance r(i,j), angle θ(i,j, k), and dihedral (or torsion) angle φ(i,j, k, l), are commonly used to specify the shape of a molecule. Given Cartesian coordinates it is simple to calculate such parameters. The, non-trivial, inverse problem of finding coordinates when given such parameters is considered here. When a triple of such geometric parameters is given to specify the position of an atom, n, relative to reference atoms i,j, k,…, with known positions, five qualitatively different cases arise: r(n, i), θ(n, i,j), φ(n, i,j, k), θ(j, n, i) and φ(k, n, i,j). Each such geometric coordinate specifies n to lie on a certain type of surface. To calculate its position one must find the point of intersection of three such surfaces. A program, Evclid, that can perform these calculations is integrated with an interactive set of routines that constitute a geometric calculator and editor. It works on (three-dimensional) points and has a number of input, display and output options. It can translate, rotate, reflect, invert and scale as well as edit the point set or subsets.  相似文献   

14.
We survey recent results on the so-called Ehrenfeucht Conjecture which states: For each language L over a finite alphabet Σ there exists a finite subset F of L such that for each pair (g, h) of morphisms on Σ1 the equation g(x)=h(x) holds for all x in L if and only if holds for all x in F.We point out that the conjecture is closely related to the theory of equations in free monoids. We also state a suprising consequence of the conjecture: If it holds (even noneffectively) for all DOL languages, then the HDOL sequence equivalence problem is decidable. Furthermore, we give examples of when the conjecture is known to hold. In particular, we establish it for all binary languages, as well as for all languages when attention is restricted to bounded delay morphisms of some fixed delay.  相似文献   

15.
P. Brucker  L. Nordmann 《Computing》1994,52(2):97-122
Thek-track assignment problem is a scheduling problem withn jobs andk machines. Each machinej has a certain operational period (track) which starts at timea j and ends at timeb j . Each jobi has a specific start times i and a specific finish timet i . A schedule is an assignment of certain jobs to machines such that the intervals [s i ,t i [assigned to the same machinej do not overlap and fit into track [a j ,b j [. We are interested in a schedule which maximizes the number of assigned jobs. AO(n k?1 k!k k+1 )-algorithm which solves this problem is presented. Furthermore it is shown that the more general problem, in which for each track only a given set of jobs can be scheduled on that track, can be solved inO(n k k!k k )-time.  相似文献   

16.
17.
A language L is called thin if for almost all n there is at most one word of length n in L. A language L is called slender if there is a positive integer k such that for any n there are at most k words of length n in L. The notions of Parikh thin and Parikh slender languages are defined similarly by counting the words with the same Parikh vectors instead of the words of the same length. In this paper we discuss decision problems concerning these four properties. It is shown that all four properties are decidable for bounded semilinear languages but undecidable for DT0L languages. As a consequence all these problems are decidable for context-free languages. Received 9 June 1997 / 3 December 1997  相似文献   

18.
For an alphabet A and a morphism h : A1A1, the set of words w such that the DOL language L(A, h, w) is a BOUNDED language is shown to be B1, where B is an effectively computable subset of A. Consequently, BOUNDEDNESS is decidable for DOL languages. The result depends on the authors' recent results on periodic DOL languages. Interpretation of the result for polynomially bounded DOL languages is also considered.  相似文献   

19.
The k-clique problem is a cornerstone of NP-completeness and parametrized complexity. When k is a fixed constant, the asymptotically fastest known algorithm for finding a k-clique in an n-node graph runs in O(n0.792k) time (given by Nešet?il and Poljak). However, this algorithm is infamously inapplicable, as it relies on Coppersmith and Winograd's fast matrix multiplication.We present good combinatorial algorithms for solving k-clique problems. These algorithms do not require large constants in their runtime, they can be readily implemented in any reasonable random access model, and are very space-efficient compared to their algebraic counterparts. Our results are the following:
We give an algorithm for k-clique that runs in O(nk/(εlogn)k−1) time and O(nε) space, for all ε>0, on graphs with n nodes. This is the first algorithm to take o(nk) time and O(nc) space for c independent of k.
Let k be even. Define a k-semiclique to be a k-node graph G that can be divided into two disjoint subgraphs U={u1,…,uk/2} and V={v1,…,vk/2} such that U and V are cliques, and for all i?j, the graph G contains the edge {ui,vj}. We give an time algorithm for determining if a graph has a k-semiclique. This yields an approximation algorithm for k-clique, in the following sense: if a given graph contains a k-clique, then our algorithm returns a subgraph with at least 3/4 of the edges in a k-clique.
  相似文献   

20.
Let E be the set of all simple arithmetic expressions of the form E(x) = xTlTk where x is a nonnegative integer variable and each Ti is a multiplication or integer division by a positive integer constant. We investigate the complexity of the inequivalence and the bounded inequivalence problems for expressions in E. (The bounded inequivalence problem is the problem of deciding for arbitrary expressions E1(x) and E2(x) and a positive integer l whether or not E1(x) ≠ E2(x) for some nonnegative integer x<l. If l = ∞, i.e., there is no upper bound on x, the problem becomes the inequivalence problem.) We show that the inequivalence problem (or equivalently, the equivalence problem) for a large subclass of E is decidable in polynomial time. Whether or not the problem is decidable in polynomial time for the full class E remains open. We also show that the bounded inequivalence problem is NP-complete even if the divisors are restricted to be equal to 2. This last result can be used to sharpen some known NP-completeness results in the literature. Note that if division is rational division, all problems are trivially decidable in polynomial time.  相似文献   

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

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