25 research outputs found

    Improved Shellsort for the Worst-Case, the Best-Case and a Subset of the Average-Case Scenarios

    Get PDF
    Sorting involves rearrangement of items into ascending or descending order. There are several sorting algorithms but some are more efficient than others in terms of speed and memory utilization. Shellsort improves on Insertion sort by decreasing the number of comparisons made on the items to be sorted. This paper presents an Improved Shellsort algorithm that further decreases the number of comparisons made on the items to be sorted through a modified diminishing increment sort. The results obtained from the implementation of both Shellsort and the proposed algorithm shows that the proposed algorithm has a fewer number of comparisons made for all input sizes of the best and worst cases and for input size of twenty or less for the average case. By implication, this means that the proposed algorithm is faster in these situations. The strength of the algorithm however diminishes for only the average case of input size greater than twenty

    Shellsort with three increments

    Get PDF

    Visualization of Sorting Algorithms

    Get PDF
    The purpose of this thesis was to develop a graphical tooi for the visuaiization of a number of soning methods. The tool developed, called SortDisplay, not only gives the users the option to view various sorting methods in execution, but also gives other options to get infonnation about the perfonnance and complexity of the sorting algorithms in tenns of the number cf comparisons and exchanges needed. The tool also has various other options which help the user understand and analyze the sorting algorithms implemented. The tool was designed to be an educational tool running on the Oklahoma State University Computer Science Department's Sequent Symmetry S/81 computer running the Dynixlptx operating system. The tollowing topics, which were covered as background and context, put the thesis work in perspective: (1) sorting and sorting algorithms; (2) the concept of visualization and types of visualization; (3) the X window system, the X protocoi, and various software layers in X; (4) the OSFlMotiftoolkit; and (5) using Motif with C++. The programming part of the tool involved designing and implementing the class hierarchies, application framework, sorting methods, and user-interface. The program, coded in the C++ programming language using the Motif toolkit, Xt Intrinsics, and Xlib, has over 4500 lines ofuncommented code (over 5500 lines of documented code), 2 major class hierarchies, and 40 classes. The six sorting methods that were implemented include two Insertion sorts (Linear Insertion and Shellsort), three Exchange sorts (Bubblesort, Combsort, and Quicksort), and one Exchange sort (Straight Selection). SortDisplay was evaluated by various users of the Computer Science Department's Sequent Symmetry S/81 machine including faculty and staff members, and former and current graduate students. Most of the recommendations and suggestions of the evaluators were incorporated into the tool. A number of the ideas that were deemed beyond the scope of the present work were left for the future updates of the tool

    Turbulence driven clustering in nematic active particles

    Get PDF

    Data Structures & Algorithm Analysis in C++

    Get PDF
    This is the textbook for CSIS 215 at Liberty University.https://digitalcommons.liberty.edu/textbooks/1005/thumbnail.jp
    corecore