Given the sequence of symbols A (contains ~10'000) and sequence of blocks B (contains ~3'000 blocks, ~30 symbols inside each block) I need to exclude some blocks from sequence B so that symbols inside sum of blocks from B will be equal to A. Blocks cannot be modified or replaced, they have fixed position in sequence.
I'm looking for some computation efficient method to solve this problem as Levenshtein distance looks too expensive for this task.