首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Summary Random sequential bisection is a process to divide a given interval into two, four, eight, ... parts at random. Each division point is uniformly distributed on the interval and conditionally independent of the others. To study the asymptotic behavior of the lengths of subintervals in random seqential bisection, the associated binary tree is introduced. The number of internal or external nodes of the tree is asymptotically normal. The levels of the lowest and the highest external nodes are bounded with probability one or with probability increasing to one as the number of nodes increases to infinity. The associated binary tree is closely related to random binary tree which arises in computer algorithms, such as binary search tree and quicksort, and one-dimensional packing or the parking problem.  相似文献   

2.
We present a new scheme for representing binary trees. The scheme is based on rotations as a previous scheme of Zerling. In our method the items of a representation have a natural geometric interpretation, and the algorithms related to the method are simple. We give an algorithm for enumerating all the representations for trees onn nodes, and an algorithm for building the tree corresponding to a given representation.This work was supported by the Academy of Finland.  相似文献   

3.
The stacking problem is a hard combinatorial optimization problem with high practical interest in, for example, steel storage or container port operations. In this problem, a set of items is stored in a warehouse for a period of time, and a crane is used to place them in a limited number of stacks. Since the entrance and exit of items occurs in an arbitrary order, items may have to be relocated in order to reach and deliver other items below them. The objective of the problem is to find a feasible sequence of movements that delivers all items, while minimizing the total number of movements. We study the scalability of an exact approach to this problem, and propose two heuristic methods to solve it approximately. The two heuristic approaches are a multiple simulation algorithm using semi-greedy construction heuristics, and a stochastic best-first tree search algorithm. The two methods are compared in a set of challenging instances, revealing a superior performance of the tree search approach in most cases.  相似文献   

4.
We propose a modified adaptive multiresolution scheme for solving dd-dimensional hyperbolic conservation laws which is based on cell-average discretization in dyadic grids. Adaptivity is obtained by interrupting the refinement at the locations where appropriate scale (wavelet) coefficients are sufficiently small. One important aspect of such a multiresolution representation is that we can use the same binary tree data structure for domains of any dimension. The tree structure allows us to succinctly represent the data and efficiently navigate through it. Dyadic grids also provide a more gradual refinement as compared with the traditional quad-trees (2D) or oct-trees (3D) that are commonly used for multiresolution analysis. We show some examples of adaptive binary tree representations, with significant savings in data storage when compared to quad-tree based schemes. As a test problem, we also consider this modified adaptive multiresolution method, using a dynamic binary tree data structure, applied to a transport equation in 2D domain, based on a second-order finite volume discretization.  相似文献   

5.
Two paging techniques proposed by Muntz and Uzgalis to store a binary tree in secondary storage are considered. The first method (sequential allocation) is the basic allocation technique and here an exact formula is given, to be considered as a touchstone for every other method. Then a modification to the second method (grouped allocation) is proposed which gains control on storage utilization. This allows the structure to maintain both a high loading factor and a low retrieving time.  相似文献   

6.
An algorithm is presented which constructs an optimal binary search tree for an ordered list of n items, and which requires subquadratic time if there is no long sublist of very low frequency items. For example, time = O(n1.6) if the frequency of each item is at least /n for some constant > 0. A second algorithm is presented which constructs an approximately optimal binary search tree. This algorithm has one parameter, and exhibits a trade-off between speed and accuracy. It is possible to choose the parameter such that time = O(n1.6) and error = o(1).  相似文献   

7.
To specify a Bayesian network (BN), a conditional probability table (CPT), often of an effect conditioned on its n causes, must be assessed for each node. Its complexity is generally exponential in n. Noisy-OR and a number of extensions reduce the complexity to linear, but can only represent reinforcing causal interactions. Non-impeding noisy-AND (NIN-AND) trees are the first causal models that explicitly express reinforcement, undermining, and their mixture. Their acquisition has a linear complexity, in terms of both the number of parameters and the size of the tree topology. As originally proposed, however, they allow only binary effects and causes. This work generalizes binary NIN-AND tree models to multi-valued effects and causes. It is shown that the generalized NIN-AND tree models express reinforcement, undermining, and their mixture at multiple levels, relative to each active value of the effect. The model acquisition is still efficient. For binary variables, they degenerate into binary NIN-AND tree models. Hence, this contribution enables CPTs of discrete BNs of arbitrary variables (binary or multi-valued) to be specified efficiently through the intuitive concepts of reinforcement and undermining.  相似文献   

8.
We present an O(n4)-time algorithm for the following problem: Given a set of items with known access frequencies, find the optimal binary search tree under the realistic assumption that each comparison can only result in a two-way decision: either an equality comparison or a less-than comparisons. This improves the best known result of O(n5) time, which is based on split tree algorithms. Our algorithm relies on establishing thresholds on the frequency of an item that can occur as an equality comparison at the root of an optimal tree.  相似文献   

9.
Sleator and Tarjan have invented a form of self-adjusting binary search tree called thesplay tree. On any sufficiently long access sequence, splay trees are as efficient, to within a constant factor, as both dynamically balanced and static optimum search trees. Sleator and Tarjan have made a much stronger conjecture; namely, that on any sufficiently long access sequence and to within a constant factor, splay trees are as efficient asany form of dynamically updated search tree. Thisdynamic optimality conjecture implies as a special case that accessing the items in a splay tree in sequential order takes linear time, i.e.O(1) time per access. In this paper we prove this special case of the conjecture, generalizing an unpublished result of Wegman. Oursequential access theorem not only supports belief in the dynamic optimality conjecture but provides additional insight into the workings of splay trees. As a corollary of our result, we show that splay trees can be used to simulate output-restricted deques (double-ended queues) in linear time. We pose several open problems related to our result.  相似文献   

10.
In this paper we study the rotation transformation on binary trees and consider the properties of binary trees under this operation. The rotation is the universal primitive used to rebalance dynamic binary search trees. New binary search tree algorithms have recently been introduced by Sleator and Tarjan. It has been conjectured that these algorithms are as efficient as any algorithm that dynamically restructures the tree using rotations. We hope that by studying rotations in binary trees we shall gain a better understanding of the nature of binary search trees, which in turn will lead to a proof of this “dynamic optimality conjecture”. We define a graph, RG(n), whose vertex set consists of all binary trees containing n nodes, and which has an edge between two trees if they differ by only one rotation. We shall introduce a new characterization of the structure of RG(n) and use it to demonstrate the existence of a Hamiltonian cycle in the graph. The proof is constructive and can be used to enumerate all binary trees with n nodes in constant time per tree.  相似文献   

11.
We give three algorithms for computing the parent of a node in a threaded binary tree, and calculate the average case complexity of each. By comparing these to the unit cost of obtaining the parent of a node with an explicit parent-pointer field, it is possible to balance runtime and storage cost with respect to the task of finding parent nodes in binary trees. The results obtained show that, although the worst case complexity for ann-node tree is obviouslyO(n) for all three algorithms, the average case complexity for two input distributions is asymptotic (from below) to either 3 or 2.  相似文献   

12.
Game tree searching is one of the fundamental topics in artificial intelligence and decision analysis. The main results of this paper are: (1) A simple nondirectional algorithm for searching binary bi-valued game trees is presented and analysed. For a wide range of parameters s in Schrüfers s-tree model it has a smaller branching factor than directional search. (2) A cascade technique for game tree models with at least four different node values is presented. This technique yields algorithms with smaller branching factors than alpha-beta. (The amount of storage required by the algorithms in (1) and (2) is only linear in the depth of the searched trees.) (3) Recursion trees are defined as a natural generalisation of game trees. A combinatorial lower bound for the complexity of searching symmetric recursion trees is proved. (4) Those recursion trees are characterized which can be searched by pruning techniques.  相似文献   

13.
As a framework for characterizing families of regular languages of binary trees, Wilke introduced a formalism for defining binary trees that uses six many-sorted operations involving letters, trees and contexts. In this paper a completeness property of these operations is studied. It is shown that all functions involving letters, binary trees and binary contexts which preserve congruence relations of the free tree algebra over an alphabet, are generated by Wilke’s functions, if the alphabet contains at least seven letters. That is to say, the free tree algebra over an alphabet with at least seven letters is affine-complete. The proof yields also a version of the theorem for ordinary one-sorted term algebras: congruence preserving functions on contexts and members of a term algebra are substitution functions, provided that the signature consists of constant and binary function symbols only, and contains at least seven symbols of each rank. Moreover, term algebras over signatures with at least seven constant symbols are affine-complete.Received March 18, 2004; accepted in final form October 8, 2004.  相似文献   

14.
We determine the explicit performance of deletion algorithms which have to maintain threads in a binary tree. In particular, it is shown that the cost of threads on deletion is not as high as might be expected, and is especially low for right-threaded trees. The results are obtained by using recurrences to compute the average cost of deleting a single node from both threaded and unthreaded trees. As an illustration of the technique, a new derivation of the average cost of insertion into binary search trees is presented.  相似文献   

15.
Two tree encoding techniques for arrays are compared and contrasted. It is shown that the pyramids and their generalization ford-dimensional arrays are much superior to binary tree encodings for three measures; access time, storage and average proximity.Work supported by a National Research Council of Canada Grant No. A-7700.  相似文献   

16.
Many definitive and approximate methods have been so far proposed for the construction of an optimal binary search tree. One such method is the use of evolutionary algorithms with satisfactorily improved cost efficiencies. This paper will propose a new genetic algorithm for making a near-optimal binary search tree. In this algorithm, a new greedy method is used for the crossover of chromosomes while a new way is also developed for inducing mutation in them. Practical results show a rapid and desirable convergence towards the near-optimal solution. The use of a heuristic to create not so costly chromosomes as the first offspring, the greediness of the crossover, and the application of elitism in the selection of future generation chromosomes are the most important factors leading to near-optimal solutions by the algorithm at desirably high speeds. Due to the practical results, increasing problem size does not cause any considerable difference between the solution obtained from the algorithm and exact solution.  相似文献   

17.
完全二叉树理论的计算复杂度   总被引:2,自引:2,他引:0  
李志敏  罗里波  李祥 《数学学报》2008,51(2):311-318
完全二叉树的一阶理论已被证明具有量词消去的性质,进而计算了完全二叉树模型中元素的CB秩.本文利用有界Ehrenfeucht-Frassé博弈研究完全二叉树的一阶理论,证明了此理论的时间计算复杂度上界为22cn,空间计算复杂度上界为2dn(其中n为输入长度,c,d为合适的常数).  相似文献   

18.
In this paper, nine multiple level planning heuristics are evaluated to characterize how rolling horizon results relate to fixed horizon results in a deterministic demand environment. The weighted order cycle (WOC) is introduced as a single expression of cost structure within a multiple item bill of materials. When planning horizons are restated in terms of WOC (versus time buckets), it becomes apparent that the cost performance of the majority of the heuristics is essentially the same for fixed horizon and rolling horizon conditions when the planning horizon is at least two WOC in length. The horizon sensitive logic of the best two heuristics in cost performance also exhibited less nervousness then several horizon myopic rules, a counter intuitive result. An established multiple level cost modification technique was found to reduce the nervousness of single item rules, in addition to its original goal of schedule cost reduction. To gauge cost performance, Lagrangian relaxation of a binary formulation of the problem was used to find bounds within an average of 1% of the optimal solution cost of each simulation.  相似文献   

19.
We utilize the B-sequences which are sequences of positive integers characterizing binary trees in order to generate lexicographically all the binary trees. Furthermore, we determine the rank of a given binary tree and conversely we compute the B-sequence of the tree whose rank is a given integer.  相似文献   

20.
The rotation graph, Gn, has vertex set consisting of all binary trees with n nodes. Two vertices are connected by an edge if a single rotation will transform one tree into the other. We provide a simpler proof of a result of Lucas that Gn, contains a Hamilton path. Our proof deals directly with the pointer representation of the binary tree. This proof provides the basis of an algorithm for generating all binary trees that can be implemented to run on a pointer machine and to use only constant time between the output of successive trees. Ranking and unranking algorithms are developed for the ordering of binary trees implied by the generation algorithm. These algorithms have time complexity O(n2) (arithmetic operations). We also show strong relationships amongst various representations of binary trees and amongst binary tree generation algorithms that have recently appeared in the literature.  相似文献   

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

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