which ▁means ▁there ▁is ▁a ▁match ) ▁or ▁a ▁mismatch ▁occurs ▁upon ▁which ▁the ▁alignment ▁is ▁shift ed ▁forward ▁( to ▁the ▁right ) ▁according ▁to ▁the ▁maximum ▁value ▁permitted ▁by ▁a ▁number ▁of ▁rules . ▁The ▁compar isons ▁are ▁performed ▁again ▁at ▁the ▁new ▁alignment , ▁and ▁the ▁process ▁repe ats ▁until ▁the ▁alignment ▁is ▁shift ed ▁past ▁the ▁end ▁of ▁, ▁which ▁means ▁no ▁further ▁matches ▁will ▁be ▁found . ▁ ▁The ▁shift ▁rules ▁are ▁implemented ▁as ▁constant - time ▁table ▁look ups , ▁using ▁tables ▁generated ▁during ▁the ▁pre processing ▁of ▁. ▁ ▁Sh ift ▁rules ▁A ▁shift ▁is ▁calculated ▁by ▁applying ▁two ▁rules : ▁the ▁bad ▁character ▁rule ▁and ▁the ▁good ▁suffix ▁rule . ▁The ▁actual ▁sh ifting ▁offset ▁is ▁the ▁maximum ▁of ▁the ▁sh ifts ▁calculated ▁by ▁these ▁rules . ▁ ▁The ▁bad ▁character ▁rule ▁ ▁Description ▁Dem on str ation ▁of ▁bad ▁character ▁rule ▁with ▁pattern ▁N NA A MAN . ▁ ▁The ▁bad - character ▁rule ▁cons iders ▁the ▁character ▁in ▁ ▁at ▁which ▁the ▁comparison ▁process ▁failed ▁( ass uming ▁such ▁a ▁failure ▁occurred ). ▁The ▁next ▁occurrence ▁of ▁that ▁character ▁to ▁the ▁left ▁in ▁ ▁is ▁found , ▁and ▁a ▁shift ▁which ▁brings ▁that ▁occurrence ▁in ▁line ▁with ▁the ▁mismatch ed ▁occurrence ▁in ▁ ▁is ▁proposed . ▁If ▁the ▁mismatch ed ▁character ▁does ▁not ▁occur ▁to ▁the ▁left ▁in ▁, ▁a ▁shift ▁is ▁proposed ▁that ▁moves ▁the ▁entire ty ▁of ▁ ▁past ▁the ▁point ▁of ▁mismatch . ▁ ▁Pre processing ▁Method s ▁vary ▁on