|
|
|
|
|
by foobarian
257 days ago
|
|
I think what did it for me is to recognize that the last column has characters that, for each row, come before the characters in the first column (since they are rotations). So we can view the last column as coming "before" the first one. 1. We sorted the first column to get the BWT column. Thereby we created the structure where the BWT column comes before the sorted column. 2. Therefore if we insert the BWT column before a sorted column, the order of row elements is preserved 3. If we now sort again, the order of characters across individual rows is again preserved 4. Going to step 2 again preserves row order 5. Once all columns are populated, therefore all rows are in the correct original order. And thanks to the end marker we can get the original string from any row. |
|