AA-VIZ /

Keyword Tree — Multiple Pattern Matching

Interactive visualizations for Chapter 1 of the Advanced Algorithms notes

Building the Keyword Tree

Enter a comma-separated list of patterns and see the resulting keyword tree. The stats panel shows size (number of edges), height (longest pattern), and maximum fan-out.

Searching with the Keyword Tree

Enter a text and patterns. Step through each starting position to see the descent from the root: active edges light up, non-matching branches are grayed out.


Aho-Corasick Search — Step by Step

Watch the automaton process the text character by character. At each step:

  • Blue node = current position in the automaton
  • Red dashed arrow = failure link followed (when the descent gets stuck)
  • Green nodes = patterns reported (via direct match or output link chain)