Linear Time Algorithm
There is a data structure to implement all the sequitur operations in constant time.
- Production rules in an array of doubly linked lists.
- Each production rule has reference count of the number of times used.
- Each nonterminal points to its production rule.
- digrams stored in a hash table for quick lookup.