Skip to content

Radix tree

In computer science, a radix tree (also radix trie or compact prefix tree or compressed trie) is a data structure that represents a space-optimized trie (prefix tree) in which each node that is the only child is merged with its parent.

Core Idea

Radix tree is treated here as the recurring computer science and information systems identity summarized by this source-grounded definition: In computer science, a radix tree (also radix trie or compact prefix tree or compressed trie) is a data structure that represents a space-optimized trie (prefix tree) in which each node that is the only child is merged with its parent. In computer science, a radix tree (also radix trie or compact prefix tree or compressed trie) is a data structure that represents a space-optimized trie (prefix tree) in which each node that is the only.

How would you explain it like I'm…

Squished Word Tree

Imagine a word tree where every word is spelled out one letter per branch. If a branch has only one way to go, you squish those letters together onto one branch. Now the tree is smaller, but you can still find every word by following the branches.

Shortcut Letter Tree

A trie is a tree for storing words where each step down follows one letter, so words with the same beginning share the same branch. A radix tree is a squeezed trie: whenever a spot has only one way to go, it gets glued to the spot above it. Then one branch can hold a whole chunk of letters, like 'ing', instead of one letter. This saves space, especially when the words are long or share long beginnings.

Compressed Prefix Tree

A radix tree (also called a compressed trie or compact prefix tree) is a space-saving version of a trie, the tree that stores strings by following their characters from the root. Whenever a node has exactly one child, the two are merged, so edges can be labeled with whole sequences of characters rather than single ones. This makes it especially efficient when there are only a few strings, when the strings are long, or when many strings share long beginnings. Lookups compare the key piece by piece as you walk down, instead of comparing whole keys from the start the way an ordinary search tree does. The radix sets how big each compared piece is; with radix 2 each step looks at one bit.

 

A radix tree (radix trie, compact prefix tree, compressed trie) is a space-optimized trie in which every node that is the only child of its parent is merged into that parent. Because of this path compression, edges are labeled with sequences of elements rather than single elements, and chains of non-branching nodes disappear. The number of children of any internal node is bounded by the radix r, which is a power of two. Search proceeds by comparing the key chunk by chunk, where the chunk size at a node is determined by the radix, unlike comparison-based trees that compare whole keys from the start until they differ. The structure pays off for small sets, for long keys, and for key sets with long shared prefixes. Choosing r = 2 gives a binary radix trie that inspects one bit per level: it minimizes sparseness of nodes but maximizes depth, apart from the compression of non-diverging bit runs.

Scope of Application

  • Applications. They find particular application in the area of IP routing, where the ability to contain large ranges of values with a few exceptions is particularly suited to the hierarchical organization of.

  • Applications. They are also used for inverted indexes of text documents in information retrieval.

  • Comparison to other data structures. A reversible mapping to strings can be used to produce the required total ordering for balanced search trees, but not the other way around.

  • Variants. A common practice is to relax the criteria of disallowing parents with only one child in situations where the parent represents a valid key in the data set.

  • Variants. This variant of radix tree achieves a higher space efficiency than the one which only allows internal nodes with at least two children.

Clarity

A clear use of Radix tree names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is In computer science, a radix tree (also radix trie or compact prefix tree or compressed trie) is a data structure that represents a space-optimized trie (prefix tree) in which each node that is the only child is merged with its parent.

Manages Complexity

Radix tree compresses multiple computer science and information systems details into a stable diagnostic relation. The source shows both the central mechanism—this makes possible to add a large range of strings with a common prefix to the tree, using white nodes, then remove a small set of "exceptions" in a space-efficient manner by inserting them using black nodes.—and the practical consequence—practical Algorithm Template Library, a C++ library.

Abstract Reasoning

  1. Type the carrier. Identify the computer science and information systems entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: In computer science, a radix tree (also radix trie or compact prefix tree or compressed trie) is a data structure that represents a space-optimized trie (prefix tree) in which each node that is the only child is merged with its parent.
  3. Check operation and conditions.

Knowledge Transfer

Within the home domain. Knowledge about Radix tree transfers literally when a new case preserves the same carrier type, relation, and recognition test. They find particular application in the area of IP routing, where the ability to contain large ranges of values with a few exceptions is particularly suited to the hierarchical organization of IP addresses. They are also used for inverted indexes of text documents in information retrieval. Beyond the home domain. No canonical parent is asserted for Radix tree.

Relationships to Other Abstractions

Local relationship map for Radix treeParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Radix treeDOMAINDomain-specific abstraction: Suffix Tree — is a kind ofSuffix TreeDOMAIN

Current abstraction Radix tree Domain-specific

Foundational — no parent edges in the catalog.

Children (1) — abstractions linked here by typed relations

  • Suffix Tree Domain-specific is a kind of Radix tree

    A suffix tree is a path-compressed trie specialized to the set of all suffixes of one text.

Neighborhood in Abstraction Space

Radix tree sits in a sparse region of the domain-specific corpus (79th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Data Structures & Graph Variants (18 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14