The likely cause of misapprehension here is the persistent use of "character" in any description of a string search algorithm one is likely to come across. Which is easy to confuse with a character type, or byte, as programmers might call it. A symbol might be more appropriate, because those algorithms operate on abstract alphabets.
If one were to implement unmodified B-M on bitstrings, the "characters" would be individual bits. The bad character shift table would have two slots, for '0' and for '1'. Practical value of such arrangement is nil. But the algorithms can be augmented to handle multiple "characters" at a time, and this is when they become lucrative.
In reply to Re: Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
by Anonymous Monk
in thread Why Boyer-Moore, Horspool, alpha-skip et.al don't work for bit strings. (And is there an alternative that does?)
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |