Skip to content
トライ木
EntityQ387015· pop 26· linked from 247 articles

トライ木

Sign in to save

Also known as digital tree, radix tree, prefix tree

thumb|250px|A trie for keys "A", "to", "tea", "ted", "ten", "i", "in", and "inn". Each complete English word has an arbitrary integer value associated with it.|alt=Depiction of a trie. Single empty circle, representing the root node, points to three children. The arrow to each child is marked by a different letter. The children themselves have similar sets of arrows and child nodes, with nodes that correspond to full words bearing blue integer values. In computer science, a trie (, ), also known as a digital tree or prefix tree, is a specialized search tree data structure used to store and ret

Key facts

Data structure.name
Trie
Data structure.invented_by
Edward Fredkin, Axel Thue, and René de la Briandais
Data structure.caption
corresponds to length of the keys. corresponds to number of the keys.
Data structure.invented_year
1960
Data structure.type
Tree

via Wikipedia infobox

Wikidata facts

Subclass of
search tree
Show 3 more facts
Commons category
Trie
different from
tree
Sources (2)

via Wikidata · CC0

Article · 日本語

トライ木(英: trie)やプレフィックス木(英: prefix tree)とは、順序付き木の一種。あるノードの配下の全ノードは、自身に対応する文字列に共通するプレフィックス(接頭部)があり、ルート(根)には空の文字列が対応している。値は一般に全ノードに対応して存在するわけではなく、末端ノードや一部の中間ノードだけがキーに対応した値を格納している。2分探索木と異なり、各ノードに個々のキーが格納されるのではなく、木構造上のノードの位置とキーが対応している。 キーが文字列である連想配列の実装構造としても使われる。右図の例では、ノードを表す丸の中にキーが書かれ、連想される値がその下に書かれている。値が書かれていないノードはキー文字列の途中までにしか対応していない。各英単語には整数の値が対応している。 トライ木は一種の決定性有限オートマトンと見ることもできるが、エッジ(枝)に対応する記号(文字)はその順序が暗黙のうちに決定される(辞書順など)。 キーは必ずしもノードに格納される必要はない。右図はトライ木の概念を示したもので実装は一般に異なる。 トライ木のキーは必ずしも文字列である必要はない。トライ木のアルゴリズムを文字列以外の任意のデータ構造に適用することは容易である。 trie という名称は "retrieval"(探索、検索)が語源であるため、"tree" と同じ発音を用いる(リトゥリーヴァル)。しかし、ツリー構造との混同を避けるために「トライ」という読み方を奨励する人もいる。日本語では、「トライ木」という呼び方がほぼ定着している。

Abstract from DBpedia / Wikipedia · CC BY-SA

Gallery (6)