首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
2.
3.
A hash function is a mapping from a key universe U   to a range of integers, i.e., h:U?{0,1,…,m−1}h:U?{0,1,,m1}, where m is the range's size. A perfect hash function   for some set S⊆USU is a hash function that is one-to-one on S  , where m≥|S|m|S|. A minimal perfect hash function   for some set S⊆USU is a perfect hash function with a range of minimum size, i.e., m=|S|m=|S|. This paper presents a construction for (minimal) perfect hash functions that combines theoretical analysis, practical performance, expected linear construction time and nearly optimal space consumption for the data structure. For n keys and m=n   the space consumption ranges from 2.62n+o(n)2.62n+o(n) to 3.3n+o(n)3.3n+o(n) bits, and for m=1.23nm=1.23n it ranges from 1.95n+o(n)1.95n+o(n) to 2.7n+o(n)2.7n+o(n) bits. This is within a small constant factor from the theoretical lower bounds of 1.44n1.44n bits for m=n   and 0.89n0.89n bits for m=1.23nm=1.23n. We combine several theoretical results into a practical solution that has turned perfect hashing into a very compact data structure to solve the membership problem when the key set S is static and known in advance. By taking into account the memory hierarchy we can construct (minimal) perfect hash functions for over a billion keys in 46 min using a commodity PC. An open source implementation of the algorithms is available at http://cmph.sf.net under the GNU Lesser General Public License (LGPL).  相似文献   

4.
The focus of the present paper is on providing a local deterministic algorithm for colouring the edges of Yao-like   subgraphs of Unit Disk Graphs. These are geometric graphs such that for some positive integers l,kl,k the following property holds at each node vv: if we partition the unit circle centered at vv into 2k2k equally sized wedges then each wedge can contain at most ll points different from vv. We assume that the nodes are location aware, i.e. they know their Cartesian coordinates in the plane. The algorithm presented is local in the sense that each node can receive information emanating only from nodes which are at most a constant (depending on kk and ll, but not on the size of the graph) number of hops (measured in the original underlying Unit Disk Graph) away from it, and hence the algorithm terminates in a constant number of steps. The number of colours used is 2kl+12kl+1 and this is optimal for local algorithms (since the maximal degree is 2kl2kl and a colouring with 2kl2kl colours can only be constructed by a global algorithm), thus showing that in this class of graphs the price for locality is only one additional colour.  相似文献   

5.
A real xx is called hh-bounded computable  , for some function h:N→Nh:NN, if there is a computable sequence (xs)(xs) of rational numbers which converges to xx such that, for any n∈NnN, at most h(n)h(n) non-overlapping pairs of its members are separated by a distance larger than 2-n2-n. In this paper we discuss properties of hh-bounded computable reals for various functions hh. We will show a simple sufficient condition for a class of functions hh such that the corresponding hh-bounded computable reals form an algebraic field. A hierarchy theorem for hh-bounded computable reals is also shown. Besides we compare semi-computability and weak computability with the hh-bounded computability for special functions hh.  相似文献   

6.
We prove an explicit bound on the radius of a ball centered at the origin which is guaranteed to contain all bounded connected components of a semi-algebraic set S⊂RkSRk defined by a weak sign condition involving ss polynomials in Z[X1,…,Xk]Z[X1,,Xk] having degrees at most dd, and whose coefficients have bitsizes at most ττ. Our bound is an explicit function of s,d,ks,d,k and ττ, and does not contain any undetermined constants. We also prove a similar bound on the radius of a ball guaranteed to intersect every connected component of SS (including the unbounded components). While asymptotic bounds of the form 2τdO(k)2τdO(k) on these quantities were known before, some applications require bounds which are explicit and which hold for all values of s,d,ks,d,k and ττ. The bounds proved in this paper are of this nature.  相似文献   

7.
Let F(x,y)F(x,y) be a polynomial over a field KK and mm a nonnegative integer. We call a polynomial gg over KK an mm-near solution of F(x,y)F(x,y) if there exists a c∈KcK such that F(x,g)=cxmF(x,g)=cxm, and the number cc is called an mm-value of F(x,y)F(x,y) corresponding to gg. In particular, cc can be 0. Hence, by viewing F(x,y)=0F(x,y)=0 as a polynomial equation over K[x]K[x] with variable yy, every solution of the equation F(x,y)=0F(x,y)=0 in K[x]K[x] is also an mm-near solution. We provide an algorithm that gives all mm-near solutions of a given polynomial F(x,y)F(x,y) over KK, and this algorithm is polynomial time reducible to solving one variable equations over KK. We introduce approximate solutions to analyze the algorithm. We also give some interesting properties of approximate solutions.  相似文献   

8.
9.
Suffix automata and factor automata are efficient data structures for representing the full index of a set of strings. They are minimal deterministic automata representing the set of all suffixes or substrings of a set of strings. This paper presents a novel analysis of the size of the suffix automaton or factor automaton of a set of strings. It shows that the suffix automaton or factor automaton of a set of strings UU has at most 2Q−22Q2 states, where QQ is the number of nodes of a prefix-tree representing the strings in UU. This bound significantly improves over 2‖U‖−12U1, the bound given by Blumer et al. [A. Blumer, J. Blumer, D. Haussler, R.M. McConnell, A. Ehrenfeucht, Complete inverted files for efficient text retrieval and analysis, Journal of the ACM 34 (1987) 578–589], where ‖U‖U is the sum of the lengths of all strings in UU. More generally, we give novel and general bounds for the size of the suffix or factor automaton of an automaton as a function of the size of the original automaton and the maximal length of a suffix shared by the strings it accepts. We also describe in detail a linear-time algorithm for constructing the suffix automaton SS or factor automaton FF of UU in time O(|S|)O(|S|). Our algorithm applies in fact to any input suffix-unique automaton and strictly generalizes the standard on-line construction of a suffix automaton for a single input string. Our algorithm can also be used straightforwardly to generate the suffix oracle or factor oracle of a set of strings, which has been shown to have various useful properties in string-matching. Our analysis suggests that the use of factor automata of automata can be practical for large-scale applications, a fact that is further supported by the results of our experiments applying factor automata to a music identification task with more than 15,000 songs.  相似文献   

10.
We investigate a periodic version of the Benjamin-Ono (BO) equation associated with a discrete Laplacian. We find some special solutions to this equation, and calculate the values of the first two integrals of motion I1I1 and I2I2 corresponding to these solutions. It is found that there exists a strong resemblance between them and the spectra for the Macdonald qq-difference operators. To better understand the connection between these classical and quantum integrable systems, we consider the special degenerate case corresponding to q=0q=0 in more detail. Namely, we give general solutions to this degenerate periodic BO, obtain explicit formulas representing all the integrals of motions InIn (n=1,2,…n=1,2,), and successfully identify it with the eigenvalues of Macdonald operators in the limit q→0q0, i.e. the limit where Macdonald polynomials tend to the Hall–Littlewood polynomials.  相似文献   

11.
This paper concerns construction of additive stretched spanners with few edges for nn-vertex graphs having a tree-decomposition into bags of diameter at most δδ, i.e., the tree-length δδ graphs. For such graphs we construct additive 2δ2δ-spanners with O(δn+nlogn)O(δn+nlogn) edges, and additive 4δ4δ-spanners with O(δn)O(δn) edges. This provides new upper bounds for chordal graphs for which δ=1δ=1. We also show a lower bound, and prove that there are graphs of tree-length δδ for which every multiplicative δδ-spanner (and thus every additive (δ−1)(δ1)-spanner) requires Ω(n1+1/Θ(δ))Ω(n1+1/Θ(δ)) edges.  相似文献   

12.
13.
We prove that a polynomial f∈R[x,y]fR[x,y] with tt non-zero terms, restricted to a real line y=ax+by=ax+b, either has at most 6t−46t4 zeros or vanishes over the whole line. As a consequence, we derive an alternative algorithm for deciding whether a linear polynomial y−ax−b∈K[x,y]yaxbK[x,y] divides a lacunary polynomial f∈K[x,y]fK[x,y], where KK is a real number field. The number of bit operations performed by the algorithm is polynomial in the number of non-zero terms of ff, in the logarithm of the degree of ff, in the degree of the extension K/QK/Q and in the logarithmic height of aa, bb and ff.  相似文献   

14.
We formalize paper fold (origami) by graph rewriting. Origami construction is abstractly described by a rewriting system (O,?)(O,?), where OO is the set of abstract origamis and ?? is a binary relation on OO, that models fold  . An abstract origami is a structure (Π,∽,?)(Π,,?), where ΠΠ is a set of faces constituting an origami, and ∽ and ?? are binary relations on ΠΠ, each representing adjacency and superposition relations between the faces.  相似文献   

15.
We investigate the group key management problem for broadcasting applications. Previous work showed that, in handling key updates, batch rekeying can be more cost effective than individual rekeying. One model for batch rekeying is to assume that every user has probability pp of being replaced by a new user during a batch period with the total number of users unchanged. Under this model, it was recently shown that an optimal key tree can be constructed in linear time when pp is a constant and in O(n4)O(n4) time when p→0p0. In this paper, we investigate more efficient algorithms for the case p→0p0, i.e., when membership changes are sparse. We design an O(n)O(n) heuristic algorithm for the sparse case and show that it produces a nearly 2-approximation to the optimal key tree. Simulation results show that its performance is even better in practice. We also design a refined heuristic algorithm and show that it achieves an approximation ratio of 1+?1+? for any fixed ?>0?>0 and nn, as p→0p0. Finally, we give another approximation algorithm for any p∈(0,0.693)p(0,0.693) which is shown to be quite good by our simulations.  相似文献   

16.
A collection of T1,T2,…,TkT1,T2,,Tk of unrooted, leaf labelled (phylogenetic) trees, all with different leaf sets, is said to be compatible   if there exists a tree TT such that each tree TiTi can be obtained from TT by deleting leaves and contracting edges. Determining compatibility is NP-hard, and the fastest algorithm to date has worst case complexity of around Ω(nk)Ω(nk) time, nn being the number of leaves. Here, we present an O(nf(k))O(nf(k)) algorithm, proving that compatibility of unrooted phylogenetic trees is fixed parameter tractable   (FPT) with respect to the number kk of trees.  相似文献   

17.
18.
In this paper we discuss models and methods for solving the rooted distance constrained minimum spanning tree problem which is defined as follows: given a graph G=(V,E)G=(V,E) with node set V={0,1,…,n}V={0,1,,n} and edge set EE, two integer weights, a cost cece and a delay wewe associated with each edge ee of EE, and a natural (time limit) number HH, we wish to find a spanning tree TT of the graph with minimum total cost and such that the unique path from a specified root node, node 0, to any other node has total delay not greater than HH. This problem generalizes the well known hop-constrained spanning tree problem and arises in the design of centralized networks with quality of service constraints and also in package shipment with service guarantee constraints. We present three theoretically equivalent modeling approaches, a column generation scheme, a Lagrangian relaxation combined with subgradient optimization procedure, both based on a path formulation of the problem, and a shortest path (compact) reformulation of the problem which views the underlying subproblem as defined in a layered extended graph. We present results for complete graph instances with up to 40 nodes. Our results indicate that the layered graph path reformulation model is still quite good when the arc weights are reasonably small. Lagrangian relaxation combined with subgradient optimization procedure appears to work much better than column generation and seems to be a quite reasonable approach to the problem for large weight, and even small weight, instances.  相似文献   

19.
This paper introduces the topological finiteness condition finite derivation type   (FDT) on the class of semigroups. This notion is naturally extended from the monoid case. With this new concept we are able to prove that if a Rees matrix semigroup M[S;I,J;P]M[S;I,J;P] has FDT then the semigroup SS also has FDT. Given a monoid SS and a finitely presented Rees matrix semigroup M[S;I,J;P]M[S;I,J;P] we prove that if the ideal of SS generated by the entries of PP has FDT, then so does M[S;I,J;P]M[S;I,J;P]. In particular, we show that, for a finitely presented completely simple semigroup MM, the Rees matrix semigroup M=M[S;I,J;P]M=M[S;I,J;P] has FDT if and only if the group SS has FDT.  相似文献   

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

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