Treedepth Calculator

elimination tree depth

CalculatorsFreeNo Signup
4.4(65 reviews)
All Tools

Loading tool...

About Treedepth Calculator

A treedepth calculator computing td(G): minimum depth of a DFS tree of a supergraph H ⊇ G. Equivalently: minimum height of an elimination tree. td ≥ pw+1 ≥ tw+1. td = ⌈log₂ n⌉ for paths. Bounded td = bounded expansion classes. Client-side.

Treedepth Calculator Features

  • td(G)
  • DFS depth
  • ≥pw+1
  • log n paths
  • Common graphs
Treedepth td(G): min height of elimination tree (or DFS tree of supergraph). td ≥ pw+1 ≥ tw+1. Paths: td = ⌈log₂(n+1)⌉. Stars: td = 2. Trees: td = O(log n). Captures how deeply nested the graph structure is.

How to Use

Select graph:

  • td: Treedepth
  • Elim: Elimination tree
  • pw: Compare

Elimination Trees

Eliminate vertices one by one, adding edges between remaining neighbors. The order defines a rooted forest. Treedepth = min height over all elimination orderings. Captures recursion depth of divide-and-conquer.

Key Bounds

td ≥ pw+1 (treedepth dominates pathwidth). td ≤ n (trivially). For paths: td = ⌈log₂(n+1)⌉ (binary decomposition). For trees: td ≤ 1 + log₂ n. Small td ⟹ many algorithmic benefits (quantifier elimination).

Step-by-Step Instructions

  1. 1Select graph.
  2. 2Build elim. tree.
  3. 3Minimize height.
  4. 4Compare with pw.
  5. 5Check bounds.

Treedepth Calculator — Frequently Asked Questions

How is treedepth different from treewidth?+

Treewidth: width of optimal tree decomposition (how fat). Treedepth: depth of optimal elimination tree (how deep). td ≥ tw+1. Treedepth is stronger and more restrictive. Like depth vs breadth.

Why ⌈log₂ n⌉ for paths?+

Optimal: pick the middle vertex (depth 1), recurse on two halves. Binary search! Each half has half the vertices. Depth = ⌈log₂(n+1)⌉. This is tight — can't do better for paths.

What are applications of bounded treedepth?+

Quantifier elimination in first-order logic. Bounded expansion theory. Efficient parallel algorithms (shallow recursion). Sparse linear algebra. Many problems become not just FPT but even in NC (parallel).

Share this tool: