首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 0 毫秒
1.
Let A be a set of size m. Obtaining the first km elements of A in ascending order can be done in optimal O(m+klog?k) time. We present Incremental Quicksort (IQS), an algorithm (online on k) which incrementally gives the next smallest element of the set, so that the first k elements are obtained in optimal expected time for any k. Based on IQS, we present the Quickheap (QH), a simple and efficient priority queue for main and secondary memory. Quickheaps are comparable with classical binary heaps in simplicity, yet are more cache-friendly. This makes them an excellent alternative for a secondary memory implementation. We show that the expected amortized CPU cost per operation over a Quickheap of m elements is O(log?m), and this translates into O((1/B)log?(m/M)) I/O cost with main memory size M and block size B, in a cache-oblivious fashion. As a direct application, we use our techniques to implement classical Minimum Spanning Tree (MST) algorithms. We use IQS to implement Kruskal’s MST algorithm and QHs to implement Prim’s. Experimental results show that IQS, QHs, external QHs, and our Kruskal’s and Prim’s MST variants are competitive, and in many cases better in practice than current state-of-the-art alternative (and much more sophisticated) implementations.  相似文献   

2.
3.
The use of multiple independent spanning trees (ISTs) for data broadcasting in networks provides a number of advantages, including the increase of fault-tolerance and bandwidth. The designs of multiple ISTs on several classes of networks have been widely investigated. In this paper we show a construction algorithm of ISTs on odd graphs, and we analyze that all the lengths of the paths in the ISTs are less than or equal to the length of the shortest path+4, which is optimal. We also prove that the heights of the ISTs we constructed are d+1, which again is optimal, since the fault diameter of an odd graph is d+1.  相似文献   

4.
基于最小代价和生成树的算法研究   总被引:1,自引:0,他引:1  
最小生成树问题是一类经典的组合优化问题,已有许多快速有效的算法。但是在实际中更多存在这样的网络,除边有权值外,结点也有权值,并且结点的权值有多种情况,这就产生了基于代价和最小的生成树问题。根据结点权值的取值情况,对几种最小代价和生成树问题进行分类和求解,得到了一些有价值的性质和算法,有一定的实际应用背景。  相似文献   

5.
The Euclidean Minimum Spanning Tree problem is to decide whether a given graph G=(P,E) on a set of points in the two-dimensional plane is a minimum spanning tree with respect to the Euclidean distance. Czumaj et al. [A. Czumaj, C. Sohler, M. Ziegler, Testing Euclidean Minimum Spanning Trees in the plane, Unpublished, Part II of ESA 2000 paper, downloaded from http://web.njit.edu/~czumaj/] gave a 1-sided-error non-adaptive property-tester for this task of query complexity . We show that every non-adaptive (not necessarily 1-sided-error) property-tester for this task has a query complexity of , implying that the test in [A. Czumaj, C. Sohler, M. Ziegler, Testing Euclidean Minimum Spanning Trees in the plane, Unpublished, Part II of ESA 2000 paper, downloaded from http://web.njit.edu/~czumaj/] is of asymptotically optimal complexity. We further prove that every adaptive property-tester has query complexity of Ω(n1/3). Those lower bounds hold even when the input graph is promised to be a bounded degree tree.  相似文献   

6.
最小生成树(minimum spanning tree, MST)是图论中最为经典算法之一.基于MST结构的聚类、分类和最短路径查询等复杂图算法,在效率和结果质量方面均有显著提高.然而,随着互联网的迅猛发展,图数据规模也变得越来越大,包含千万甚至上亿个顶点的大图数据越发常见.因此,如何在大图数据上实现查询处理和数据挖掘算法已成为亟待解决的问题之一.除此之外,由于大图数据的动态性特征,如何动态地维护算法结果也势必成为最受关注的问题之一.针对目前集中式的最小生成树算法无法解决海量和动态图数据的问题,首先提出了分区Prim(partition Prim, PP)算法,基于此提出了顶点驱动的并行MST算法——PB(PP Boruvka)算法,并论证了PB算法的正确性.另外,基于MapReduce和BSP框架实现了PB算法.针对只删除动态图特征,提出了MST维护算法,以实现高效的增量计算.对提出的计算和维护算法进行了代价分析和比较.最后,使用真实和模拟数据集,验证了PB算法和维护算法的有效性、高效性和可扩展性.  相似文献   

7.
We give an algorithm to find a minimum spanning tree in the k-dimensional space under rectilinear metric. The running time is for k≥ 3. This improves the previous bound by a factor . Received January 10, 1995; revised December 21, 1995.  相似文献   

8.
最小生成树用于基因表示数据的聚类算法   总被引:6,自引:0,他引:6  
在生物学研究中,需要对植物和动物分类,对基因进行分类,以获得对种群固有结构的认识.使用聚类分析方法,有效地鉴别基因表示数据的模式,将它们分组成为由类似对象组成的多个类,对研究基因的结构、功能以及不同种类基因之间的关系都具有重要意义.将图论的最小生成树理论引入分子生物学中基因表示数据的聚类分析方法,设计了生成树的表示和基于最小生成树的聚类算法,证明了该方法对于一些准则函数能够产生全局最优簇,并根据实验结果对算法进行了讨论和评价.  相似文献   

9.
Suppose that T is a spanning tree of a graph G. T is called a locally connected spanning tree of G if for every vertex of T, the set of all its neighbors in T induces a connected subgraph of G. In this paper, given an intersection model of a circular-arc graph, an O(n)-time algorithm is proposed that can determine whether the circular-arc graph contains a locally connected spanning tree or not, and produce one if it exists.  相似文献   

10.
G. Das  S. Kapoor  M. Smid 《Algorithmica》1997,19(4):447-462
We consider the problems of computing r-approximate traveling salesman tours and r-approximate minimum spanning trees for a set of n points in , where d≥ 1 is a constant. In the algebraic computation tree model, the complexities of both these problems are shown to be , for all n and r such that r < n and r is larger than some constant. In the more powerful model of computation that additionally uses the floor function and random access, both problems can be solved in O(n) time if . Received January 8, 1996; revised July 15, 1996.  相似文献   

11.
We present a method for producing dense active appearance models (AAMs), suitable for video-realistic synthesis. To this end we estimate a joint alignment of all training images using a set of pairwise registrations and ensure that these pairwise registrations are only calculated between similar images. This is achieved by defining a graph on the image set whose edge weights correspond to registration errors and computing a bounded diameter minimum spanning tree. Dense optical flow is used to compute pairwise registration and a flow refinement method to align small scale texture is introduced. Further, given the registration of training images, vertices are added to the AAM to minimise the error between the observed flow fields and the flow fields interpolated between the AAM mesh points. We demonstrate a significant improvement in model compactness.  相似文献   

12.
We study hierarchical segmentation in the framework of edge-weighted graphs. We define ultrametric watersheds as topological watersheds null on the minima. We prove that there exists a bijection between the set of ultrametric watersheds and the set of hierarchical segmentations. We end this paper by showing how to use the proposed framework in practice on the example of constrained connectivity; in particular it allows to compute such a hierarchy following a classical watershed-based morphological scheme, which provides an efficient algorithm to compute the whole hierarchy.  相似文献   

13.
徐沁  罗斌 《计算机工程》2013,(12):204-210
针对初始点选择不当导致K—means陷入局部最小值问题,提出一种结合自适应mean-shift与最小生成树(MST)的K—means聚类算法。将数据对象投影到主成分分析(PCA)子空间,给出自适应mean.shift算法,并在PCA子空间内将数据向密度大的区域聚集,再利用MST与图连通分量算法,找出数据的类别数和类标签,据此计算原始空间的密度峰值,并将其作为K.means聚类的初始中心点。对K—means的目标函数、聚类精度和运行时间进行比较,结果表明,该算法在较短的运行时间内能给出较优的全局解。  相似文献   

14.
Yuval Emek 《Algorithmica》2011,61(1):141-160
Low distortion probabilistic embedding of graphs into approximating trees is an extensively studied topic. Of particular interest is the case where the approximating trees are required to be (subgraph) spanning trees of the given graph (or multigraph), in which case, the focus is usually on the equivalent problem of finding a (single) tree with low average stretch. Among the classes of graphs that received special attention in this context are k-outerplanar graphs (for a fixed k): Chekuri, Gupta, Newman, Rabinovich, and Sinclair show that every k-outerplanar graph can be probabilistically embedded into approximating trees with constant distortion regardless of the size of the graph. The approximating trees in the technique of Chekuri et al. are not necessarily spanning trees, though.  相似文献   

15.
We consider problems related to the combinatorial game (Free-) Flood-It, in which players aim to make a coloured graph monochromatic with the minimum possible number of flooding operations. We show that the minimum number of moves required to flood any given graph G is equal to the minimum, taken over all spanning trees T of G, of the number of moves required to flood T. This result is then applied to give two polynomial-time algorithms for flood-filling problems. Firstly, we can compute in polynomial time the minimum number of moves required to flood a graph with only a polynomial number of connected subgraphs. Secondly, given any coloured connected graph and a subset of the vertices of bounded size, the number of moves required to connect this subset can be computed in polynomial time.  相似文献   

16.
Hierarchical graphs and clustered graphs are useful non-classical graph models for structured relational information. Hierarchical graphs are graphs with layering structures; clustered graphs are graphs with recursive clustering structures. Both have applications in CASE tools, software visualization and VLSI design. Drawing algorithms for hierarchical graphs have been well investigated. However, the problem of planar straight-line representation has not been solved completely. In this paper we answer the question: does every planar hierarchical graph admit a planar straight-line hierarchical drawing? We present an algorithm that constructs such drawings in linear time. Also, we answer a basic question for clustered graphs, that is, does every planar clustered graph admit a planar straight-line drawing with clusters drawn as convex polygons? We provide a method for such drawings based on our algorithm for hierarchical graphs.  相似文献   

17.
Vertex deletion and edge deletion problems play a central role in parameterized complexity. Examples include classical problems like Feedback Vertex Set, Odd Cycle Transversal, and Chordal Deletion. The study of analogous edge contraction problems has so far been left largely unexplored from a parameterized perspective. We consider two basic problems of this type: Tree Contraction and Path Contraction. These two problems take as input an undirected graph G on n vertices and an integer k, and the task is to determine whether we can obtain a tree or a path, respectively, by a sequence of at most k edge contractions in G. For Tree Contraction, we present a randomized 4 k ? n O(1) time polynomial-space algorithm, as well as a deterministic 4.98 k ? n O(1) time algorithm, based on a variant of the color coding technique of Alon, Yuster and Zwick. We also present a deterministic 2 k+o(k)+n O(1) time algorithm for Path Contraction. Furthermore, we show that Path Contraction has a kernel with at most 5k+3 vertices, while Tree Contraction does not have a polynomial kernel unless NP ? coNP/poly. We find the latter result surprising because of the connection between Tree Contraction and Feedback Vertex Set, which is known to have a kernel with 4k 2 vertices.  相似文献   

18.
Let T be a given tree. Each vertex of T is either a supply vertex or a demand vertex, and is assigned a positive integer, called the supply or the demand. Every demand vertex v of T must be supplied an amount of ??power,?? equal to the demand of v, from exactly one supply vertex through edges in T. Each edge e of T has a direction, and is assigned a positive integer which represents the cost required to delete e from T or reverse the direction of e. Then one wishes to obtain subtrees of T by deleting edges or reversing the directions of edges so that (a)?each subtree contains exactly one supply vertex whose supply is no less than the sum of all demands in the subtree and (b)?every edge is directed away from the supply vertex in each subtree. One wishes to minimize the total cost to obtain such subtrees from T. In the paper, we first show that this minimization problem is NP-hard, and then give a pseudo-polynomial-time algorithm to solve the problem. We finally give a fully polynomial-time approximation scheme (FPTAS) for the problem.  相似文献   

19.
融合显著信息的层次特征学习图像分类   总被引:3,自引:0,他引:3  
高效的图像特征表示是计算机视觉的基础.基于图像的视觉显著性机制及深度学习模型的思想,提出一种融合图像显著性的层次稀疏特征表示用于图像分类.这种层次特征学习每一层都由3个部分组成:稀疏编码、显著性最大值汇聚(saliency max pooling)和对比度归一化.通过在图像层次稀疏表示中引入图像显著信息,加强了图像特征的语义信息,得到图像显著特征表示.相比于手工指定特征,该模型采用无监督数据驱动的方式直接从图像中学习到有效的图像特征描述.最后采用支持向量机(support vector machine, SVM)分类器进行监督学习,实现对图像进行分类.在2个常用的标准图像数据集(Caltech 101和Caltech 256)上进行的实验结果表明,结合图像显著性信息的层次特征表示,相比于基于局部特征的单层稀疏表示在分类性能上有了显著提升.  相似文献   

20.
建立了多参数最小支撑树问题(RMST)的模型,并证明该问题是NP-完全的。利用经典Greedy算法,给出了该问题的一个近似算法,并分析了该近似算法的性能比,证明了所给出的界是紧的。  相似文献   

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

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

京公网安备 11010802026262号