I fell across a spreadsheet that explains a method to sort both rows and columns of a matrix that contains binary data so that the number of changes between consecutive rows and cols is minimzed.
For example, starting with:
After 15 manual steps described in the tabs of the spreadsheed, the following table is obtained:
I would like to know:
- what is the common name of this algorithm or method ?
- how to apply it to larger table (where 2^n would overflow...)
- how to generalize it to non binary data, for example using Levenshtein distance ?
- if there is any link to code (Excel VBA, Python, ...) already implementing this (otherwise I'll write it ... )
Thanks !