96 research outputs found

    Comparison of Prim and Kruskal’s Algorithm

    Get PDF
    The goal of this research is to compare the performance of the common Prim and the Kruskal of the minimum spanning tree in building up super metric space We suggested using complexity analysis and experimental methods to evaluate these two methods After analysing daily sample data from the Shanghai and Shenzhen 300 indexes from the second half of 2005 to the second half of 2007 the results revealed that when the number of shares is less than 100 the Kruskal algorithm is relatively superior to the Prim algorithm in terms of space complexity however when the number of shares is greater than 100 the Prim algorithm is more superior in terms of time complexity A spanning tree is defined in the glossary as a connected graph with non-negative weights on its edges and the challenge is to identify a maz weight spanning tree Surprisingly the greedy algorithm yields an answer For the problem of finding a min weight spanning tree we propose greedy algorithms based on Prim and Kruskal respectively Graham and Hell provide a history of the issue which began with Czekanowski s work in 1909 The information presented here is based on Rose

    Experimental study of performance of minimum spanning tree algorithms

    Get PDF
    Throughout the study of various theories of algorithms much work has been done in the area of traversal and solving optimization problems on graphs. Some of this work includes studies of finding the Minimal-Cost Spanning Trees (MST) in directed and undirected connected graphs. Several algorithms have been developed for such task. These algorithms tend to differ in performance based on various factors, such as graph density, size of problem spaces, range of weights that can be assigned to the edges of the graphs, edge weight distributions, etc. The data structures used by an algorithm can have a significant impact on algorithm\u27s performance, for each of the aforementioned factors. This thesis presents the results of the experimental study of the impact the data structures have on performances of Kruskal\u27s and Prim\u27s algorithms for finding Minimum-Cost Spanning Trees in connected undirected graphs. The goal of this study is to compare performance of the practical implementations of Kruskal\u27s and Prim\u27s algorithms to their theoretical counterparts, as well as to measure and compare the differences in performances for various implementations of one algorithm, with respect to different implementation of the essential data structures. Performances of different algorithms are studied with respect to each-other for several variations of the types of data. As a result, a table depicting a schedule for use of the various implementations of either of the algorithms, as related to the type of graph used, is presented. The algorithms are implemented and executed on a single Sun UltraSparc workstation, in order to eliminate the discrepancies, which may result from the differences in the processor speeds and variable CPU loads on multiple test machines. The following implementations are studied: Kruskal\u27s Algorithm with heapsort, and disjoint-sets using union-by-rank and path-compression heuristic Kruskal\u27s Algorithm with counting sort and disjoint-sets using union-by-rank and path-compression heuristic Prim\u27s Algorithm with brute force implementation of priority queues Prim\u27s Algorithm with priority queue implemented using a proper implementation of binary heap with bubble-up performed each time a decrease-key operation is performed for a vertex Prim\u27s Algorithm with priority queue implemented using a lazy implementation of binary heap with bubble-up performed after all decrease-key operations are performed for a vertex Prim\u27s Algorithm with priority queue implemented using a binomial heap Prim\u27s Algorithm with priority queue implemented using a Fibonacci heap Upon the conclusion of the experiment, the best results were obtained from the implementation of Prim\u27s algorithm using the lazy heap implementation of a priority queue. For sparse graphs, Kruskal\u27s algorithm with counting sort performed very well, while for higher density graphs, Prim\u27s algorithm with binomial heap performed very well

    PENYELESAIAN MASALAH TRANSPORTASI UNTUK MENCARI SOLUSI OPTIMAL DENGAN PENDEKATAN MINIMUM SPANNING TREE (MST) MENGGUNAKAN ALGORITMA KRUSKAL DAN ALGORITMA PRIM

    Get PDF
    Penelitian ini membahas tentang penyelesaian masalah transportasi dengan pendekatan Minimum Spanning Tree (MST) menggunakan algoritma Kruskal dan algoritma Prim untuk mencari solusi optimal. Algoritma Kruskal dan algoritma Prim merupakan algoritma dalam teori graf untuk mencari Minimum Spanning Tree (MST). Langkah algoritma Kruskal yaitu mengurutkan biaya dari yang terkecil hingga terbesar. Selanjutnya, pilih biaya yang paling terkecil. Kemudian, lakukan perhitungan dengan melihat sumber persediaan dan permintaan di setiap tujuan sampai semuanya terpenuhi, sehingga terlihat bentuk Minimum Spanning Tree (MST) dari algoritma Kruskal. Sedangkan langkah algoritma Prim yaitu dengan memilih sembarang titik atau sumber. Selanjutnya, pilih active edge dengan biaya terkecil. Kemudian, lakukan perhitungan dengan melihat sumber persediaan dan permintaan di setiap tujuan sampai semuanya terpenuhi, sehingga terlihat bentuk Minimum Spanning Tree (MST) dari algoritma Prim. Bentuk dari Minimum Spanning Tree (MST) menghasilkan solusi yang optimal. Dari hasil penelitian ini, pendekatan Minimum Spanning Tree (MST) dengan algoritma Prim yang lebih unggul.

    Optimisation of a tree structured centralized data network using an evolutionary algorithm

    Get PDF
    This thesis attempts to solve the problem of optimising the design of tree structured centralized data network using an Evolutionary Algorithm. A centralized data network is also known as a client-server network. In this type of network, the client, which is usually a terminal connected to the network, would send a request for information to the server. The server would then download the reply back to the client. An example of such a network would be a bank's ATM network. Each ATM machine would be a client and the central server would store information relating to all the bank's customers. The idea was that once this was done the fitness function used in the above problem would be modified to suite the design of a network used to interconnect LANs that would also form a tree structure. Each of the nodes in this network would be a LAN connected to the network via a bridge or router. Unfortunately the results obtained in attempting to optimise the topology of the centralized data network were very poor. A heuristic normally used to solve this problem outperformed the Evolutionary Algorithm on all the three counts that the comparison was performed. Therefore another method using an Evolutionary Algorithm that can optimise the network interconnecting LANs was introduced. The first chapter in this thesis is an introduction to the thesis and all the terms and concepts that are used in it. The second chapter explains the heuristic used. The third chapter discusses what particular properties are needed by a coding scheme used in an Evolutionary Algorithm to solve this problem. It introduces a few alternatives that have been used in the past but do not meet all the requirements. Then it introduces the coding scheme that was used in this thesis and the fitness function used to evaluate each candidate solution. The next chapter tabulates the results and draws conclusions from these results. The final chapter discusses areas of future research possibilities. There are also several appendices. The first introduces the Genetic Algorithm (GA) and discusses some hypotheses that attempt to explain why it is so successful at problem solving. The next appendix introduces Population Based Incremental Learning (PBIL). This is the Evolutionary Algorithm that is used in attempting to solve this problem. Appendix C explains a method of converting between real and binary numbers; this method is not used in this thesis but is important to know when dealing with Evolutionary Algorithms that are only capable of manipulating binary values. The next two appendices discuss Prim's algorithm and Competitive Learning. Prim's algorithm is an MST algorithm that is used in the coding scheme. Competitive Learning is a classification technique that PBIL is partly based on. An explanation of each function used to implement the heuristic and PBIL is given in Appendix F. This is followed by a listing of the Matlab code of each function

    Animated Presentation of Some Greedy Algorithms

    Get PDF

    lllustrative applications on algorithms and data structures

    Get PDF
    https://www.ester.ee/record=b5433485*es

    Implementasi Algoritma Kruskal dalam Menentukan Rute Terdekat di Fakultas Universitas Jambi Kampus Pinang Masak

    Get PDF
    Terbatasnya informasi mengenai jarak antar fakultas yang ada di Universitas Jambi Kampus Pinang Masak menyebabkan sulitnya para Mahasiswa Baru dalam menentukan rute terdekat yang akan mereka lalui saat pengenalan kegiatan kampus (PKK), Di mana salah satu kegiatan PKK ialah mengelilingi fakultas-fakultas yang ada di Universitas Jambi. Algoritma Kruskal dapat dipergunakan untuk pencarian barang dan menentukan rute terdekat. Dalam penelitian ini kami menggunakan Algoritma tersebut. Tujuan penelitian ini adalah untuk memudahkan mahasiswa baru atau pun tamu yang ingin mengelilingi kampus dengan rute terdekat  agar perjalanan mereka efisien. Metode penelitian yang digunakan adalah Studi Pustaka yaitu dengan membaca, menelaah, serta menuangkan sumber data yang berkaitan dengan penelitian ini ke dalam kerangka pemikiran teoritis .Penelitian ini juga menggunakan metode observasi di mana kami melakukan observasi perjalanan mencari lokasi dan jarak antar fakultas dengan bantuan google maps. Hasil Penelitian adalah total bobot minimum atau jarak terdekat untuk menggelilingi fakultas-fakultas yang ada di Universitas Jambi Kampus Pinang Masak adalah 1.700  meter. Kata  kunci : Algoritma Kruskal; Rute Terdekat; Fakultas Universitas Jamb

    Compressing DNA sequence databases with coil

    Get PDF
    Background: Publicly available DNA sequence databases such as GenBank are large, and are growing at an exponential rate. The sheer volume of data being dealt with presents serious storage and data communications problems. Currently, sequence data is usually kept in large "flat files," which are then compressed using standard Lempel-Ziv (gzip) compression – an approach which rarely achieves good compression ratios. While much research has been done on compressing individual DNA sequences, surprisingly little has focused on the compression of entire databases of such sequences. In this study we introduce the sequence database compression software coil. Results: We have designed and implemented a portable software package, coil, for compressing and decompressing DNA sequence databases based on the idea of edit-tree coding. coil is geared towards achieving high compression ratios at the expense of execution time and memory usage during compression – the compression time represents a "one-off investment" whose cost is quickly amortised if the resulting compressed file is transmitted many times. Decompression requires little memory and is extremely fast. We demonstrate a 5% improvement in compression ratio over state-of-the-art general-purpose compression tools for a large GenBank database file containing Expressed Sequence Tag (EST) data. Finally, coil can efficiently encode incremental additions to a sequence database. Conclusion: coil presents a compelling alternative to conventional compression of flat files for the storage and distribution of DNA sequence databases having a narrow distribution of sequence lengths, such as EST data. Increasing compression levels for databases having a wide distribution of sequence lengths is a direction for future work

    Pengoptimalan Jaringan Pipa Primer PDAM Tirtanadi Cabang Tuasan Dengan Menggunakan Algoritma Kruskal

    Get PDF
    Kruskal's algorithm in searching for minimum spanning trees can be applied to pipelines installed at the location of PDAM Tirtanadi Tuasan where problem identification starts with the water discharge reaching the consumer is small but the discharge flowing from the reservoir is sufficient, so this research is used as a solution to this problem and also as an optimization of the clean water distribution network in the Tirtanadi Regional Drinking Water Company (PDAM) of the Tuasan Branch with the intention of cutting the direction of the pipe flow to overcome this problem. The data obtained from PDAM Tirtanadi Tuasan Branch is in the form of a floor plan and formed into a weighted graph. After the data is obtained, then it is calculated manually that the length of the installed water pipe is 32,645 m with 86 vertices and 100 edges, then the pipe length is represented as a set of paths and the pipe connection ends are represented as nodes. The pipe length obtained using Kruskal's algorithm and inspection of iterations using the QM for windows software is 22,095 m, with 86 vertices and 85 edges. So, using the Kruskal Algorithm and the help of the QM for windows software, the difference in pipe length obtained is 10,610 m

    Graph Theory Applications in Advanced Geospatial Research

    Full text link
    Geospatial sciences include a wide range of applications, from environmental monitoring transportation to infrastructure planning, as well as location-based analysis and services. Graph theory algorithms in mathematics have emerged as indispensable tools in these domains due to their capability to model and analyse spatial relationships efficiently. This article explores the applications of graph theory algorithms in geospatial sciences, highlighting their role in network analysis, spatial connectivity, geographic information systems, and various other spatial problem-solving scenarios like digital twin. The article provides a comprehensive idea about graph theory's key concepts and algorithms that assist the geospatial modelling processes and insights into real-world geospatial challenges and opportunities. It lists the extensive research, innovative technologies and methodologies implemented in this domain
    corecore