METHOD: BOYERS-MOORE PATTERN MATCH
Text: abbabbabdabc
Pattern: abc
Use Boyers Moore
NOTE: it should be done by hand, do not
write or run a program.
See the following example to have a reference for the method
(Boyers-Moore Pattern Match) and the instructions. Please,
answer the question based on that format and clearly indicate which
letter should line up with each letter.
BOYERS-MOORE PATTERN MATCHING ******** when comparison fails ALIGN-----IF NOT IN P SHIFT 3 NOTE COMPARE FTARTING FROM RIGHT END OF P TEXT T is ABBCABCBB PATTERN P is ABC ABBCABCBB X ABC ABBCABCBB ALIGN P B WITH SECOND B IN T XII ABC ABBCABCBB CAN'T ALIGN SO MOVE 1 TO RIGHT X ABC ABBCABCBB ALIGN WITH A LINE UP THE A's) || | ABC ABBCABCBB MOVE 1 TO RIGHT ||| ABC ABBCABCBB ALIGN WITH B X ABC ABBCABCBB X ABC
METHOD: BOYERS-MOORE PATTERN MATCH Text: abbabbabdabc Pattern: abc Use Boyers Moore NOTE: it should be done by hand, do
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
METHOD: BOYERS-MOORE PATTERN MATCH Text: abbabbabdabc Pattern: abc Use Boyers Moore NOTE: it should be done by hand, do
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!