I'm trying to create sorting networks that perform a k-sort. For example, to extract the 4 largest values out of a pool of 8 values, with the specific order of those 4 values not being relevant.
A straightforward and minimal solution for k=4 out of 8 is a single-layer network ((0,4),(1,5),(2,6),(3,7)); however, for different values of k and numbers of channels, this might not be trivial.
I've experimented with the idea of using a postfix where the first 4 elements are sorted separately from the other 4 elements. However, such a postfix doesn't yield anything close to a single-layer network.
Q: Have you ever considered these k-sort networks, and could they be generated by Sorter Hunter? Even hints would be appreciated.
I'm trying to create sorting networks that perform a k-sort. For example, to extract the 4 largest values out of a pool of 8 values, with the specific order of those 4 values not being relevant.
A straightforward and minimal solution for k=4 out of 8 is a single-layer network ((0,4),(1,5),(2,6),(3,7)); however, for different values of k and numbers of channels, this might not be trivial.
I've experimented with the idea of using a postfix where the first 4 elements are sorted separately from the other 4 elements. However, such a postfix doesn't yield anything close to a single-layer network.
Q: Have you ever considered these k-sort networks, and could they be generated by Sorter Hunter? Even hints would be appreciated.