International Journal of Scientific & Engineering Research Volume 3, Issue 4, April-2012 1
ISSN 2229-5518
IJSER © 2012
http://www.ijser.org
A Proposed Solution for Sorting Algorithms
Problems by Comparison Network Model of
Computation.
Mr. Rajeev Singh, Mr. Ashish Kumar Tripathi, Mr. Saurabh Upadhyay, Mr.Sachin Kumar Dhar Dwivedi
Abstract:-In this paper we have proposed a new solution for sorting algorithms. In the beginning of the sorting algorithm for serial computers (Random access
machines, or RAM’S) that allow only one operation to be executed at a time. We have investigated sorting algorithm based on a comparison network model of
computation, in which many comparison operation can be performed simultaneously.
Index Terms
Sorting algorithms, comparison network, sorting network, the zero one principle, bitonic sorting network
1 Introduction
There are many algorithms for solving sorting algorithms
(networks).A sorting network is an abstract mathematical model
of a network of wires and comparator modules that is used to sort
a sequence of numbers. Each comparator connects two wires and
sorts the values by outputting the smaller value to one wire and
the large to the other. A sorting network consists of two items
comparators and wires .each wires carries with its values and each
comparator takes two wires as input and output. This
independence of comparison sequences is useful for parallel
execution of the algorithms. Despite the simplicity of the model,
sorting network theory is surprisingly deep and complex.
A sorting algorithm is an algorithm that puts elements of a list in
a certain order. The most-used orders are numerical order
Efficient sorting is important for optimizing the use of other
algorithms that require sorted lists to work correctly; it is also
often useful for data and for producing human-readable output.
More formally, the output must satisfy two conditions:
1.1 The output is in no decreasing order (each element is no
smaller than the previous element according to the
desired total order);
1.2 The output is a permutation, or reordering, of the input.
For example of bubble sort 8, 25,9,3,6
We can easily construct a network of any size recursively using
the principles of insertion and selection. Assuming we have a
sorting network of size n, we can construct a network of size n +
1 by "inserting" an additional number into the already sorted
subnet . We can also accomplish the same thing by first
"selecting" the lowest value from the inputs and then sort the
remaining values recursively (using the principle behind bubble
sort).
8 8 8 3 3
25 25 9 9 3 8 6 6
9 25 3 9 6 8
3 25 6 9
6 25
1
2
3
4
5
n-1
n
n+1
N wire sorting
Network