Explore modules

Shift-And Bit-Parallel Matching

Track all active pattern prefixes with one bitmask while preserving overlapping matches.

Free theory article

Track all active pattern prefixes with one bitmask while preserving overlapping matches.

Concept & interpretation

The Shift-And algorithm is a fast string matching technique that uses bitwise operations to process characters. It builds a nondeterministic finite automaton (NFA) where states represent active pattern prefixes.

Experiment

Explore how overlapping matches are preserved in real-time. Follow these steps:

  1. Open the Shift-And Bit-Parallel Matching module.
  2. Set Text to Alternating (which represents ababa).
  3. Set Pattern to aba.
  4. Set Prefix to Full to process the entire text.
  5. Observe that the Match count correctly shows 2 matches (at index 0 and 2), tracking multiple prefixes simultaneously.
Read the full free theory article