Batcher Sort
   HOME
*



picture info

Batcher Sort
Bitonic mergesort is a parallel algorithm for sorting. It is also used as a construction method for building a sorting network. The algorithm was devised by Ken Batcher. The resulting sorting networks consist of O(n\log^2(n)) comparators and have a delay of O(\log^2(n)), where n is the number of items to be sorted. A sorted sequence is a monotonically non-decreasing (or non-increasing) sequence. A ''bitonic'' sequence is a sequence with x_0 \leq \cdots \leq x_k \geq \cdots \geq x_ for some k, 0 \leq k arr OR (bitwiseAND (i, k) != 0) AND (arr < arr ) swap the elements arr and arr


See also

*

picture info

Sorting Algorithm
In computer science, a sorting algorithm is an algorithm that puts elements of a List (computing), list into an Total order, order. The most frequently used orders are numerical order and lexicographical order, and either ascending or descending. Efficient sorting is important for optimizing the Algorithmic efficiency, efficiency of other algorithms (such as search algorithm, search and merge algorithm, merge algorithms) that require input data to be in sorted lists. Sorting is also often useful for Canonicalization, canonicalizing data and for producing human-readable output. Formally, the output of any sorting algorithm must satisfy two conditions: # The output is in monotonic order (each element is no smaller/larger than the previous element, according to the required order). # The output is a permutation (a reordering, yet retaining all of the original elements) of the input. For optimum efficiency, the input data should be stored in a data structure which allows random access ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Batcher Bitonic Mergesort For Eight Inputs
Ken Batcher, full name Kenneth Edward Batcher (December 1935 – August 2019) was an emeritus professor of Computer Science at Kent State University. He also worked as a computer architect at Goodyear Aerospace in Akron, Ohio for 28 years. Early life and education He was born in December 1935 in Queens, New York City, to Lois and Ralph Batcher. He died in August 2019 in Stow Ohio. His parents met at Iowa State University and later relocated to New York City after graduation. His father, Ralph R. Batcher, was the Chief Engineer of The A. H. Grebe Radio Company until its bankruptcy in 1932. He graduated from Brooklyn Technical High School. Batcher graduated from Iowa State University with B.E. degree in 1957. In 1964, Batcher received his Ph.D. in electrical engineering from the University of Illinois. His career and achievements Among the designs he worked on at Goodyear were the: * Massively Parallel Processor (16,384 custom bit-serial processors organized in a SIMD 128 ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Array Data Structure
In computer science, an array is a data structure consisting of a collection of ''elements'' (values or variables), each identified by at least one ''array index'' or ''key''. An array is stored such that the position of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called one-dimensional array. For example, an array of ten 32-bit (4-byte) integer variables, with indices 0 through 9, may be stored as ten words at memory addresses 2000, 2004, 2008, ..., 2036, (in hexadecimal: 0x7D0, 0x7D4, 0x7D8, ..., 0x7F4) so that the element with index ''i'' has the address 2000 + (''i'' × 4). The memory address of the first element of an array is called first address, foundation address, or base address. Because the mathematical concept of a matrix can be represented as a two-dimensional grid, two-dimensional arrays are also sometimes called "matrices". In some cases the term "vector" is used in comp ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Parallel Algorithm
In computer science, a parallel algorithm, as opposed to a traditional serial algorithm, is an algorithm which can do multiple operations in a given time. It has been a tradition of computer science to describe serial algorithms in abstract machine models, often the one known as random-access machine. Similarly, many computer science researchers have used a so-called parallel random-access machine (PRAM) as a parallel abstract machine (shared-memory). Many parallel algorithms are executed concurrently – though in general concurrent algorithms are a distinct concept – and thus these concepts are often conflated, with which aspect of an algorithm is parallel and which is concurrent not being clearly distinguished. Further, non-parallel, non-concurrent algorithms are often referred to as "sequential algorithms", by contrast with concurrent algorithms. Parallelizability Algorithms vary significantly in how parallelizable they are, ranging from easily parallelizable to completely ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sorting Network
In computer science, comparator networks are abstract devices built up of a fixed number of "wires", carrying values, and comparator modules that connect pairs of wires, swapping the values on the wires if they are not in a desired order. Such networks are typically designed to perform sorting on fixed numbers of values, in which case they are called sorting networks. Sorting networks differ from general comparison sorts in that they are not capable of handling arbitrarily large inputs, and in that their sequence of comparisons is set in advance, regardless of the outcome of previous comparisons. In order to sort larger amounts of inputs, new sorting networks must be constructed. This independence of comparison sequences is useful for parallel execution and for implementation in hardware. Despite the simplicity of sorting nets, their theory is surprisingly deep and complex. Sorting networks were first studied circa 1954 by Armstrong, Nelson and O'Connor, who subsequently patented ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Ken Batcher
Ken Batcher, full name Kenneth Edward Batcher (December 1935 – August 2019) was an emeritus professor of Computer Science at Kent State University. He also worked as a computer architect at Goodyear Aerospace in Akron, Ohio for 28 years. Early life and education He was born in December 1935 in Queens, New York City, to Lois and Ralph Batcher. He died in August 2019 in Stow Ohio. His parents met at Iowa State University and later relocated to New York City after graduation. His father, Ralph R. Batcher, was the Chief Engineer of The A. H. Grebe Radio Company until its bankruptcy in 1932. He graduated from Brooklyn Technical High School. Batcher graduated from Iowa State University with B.E. degree in 1957. In 1964, Batcher received his Ph.D. in electrical engineering from the University of Illinois. His career and achievements Among the designs he worked on at Goodyear were the: * Massively Parallel Processor (16,384 custom bit-serial processors organized in a SIMD 128 ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sorting Network
In computer science, comparator networks are abstract devices built up of a fixed number of "wires", carrying values, and comparator modules that connect pairs of wires, swapping the values on the wires if they are not in a desired order. Such networks are typically designed to perform sorting on fixed numbers of values, in which case they are called sorting networks. Sorting networks differ from general comparison sorts in that they are not capable of handling arbitrarily large inputs, and in that their sequence of comparisons is set in advance, regardless of the outcome of previous comparisons. In order to sort larger amounts of inputs, new sorting networks must be constructed. This independence of comparison sequences is useful for parallel execution and for implementation in hardware. Despite the simplicity of sorting nets, their theory is surprisingly deep and complex. Sorting networks were first studied circa 1954 by Armstrong, Nelson and O'Connor, who subsequently patented ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Butterfly Network
A butterfly network is a technique to link multiple computers into a high-speed network. This form of multistage interconnection network topology can be used to connect different nodes in a multiprocessor system. The interconnect network for a shared memory multiprocessor system must have low latency and high bandwidth unlike other network systems, like local area networks (LANs) or internet for three reasons: * Messages are relatively short as most messages are coherence protocol requests and responses without data. * Messages are generated frequently because each read-miss or write-miss generates messages to every node in the system to ensure coherence. Read/write misses occur when the requested data is not in the processor's cache and must be fetched either from memory or from another processor's cache. * Messages are generated frequently, therefore rendering it difficult for the processors to hide the communication delay. Components The major components ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Batcher Odd–even Mergesort
Batcher's odd–even mergesort is a generic construction devised by Ken Batcher for sorting networks of size O(''n'' (log ''n'')2) and depth O((log ''n'')2), where ''n'' is the number of items to be sorted. Although it is not asymptotically optimal, Donald Knuth, Knuth concluded in 1998, with respect to the Sorting network#Optimal sorting networks, AKS network that "Batcher's method is much better, unless ''n'' exceeds the total memory capacity of all computers on earth!" It is popularized by the second ''GPU Gems'' book, as an easy way of doing reasonably efficient sorts on graphics-processing hardware. Pseudocode Various recursive and iterative schemes are possible to calculate the indices of the elements to be compared and sorted. This is one iterative technique to generate the indices for sorting n elements: # note: the input sequence is indexed from 0 to (n-1) for p = 1, 2, 4, 8, ... # as long as p = 1 for j = mod(k,p) to (n-1-k) with a step size of 2k ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Pairwise Sorting Network
The pairwise sorting network is a sorting network discovered and published by Ian Parberry in 1992 in ''Parallel Processing Letters ''Parallel Processing Letters'' is a journal published by World Scientific since 1991. It covers the field of parallel processing, including topics such as design and analysis of parallel and distributed algorithms, parallel programming languages a ...''. The pairwise sorting network has the same size (number of comparators) and depth as the odd–even mergesort network. At the time of publication, the network was one of several known networks with a depth of O(log^2 n). It requires n(\log n)(\log n - 1)/4 + n - 1 comparators and has depth (\log n)(\log n + 1)/2. The sorting procedure implemented by the network is as follows (guided by the zero-one principle): # Sort consecutive pairwise bits of the input (corresponds to the first layer of the diagram) # Sort all pairs into lexicographic order by recursively sorting all odd bits and even bits separa ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]