scispace - formally typeset
Search or ask a question

Sorting algorithm

About: Sorting algorithm is a research topic. Over the lifetime, 3002 publications have been published within this topic receiving 49636 citations. The topic is also known as: asc & desc.

More filters
01 Sep 1991
TL;DR: This chapter discusses sorting on a Linear Array with a Systolic and Semisystolic Model of Computation, which automates the very labor-intensive and therefore time-heavy and expensive process of manually sorting arrays.
Abstract: Preface Acknowledgments Notation 1 Arrays and Trees 1.1 Elementary Sorting and Counting 1.1.1 Sorting on a Linear Array Assessing the Performance of the Algorithm Sorting N Numbers with Fewer Than N Processors 1.1.2 Sorting in the Bit Model 1.1.3 Lower Bounds 1.1.4 A Counterexample-Counting 1.1.5 Properties of the Fixed-Connection Network Model 1.2 Integer Arithmetic 1.2.1 Carry-Lookahead Addition 1.2.2 Prefix Computations-Segmented Prefix Computations 1.2.3 Carry-Save Addition 1.2.4 Multiplication and Convolution 1.2.5 Division and Newton Iteration 1.3 Matrix Algorithms 1.3.1 Elementary Matrix Products 1.3.2 Algorithms for Triangular Matrices 1.3.3 Algorithms for Tridiagonal Matrices -Odd-Even Reduction -Parallel Prefix Algorithms 1.3.4 Gaussian Elimination 1.3.5 Iterative Methods -Jacobi Relaxation -Gauss-Seidel Relaxation Finite Difference Methods -Multigrid Methods 1.4 Retiming and Systolic Conversion 1.4.1 A Motivating Example-Palindrome Recognition 1.4.2 The Systolic and Semisystolic Model of Computation 1.4.3 Retiming Semisystolic Networks 1.4.4 Conversion of a Semisystolic Network into a Systolic Network 1.4.5 The Special Case of Broadcasting 1.4.6 Retiming the Host 1.4.7 Design by Systolic Conversion-A Summary 1.5 Graph Algorithms 1.5.1 Transitive Closure 1.5.2 Connected Components 1.5.3 Shortest Paths 1.5.4 Breadth-First Spanning Trees 1.5.5 Minimum Weight Spanning Trees 1.6 Sorting Revisited 1.6.1 Odd-Even Transposition Sort on a Linear Array 1.6.2 A Simple Root-N(log N + 1)-Step Sorting Algorithm 1.6.3 A (3 Root- N + o(Root-N))-Step Sorting Algorithm 1.6.4 A Matching Lower Bound 1.7 Packet Routing 1.7.1 Greedy Algorithms 1.7.2 Average-Case Analysis of Greedy Algorithms -Routing N Packets to Random Destinations -Analysis of Dynamic Routing Problems 1.7.3 Randomized Routing Algorithms 1.7.4 Deterministic Algorithms with Small Queues 1.7.5 An Off-line Algorithm 1.7.6 Other Routing Models and Algorithms 1.8 Image Analysis and Computational Geometry 1.8.1 Component-Labelling Algorithms -Levialdi's Algorithm -An O (Root-N)-Step Recursive Algorithm 1.8.2 Computing Hough Transforms 1.8.3 Nearest-Neighbor Algorithms 1.8.4 Finding Convex Hulls 1.9 Higher-Dimensional Arrays 1.9.1 Definitions and Properties 1.9.2 Matrix Multiplication 1.9.3 Sorting 1.9.4 Packet Routing 1.9.5 Simulating High-Dimensional Arrays on Low-Dimensional Arrays 1.10 problems 1.11 Bibliographic Notes 2 Meshes of Trees 2.1 The Two-Dimensional Mesh of Trees 2.1.1 Definition and Properties 2.1.2 Recursive Decomposition 2.1.3 Derivation from KN,N 2.1.4 Variations 2.1.5 Comparison With the Pyramid and Multigrid 2.2 Elementary O(log N)-Step Algorithms 2.2.1 Routing 2.2.2 Sorting 2.2.3 Matrix-Vector Multiplication 2.2.4 Jacobi Relaxation 2.2.5 Pivoting 2.2.6 Convolution 2.2.7 Convex Hull 2.3 Integer Arithmetic 2.3.1 Multiplication 2.3.2 Division and Chinese Remaindering 2.3.3 Related Problems -Iterated Products -Rooting Finding 2.4 Matrix Algorithms 2.4.1 The Three-Dimensional Mesh of Trees 2.4.2 Matrix Multiplication 2.4.3 Inverting Lower Triangular Matrices 2.4.4 Inverting Arbitrary Matrices -Csanky's Algorithm -Inversion by Newton Iteration 2.4.5 Related Problems 2.5 Graph Algorithms 2.5.1 Minimum-Weight Spanning Trees 2.5.2 Connected Components 2.5.3 Transitive Closure 2.5.4 Shortest Paths 2.5.5 Matching Problems 2.6 Fast Evaluation of Straight-Line Code 2.6.1 Addition and Multiplication Over a Semiring 2.6.2 Extension to Codes with Subtraction and Division 2.6.3 Applications 2.7 Higher-Dimensional meshes of Trees 2.7.1 Definitions and Properties 2.7.2 The Shuffle-Tree Graph 2.8 Problems 2.9 Bibliographic Notes 3 Hypercubes and Related Networks 3.1 The Hypercube 3.1.1 Definitions and Properties 3.1.2 Containment of Arrays -Higher-Dimensional Arrays -Non-Power-of-2 Arrays 3.1.3 Containment of Complete Binary Trees 3.1.4 Embeddings of Arbitrary Binary Trees -Embeddings with Dilation 1 and Load O(M over N + log N) -Embeddings with Dilation O(1) and Load O (M over N + 1) -A Review of One-Error-Correcting Codes -Embedding Plog N into Hlog N 3.1.5 Containment of Meshes of Trees 3.1.6 Other Containment Results 3.2 The Butterfly, Cube-Connected-Cycles , and Benes Network 3.2.1 Definitions and Properties 3.2.2 Simulation of Arbitrary Networks 3.2.3 Simulation of Normal Hypercube Algorithms 3.2.4 Some Containment and Simulation Results 3.3 The Shuffle-Exchange and de Bruijn Graphs 3.3.1 Definitions and Properties 3.3.2 The Diaconis Card Tricks 3.3.3 Simulation of Normal Hypercube Algorithms 3.3.4 Similarities with the Butterfly 3.3.5 Some Containment and Simulation Results 3.4 Packet-Routing Algorithms 3.4.1 Definitions and Routing Models 3.4.2 Greedy Routing Algorithms and Worst-Case Problems 3.4.3 Packing, Spreading, and Monotone Routing Problems -Reducing a Many-to-Many Routing Problem to a Many-to-One Routing Problem -Reducing a Routing Problem to a Sorting Problem 3.4.4 The Average-Case Behavior of the Greedy Algorithm -Bounds on Congestion -Bounds on Running Time -Analyzing Non-Predictive Contention-Resolution Protocols 3.4.5 Converting Worst-Case Routing Problems into Average-Case Routing Problems -Hashing -Randomized Routing 3.4.6 Bounding Queue Sizes -Routing on Arbitrary Levelled Networks 3.4.7 Routing with Combining 3.4.8 The Information Dispersal Approach to Routing -Using Information Dispersal to Attain Fault-Tolerance -Finite Fields and Coding Theory 3.4.9 Circuit-Switching Algorithms 3.5 Sorting 3.5.1 Odd-Even Merge Sort -Constructing a Sorting Circuit with Depth log N(log N +1)/2 3.5.2 Sorting Small Sets 3.5.3 A Deterministic O(log N log log N)-Step Sorting Algorithm 3.5.4 Randomized O(log N)-Step Sorting Algorithms -A Circuit with Depth 7.45 log N that Usually Sorts 3.6 Simulating a Parallel Random Access Machine 3.6.1 PRAM Models and Shared Memories 3.6.2 Randomized Simulations Based on Hashing 3.6.3 Deterministic Simulations using Replicated Data 3.6.4 Using Information Dispersal to Improve Performance 3.7 The Fast Fourier Transform 3.7.1 The Algorithm 3.7.2 Implementation on the Butterfly and Shuffle-Exchange Graph 3.7.3 Application to Convolution and Polynomial Arithmetic 3.7.4 Application to Integer Multiplication 3.8 Other Hypercubic Networks 3.8.1 Butterflylike Networks -The Omega Network -The Flip Network -The Baseline and Reverse Baseline Networks -Banyan and Delta Networks -k-ary Butterflies 3.8.2 De Bruijn-Type Networks -The k-ary de Bruijn Graph -The Generalized Shuffle-Exchange Graph 3.9 Problems 3.10 Bibliographic Notes Bibliography Index Lemmas, Theorems, and Corollaries Author Index Subject Index

2,895 citations

02 Jan 1994
TL;DR: Performance and Scalability of Parallel Systems, General Issues in Mapping Systolic Systems Onto Parallel Computers, and Speedup Anomalies in Parallel Search Algorithms.
Abstract: Introduction. What is Parallel Computing? The Scope of Parallel Computing. Issues in Parallel Computing. Organization and Contents of The Text. Bibliographic Remarks. Problems. References. Models of Parallel Computers. A Taxonomy of Parallel Architectures. An Idealized Parallel Computer. Dynamic Interconnection Networks. Static Interconnection Networks. Embedding Other Networks Into a Hypercube. Routing Mechanisms For Static Networks. Communication Costs in Static Interconnection Networks. Cost-Performance Tradeoffs. Architectural Models For Parallel Algorithm Design. Bibliographic Remarks. References. Basic Communication Operations. Simple Message Transfer Between Two Processors. One-To-All Broadcast. All-To-All Broadcast, Reduction, and Prefix Sums. One-To-All Personalized Communications. All-To-All Personalized Communications. Circular Shift. Faster Methods For Some Communication Operations. Summary. Bibliographic Remarks. Problems. References. Performance and Scalability of Parallel Systems. Performance Metrics For Parallel Systems. The Effect of Granularity and Data Mapping On Performance. The Scalability of Parallel Systems. The Isoefficiency Metric of Scalability. Sources of Parallel Overhead. Minimum Execution Time and Minimum Cost-Optimal Execution Time. Other Scalability Metrics and Bibliographic Remarks. Problems. References. Dense Matrix Algorithms. Mapping Matrices Onto Processors. Matrix Transpositon. Matrix-Vector Multiplication. Matrix Multiplication. Solving a System of Linear Equations. Bibliographic Remarks. Problems. References. Sorting. Issues in Sorting On Parallel Computers. Sorting Networks. Bubble Sort and Its Variants. Quicksort. Other Sorting Algorithms. Bibliographic Remarks. Problems. References. Graph Algorithms. Definitions and Representation. Minimum Spanning Tree: Prim's Algorithm. Single-Source Shortest Paths: Dijkstra's Algorithms. All-Pairs Shortest Paths. Transitive Closure. Connected Components. Algorithms For Sparse Graphs. Bibliographic Remarks. Problems. References. Search Algorithms For Discrete Optimization Problems. Definitions and Examples. Sequential Search Algorithms. Search Overhead Factor. Parallel Depth-First Search. Parallel Best-First Search. Speedup Anomalies in Parallel Search Algorithms. Bibliographic Remarks. Problems. References. Dynamic Programming. Serial Monadic Dp Formulations. Nonserial Monadic Dp Formulations. Serial Polyadic Dp Formulations. Nonserial Polyadic Dp Formulations. Summary and Discussion. Bibliographic Remarks. Problems. References. Fast Fourier Transform. The Serial Algorithm. The Binary-Exchange Algorithm. The Transpose Algorithm. Cost-Effectiveness of Meshes and Hypercubes For Fft. Bibliographic Remarks. Problems. References. Solving Sparse Systems of Linear Equations. Basic Operations. Iterative Methods. Finite Element Method. Direct Methods For Sparse Linear Systems. Multigrid Methods. Bibliographic Remarks. Problems. References. Systolic Algorithms and Their Mapping Onto Parallel Computers. Examples of Systolic Systems. General Issues in Mapping Systolic Systems Onto Parallel Computers. Mapping One-Dimensional Systolic Arrays. Bibliographic Remarks. Problems. References. Parallel Programming. Parallel Programming Paradigms. Primitive For The Message-Passing Programming Paradigm. Data-Parallel Languages. Primitives For The Shared-Address-Space Programming Paradigm. Fortran D. Bibliographic Remarks. References. Appendix A. Complexity of Functions and Order Analysis. Author Index. Subject Index. 0805331700T04062001

1,401 citations

Journal ArticleDOI
TL;DR: Tight upper and lower bounds are provided for the number of inputs and outputs (I/OS) between internal memory and secondary storage required for five sorting-related problems: sorting, the fast Fourier transform (FFT), permutation networks, permuting, and matrix transposition.
Abstract: We provide tight upper and lower bounds, up to a constant factor, for the number of inputs and outputs (I/OS) between internal memory and secondary storage required for five sorting-related problems: sorting, the fast Fourier transform (FFT), permutation networks, permuting, and matrix transposition. The bounds hold both in the worst case and in the average case, and in several situations the constant factors match. Secondary storage is modeled as a magnetic disk capable of transferring P blocks each containing B records in a single time unit; the records in each block must be input from or output to B contiguous locations on the disk. We give two optimal algorithms for the problems, which are variants of merge sorting and distribution sorting. In particular we show for P = 1 that the standard merge sorting algorithm is an optimal external sorting method, up to a constant factor in the number of I/Os. Our sorting algorithms use the same number of I/Os as does the permutation phase of key sorting, except when the internal memory size is extremely small, thus affirming the popular adage that key sorting is not faster. We also give a simpler and more direct derivation of Hong and Kung's lower bound for the FFT for the special case B = P = O(1).

1,344 citations

Journal ArticleDOI
TL;DR: A fast algorithm for two-dimensional median filtering based on storing and updating the gray level histogram of the picture elements in the window is presented, which is much faster than conventional sorting methods.
Abstract: We present a fast algorithm for two-dimensional median filtering. It is based on storing and updating the gray level histogram of the picture elements in the window. The algorithm is much faster than conventional sorting methods. For a window size of m × n, the computer time required is 0(n).

1,298 citations

Proceedings Article
14 Feb 1991
TL;DR: A distributed sorting algorithm, inspired by how ant colonies sort their brood, is presented for use by robot teams, offering the advantages of simplicity, flexibility and robustness.
Abstract: A distributed sorting algorithm, inspired by how ant colonies sort their brood is presented for use by robot teams The robots move randomly, do not communicate have no hierarchical organisation, have no global representation can only perceive objects just in front of them, but can distinguish between objects of two or more types with a certain degree of error The probability that they pick up or put down an object is modulated as a function of how many of the same objects they have met in the recent past This generates a positive feed-back that is sufficient to coordinate the robots' activity, resulting in their sorting the objects into common clusters While less efficient than a hierarchically controlled sorting, this decentralised organisation offers the advantages of simplicity, flexibility and robustness

971 citations

Network Information
Related Topics (5)
Graph (abstract data type)
69.9K papers, 1.2M citations
78% related
Scheduling (computing)
78.6K papers, 1.3M citations
77% related
50.9K papers, 931.6K citations
76% related
79.5K papers, 1.4M citations
76% related
Genetic algorithm
67.5K papers, 1.2M citations
75% related
No. of papers in the topic in previous years