Solution

ID: past-exam-of-the-mathematical-and-computational-biology-course-of-the-university-of-cambridge/2025/paper-2/1/a/solution

A cyclic rotation moves the first character to the end without changing the cyclic order of the remaining characters. Starting with the specified terminator-first row and repeatedly rotating left gives the following matrix; its row order is only a construction order, not a sorting order:
Under lexicographic order, compare characters from left to right, using . The sorted cyclic rotation matrix is therefore
The Burrows-Wheeler transform is the last column, read downwards, so the transformed string is

New to topics? Read the docs here!