We consider the problem of developing algorithms for the recognition of a fixed pattern within a permutation. These methods are based upon using a carefully chosen chain or tree of subpatterns to build up the entire pattern. Generally, large improvements over brute force search can be obtained. Even using on-line versions of these methods provides such improvements, though these are often not as great as for the full method. Furthermore, by using carefully chosen data structures to fine tune the methods, we establish that any pattern of length 4 can be detected in O(n log n) time. We also improve the complexity bound for detection of a separable pattern from O(n6 ) to O(n5 log n). Keywords pattern containment, permutations
Michael H. Albert, Robert E. L. Aldred, Mike D. At