Sorting networks are an interesting class of parallel sorting algorithms with applications in multi-processor computers and switching networks.
(a) A comparator can be added on a sorting network at
(i) the end,
(ii) the front, or
(iii) anywhere.
Explain whether the resulting network is a sorting network.
(b) The following figure is a sorting network with six wires. Justify that if all the comparators between 3rd and 4th wires are removed from the sorting network, then the resulting network would not be a sorting network
Sample Solution.