Trie

In computer science, a trie, or prefix tree, is an ordered tree data structure that is used to store a dynamic set or associative array where the keys are usually strings. Unlike a binary search tree, no node in the tree stores the key associated with that node; instead, its position in the tree defines the key with which it is associated. All the descendants of a node have a common prefix of the string associated with that node, and the root is associated with the empty string. Values are normally not associated with every node, only with leaves and some inner nodes that correspond to keys of interest. For the space-optimized presentation of prefix tree, see compact prefix tree.

The term trie comes from retrieval. Following the etymology, the inventor, Edward Fredkin, pronounces it /ˈtriː/ "tree". However, it is pronounced /ˈtraɪ/ "try" by other authors.

In the example shown, keys are listed in the nodes and values below them. Each complete English word has an arbitrary integer value associated with it. A trie can be seen as a deterministic finite automaton, although the symbol on each edge is often implicit in the order of the branches.

It is not necessary for keys to be explicitly stored in nodes. (In the figure, words are shown only to illustrate how the trie works.)

Though it is most common, tries need not be keyed by character strings. The same algorithms can easily be adapted to serve similar functions of ordered lists of any construct, e.g., permutations on a list of digits or shapes. In particular, a bitwise trie is keyed on the individual bits making up a short, fixed size of bits such as an integer number or pointer to memory.

Read more about TrieAdvantages Relative To Other Search Algorithms

Other articles related to "trie, tries":

Applications - Compressing Tries
... When the trie is mostly static, i.e ... all insertions or deletions of keys from a prefilled trie are disabled and only lookups are needed, and when the trie nodes are not keyed by node specific data (or if the node's data is common) it is ... fixed enumerable larger set) using a trie keyed by the bit element position within the full set, with the key created from the string of bits needed to ...
Hash Trie
... In computer science, hash trie can refer to A space-efficient implementation of a sparse trie, in which the descendants of each node may be interleaved in memory ... to a closed hash table.) An ordinary trie used to store hash values, for example, in an implementation of a hash tree ... A data structure which "combines features of hash tables and LC-tries in order to perform efficient lookups and updates" ...
Jean Nicolas Pierre Hachette
... Hachette's principal works are Deux Suppléments à la Géométrie descriptive de Monge (1811 and 1818) Éléments de géométrie à trois dimensions (1817 ... (1795 and 1817) Applications de géométrie descriptive (1817) Traité de géométrie descriptive, etc ...
B-trie
... The B-trie is a trie-based data structure that can store and retrieve variable-length strings efficiently on disk ... The B-trie was compared against several high-performance variants of B-tree that were designed for string keys ...
Lucien Godeaux - Works
... Les transformations birationnelles du plan (1927) La Géométrie (1931) Leçons de géométrie projective (1933) Questions non résolues de géométrie algébrique les involutions de l'espace et les variétés ... Transformations birationnelles et géométrie hyperespatielle Géométrie algébrique II ... Géométrie sur une courbe algébrique, du plan (1949) Correspondances entre deux courbes algébriques (1949) Leçons de geometrie analytique à trois dimensions ...