the example of figure is rather basicbecause it only involves mismatches with the last character of the pattern more generallywhen match is found for that last characterthe algorithm continues by trying to extend the match with the second-to-last character of the pattern in its current alignment that process continues until either matching the entire patternor finding mismatch at some interior position of the pattern if mismatch is foundand the mismatched character of the text does not occur in the patternwe shift the entire pattern beyond that locationas originally illustrated in figure if the mismatched character occurs elsewhere in the patternwe must consider two possible subcases depending on whether its last occurrence is before or after the character of the pattern that was aligned with the mismatched those two cases are illustrated in figure texta pattern(aa + texta pattern(bb - figure additional rules for the character-jump heuristic of the boyer-moore algorithm we let represent the index of the mismatched character in the textk represent the corresponding index in the patternand represent the index of the last occurrence of [iwithin the pattern we distinguish two cases(aj kin which case we shift the pattern by unitsand thusindex advances by units(bj kin which case we shift the pattern by one unitand index advances by units in the case of figure ( )we slide the pattern only one unit it would be more productive to slide it rightward until finding another occurrence of mismatched character [iin the patternbut we do not wish to take time to search for