A trie is a rooted tree used for storing associative arrays where keys are usually strings. Edges are often labeled by individual symbols. Then common prefixes are factorized. Each node of the trie is associated with a prefix of a string of the set of strings: concatenation of the labels of the path from the root to the node. The root is associated with the empty string. Strings of the set are stored in terminal nodes (leaves) but not in internal nodes. A trie can be seen as a deterministic finite automaton.
Internal nodes have at least two children.
Edges outgoing an internal node are labeled by strings starting with different symbols.
Tries were first recommended by de la Briandais . The word “trie” comes from...
- 2.de la Briandais R. File searching using variable length keys. In: Proceedings of the Western Joint Computer Conference; 1959. p. 295–8.Google Scholar
- 6.Knuth DE. The art of computer programming. Volume 3: sorting and searching. 3rd ed. Addison-Wesley, Reading; 1997. Section 6.3: digital searching, p. 492–512.Google Scholar