Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7540609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:41:08+00:00 2026-05-30T07:41:08+00:00

I’m reading the block sort algorithm from the Burrows and Wheeler paper. This a

  • 0

I’m reading the block sort algorithm from the Burrows and Wheeler paper.
This a step of the algorithm:

Suppose S= abracadabra

Initialize an array W of N words W[0, … , N – 1], such that W[i] contains the characters S'[i, … , i + k – 1] arranged so that integer comparisons on the words agree with lexicographic comparisons on the k-character strings. Packing characters into words has two benefits: It allows two prefixes to be compared k bytes at a time using aligned memory accesses, and it allows many slow cases to be eliminated

(Note: S' is the original S with k EOF characters appended to it, k being the number of characters that fit in a machine word (I’m in a 32 bits machine, so k=4)

EOF = '$'

Correct me if I’m wrong:

S'= abracadabra$$$$  
W= abra brac raca acad cada adab dabr abra bra$ ra$$ a$$$

Then, the algorithm says you have to sort the suffix array of S (named V), by indexing into
the array W
.

I don’t fully understand how can you sort suffixes by indexing into W.
For example: at some point of the sorting, suppose you get two suffixes, i and j, and you have to compare them. Since you are indexing into W, you are checking 4 characters at the time.
Suppose they have both the same first 4 characters. Then, you would have to check, for each suffix their next 4 characters, and you do it by accessing from the 4th position of each suffix in W.
Is this right? Does this “packing characters into words” really speed things up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:41:09+00:00Added an answer on May 30, 2026 at 7:41 am

    The way you describe it in the question is entirely accurate. And yes, it speeds things up because, like you said, it compares four characters at a time.

    There are two remarks to be made, though:

    1. When you compare suffixes i and j, like in your example, you compare entries W[i] and W[j] indeed. The result of this is the same as if you had lexicographically compared the quadruple of characters S[i..i+3] and S[j..j+3], so you have saved computing time equivalent to three character comparisons. And yes, if the result indicates that the two quadruples are identical, you have to continue comparing W[i+1] and W[j+1], however: You don’t do it right away. The way their algorithm works is that of a radix sort. That is, you put the suffixes into buckets right after the initial comparison (possibly both into the same bucket), and then internally sort the buckets, recursively.
    2. The algorithm described in the original paper by Burrows and Wheeler (from which you cite; there is a copy here for example), which is from 1994, is not the optimal suffix array construction algorithm. Firstly, in 2003 several O(N), direct construction methods were discovered; secondly, since then, many further improvements to the implementation were made. The core of the 1994 paper is the idea of using the Burrows-Wheeler transform as basis for string compression, not the exact way the transform itself is generated.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
Specifically, suppose I start with the string string =hello \'i am \' me And
I am currently running into a problem where an element is coming back from
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.