News

Assignment 01

Written on 26.04.2024 10:49 by Jens Zentgraf

Dear all,

there was an error on task 4 in assignment 01. 

If you use more than one character, you cannot skip the last characters in the pattern. 
For P=BAAAAB and l=2 we would skip AB and if we see AB in the text we would do a shift of the pattern length 6.

BAAAAB
BAAAABAAAABAAA    shift based on AB 

      BAAAAB
BAAAABAAAABAAA    We miss the second hit.

To deal with this, you have to check if a part of the suffix (of length l) of the pattern is a prefix of the pattern. (Does the end overlap the start of the pattern). Then you have to adapt the shift for all suffixes for which this is the case.

I uploaded a new assignment in which you can find the shifts for P=BAAAAB for l=1,2,3.

If you have questions, do not hesitate to ask in the forum.

Best 
Jens
 

Privacy Policy | Legal Notice
If you encounter technical problems, please contact the administrators.