Shearsort algorithm
How to use
First select the parallel sorting algorithm (Shearsort or Schnorr-Shamir algorithm) you wish to apply by clicking on its box. Then, within the selected box, define and visualize the mesh: select its dimension by the dropdwn menu, either fill it automatically with random 0/1 values or fill in your own 0/1 values and click Show array to view. By clicking Sort, you see the algorithm running.
Why B&W
Both algorithms correctly sort every input sequence. However, all input sequences - no matter what their exact values are - can alwyas be mapped to an appropriately generated sequence of zeros and ones which are visualized here as white and black cells, respectively.
Mesh enclosures
Shearsort is a good choice for small meshes while for big meshes the algorithm by Schnorr-Shamir runs faster deploying a more sophisticated breakdown of the mesh into blocks. As you will probably notice, sometimes your mesh is embedded into a bigger one for facilitating the mesh breakdown into appropriate blocks.
About the app
This game-like interactive web app is intended to serve as assistive material for learning / training purposes regarding the study and analysis of two parallel sorting algorithms for two-dimensional meshes, i.e., the Shearsort algorithm and the '3n sort' algorithm suggested by Schnorr and Shamir.
Shearsort algorithm
Schnorr-Shamir algorithm
Define mesh to display