Computing the Burrows-Wheeler transform in place and in small space

Maxime Crochemore, Roberto Grossi, Juha Kärkkäinen, Gad M. Landau

Research output: Contribution to journalArticlepeer-review


We introduce the problem of computing the Burrows-Wheeler Transform (BWT) using small additional space. Our in-place algorithm does not need the explicit storage for the suffix sort array and the output array, as typically required in previous work. It relies on the combinatorial properties of the BWT, and runs in O(n2) time in the comparison model using O(1) extra memory cells, apart from the array of n cells storing the n characters of the input text. We then discuss the time-space trade-off when O(k·σk) extra memory cells are allowed with σk distinct characters, providing an O((n2/k+n)logk)-time algorithm to obtain (and invert) the BWT. For example in real systems where the alphabet size is a constant, for any arbitrarily small ε>0, the BWT of a text of n bytes can be computed in O(nε-1logn) time using just εn extra bytes.

Original languageEnglish
Pages (from-to)44-52
Number of pages9
JournalJournal of Discrete Algorithms
StatePublished - 1 May 2015

Bibliographical note

Funding Information:
A preliminary version of the results in this paper appeared in [6] . The work of the second author has been supported in part by the Italian Ministry of Education, University, and Research ( MIUR ) under PRIN 2012C4E3KT project. The work of the third author has been supported by the Academy of Finland Grant 118653 (ALGODAN). The work of the fourth author has been partially supported by the National Science Foundation Award 0904246 , Israel Science Foundation Grants 347/09 and 571/14 , Yahoo , Grant No. 2008217 from the United States–Israel Binational Science Foundation (BSF) and DFG .

Publisher Copyright:
© 2015 Elsevier B.V. All rights reserved.


  • Burrows-Wheeler transform
  • In-place algorithms
  • String algorithms
  • Suffix sorting

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Discrete Mathematics and Combinatorics
  • Computational Theory and Mathematics


Dive into the research topics of 'Computing the Burrows-Wheeler transform in place and in small space'. Together they form a unique fingerprint.

Cite this