Table of Contents
Fetching ...

The Li-Chao Tree: Algorithm Specification and Analysis

Chao Li

TL;DR

This paper provides the definitive formalization of the Li-Chao tree, serving as both the official specification and an expansion of the original lecture.

Abstract

The Li-Chao tree (LICT) was first introduced in lecture as an efficient data structure for dynamic lower envelope maintenance. In the years since, it has achieved widespread adoption within the competitive programming community, yet no formal specification has appeared in the peer-reviewed literature. This paper provides the definitive formalization of the Li-Chao tree, serving as both the official specification and an expansion of the original lecture. We present complete algorithmic specifications, establish formal correctness proofs, analyze theoretical complexity, and provide empirical performance characterization. The LICT offers distinct advantages in implementation simplicity, numerical stability, and extensibility to advanced variants such as persistence and line segments.

The Li-Chao Tree: Algorithm Specification and Analysis

TL;DR

This paper provides the definitive formalization of the Li-Chao tree, serving as both the official specification and an expansion of the original lecture.

Abstract

The Li-Chao tree (LICT) was first introduced in lecture as an efficient data structure for dynamic lower envelope maintenance. In the years since, it has achieved widespread adoption within the competitive programming community, yet no formal specification has appeared in the peer-reviewed literature. This paper provides the definitive formalization of the Li-Chao tree, serving as both the official specification and an expansion of the original lecture. We present complete algorithmic specifications, establish formal correctness proofs, analyze theoretical complexity, and provide empirical performance characterization. The LICT offers distinct advantages in implementation simplicity, numerical stability, and extensibility to advanced variants such as persistence and line segments.
Paper Structure (23 sections, 6 theorems, 8 equations, 4 figures, 2 tables, 3 algorithms)

This paper contains 23 sections, 6 theorems, 8 equations, 4 figures, 2 tables, 3 algorithms.

Key Result

Lemma 1

Let $f(x) = k_1 x + b_1$ and $g(x) = k_2 x + b_2$ be linear functions. If $f(a) \leq g(a)$ and $f(b) \leq g(b)$ for $a \leq b$, then $f(x) \leq g(x)$ for all $x \in [a, b]$.

Figures (4)

  • Figure 1: Interval Advantage Line Diagram. Line $A$ wins at the midpoint and is stored; Line $B$ (the loser) is routed to the left child where it may be optimal.
  • Figure 2: Tree structure before inserting $f_{new}(x) = -x + 10$. Currently stores $f_0(x)=x$ at root, $f_1(x)=2x-4$ at $[0,4]$, and $f_2(x)=0.5x+2$ at $[4,8]$.
  • Figure 3: Tree structure after inserting $f_{new}(x) = -x + 10$. At $[4,8]$, $f_{new}(6)=4 < f_2(6)=5$, so $f_{new}$ swaps in and $f_2$ is displaced to $[4,6]$.
  • Figure 4: Query Tree View. To query at $x=5$, we follow the path $[0,8] \to [4,8] \to [4,6]$. We evaluate each stored line along the path ($f_0$, $f_{new}$, and $f_2$) and return the minimum.

Theorems & Definitions (14)

  • Definition 1: Li Chao Tree
  • Definition 2: Coordinate Universe
  • Lemma 1: Linear Domination
  • proof
  • Lemma 2: Routing Dominance
  • proof
  • Theorem 1: Query Correctness
  • proof
  • Lemma 3: Segment Insertion Correctness
  • proof
  • ...and 4 more