Tony wrote:
> The particular problem stems from a particularly efficient method of
> string searching (at least it's efficient as an imperative algorithm)
> which involves analysing the pattern string to find out the last
> position in the pattern where each letter of the 'alphabet' appears and
> make an array of such positions indexed on the letters of the alphabet.
I am not sure what kind of string searching you are refering
to but you may probably find this paper relevant.
Richard S. Bird, Jeremy Gibbons and Geraint Jones (1989).
Formal Derivation of a Pattern Matching Algorithm.
Science of Computer Programming, 12(2):93-104.
sincerely,
Shin-Cheng Mu