# c-trie++: A Dynamic Trie Tailored for Fast Prefix Searches

**Authors:** Kazuya Tsuruta, Dominik K\"oppl, Shunsuke Kanda, Yuto, Nakashima, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda

arXiv: 1904.07467 · 2020-10-08

## TL;DR

This paper introduces c-trie++, a dynamic trie data structure optimized for fast prefix searches, offering efficient operations with practical evaluation demonstrating its usefulness in real-world scenarios.

## Contribution

The paper presents c-trie++, a novel dynamic trie data structure that achieves efficient prefix search operations with space and time optimizations, validated through practical experiments.

## Key findings

- Supports locate, prefix search, and update in expected logarithmic time.
- Uses space proportional to total string length and number of strings, optimized for word RAM.
- Practical evaluation confirms efficiency and usefulness for prefix searches.

## Abstract

Given a dynamic set $K$ of $k$ strings of total length $n$ whose characters are drawn from an alphabet of size $\sigma$, a keyword dictionary is a data structure built on $K$ that provides locate, prefix search, and update operations on $K$. Under the assumption that $\alpha = w / \lg \sigma$ characters fit into a single machine word $w$, we propose a keyword dictionary that represents $K$ in $n \lg \sigma + \Theta(k \lg n)$ bits of space, supporting all operations in $O(m / \alpha + \lg \alpha)$ expected time on an input string of length $m$ in the word RAM model. This data structure is underlined with an exhaustive practical evaluation, highlighting the practical usefulness of the proposed data structure, especially for prefix searches - one of the most elementary keyword dictionary operations.

---
Source: https://tomesphere.com/paper/1904.07467