compute the prefix function for the pattern ababbabbabbababbabb