# Summary: 2026-08-12_06-57-08Z_Chain_of_ThoughtShowsthePathtoaTree_RealizingBranc.md Saved: 2026-08-12 22:40 Source: 2026-08-12_06-57-08Z_Chain_of_ThoughtShowsthePathtoaTree_RealizingBranc.md Model: None --- ## Summary Chain‑of‑Thought (CoT) prompting has been shown to lift the expressive power of bounded‑depth Transformers, linking the number of CoT steps to circuit‑complexity classes. However, the paper notes a gap: concrete depth‑bounded constructions for branching complexity are missing, and the traversal procedures required by such characterizations have not been realized. The authors close this gap by providing explicit, hard‑attention decoders with at most two layers that realize both depth‑first search (DFS) and Dijkstra’s algorithm—subsuming breadth‑first search—as a shared computational substrate. These constructions enable the computation of tree metrics in linear steps, establishing a non‑trivial witness for the linear‑step regime of the CoT hierarchy. ## Key Contributions - [Finding 1] The authors construct depth‑bounded CoT realizations of DFS and Dijkstra using hard‑attention decoders limited to two layers. - [Finding 2] They demonstrate that reusing the DFS decoder computes the Strahler number of an \(n\)-vertex tree in \(2n-1\) steps with four layers, while reusing the Dijkstra decoder computes its width in \(n-1\) steps with three layers. - [Finding 3] The constructions handle arbitrary \(n\)-ary trees without layer normalization or positional encodings and provide a linear‑step witness for NC\(^1\) completeness. ## Methodology The methodology centers on using hard‑attention decoders that operate within a fixed depth budget. Each decoder is trained to attend only to the current node’s children, allowing it to traverse the tree in a deterministic order. The DFS decoder follows a recursive left‑to‑right walk, emitting the path as it proceeds; this yields the Dyck‑path representation of an ordered tree. By reusing this same decoder for Dijkstra’s algorithm, the authors obtain breadth‑first behavior with only two layers. All computations are performed on the emitted path, avoiding heavy normalization or encoding overhead. ## Results The main theoretical results are: (1) the DFS decoder computes the Strahler number of any tree in \(2n-1\) steps using four attention layers; (2) the Dijkstra decoder computes the width of an \(n\)-vertex tree in \(n-1\) steps with three layers. Both algorithms run in linear time and achieve a constant‑layer depth, providing concrete evidence that CoT can realize NC\(^1\) circuit complexity. The constructions are independent for both metrics on the Dyck‑path representation. ## Significance These results matter because they bridge theory and practice: they give explicit depth‑bounded CoT implementations for branching algorithms, which were previously only characterized abstractly. By achieving linear‑step computation without normalization or positional encodings, the authors validate the linear‑step regime of the CoT hierarchy and offer efficient tools for tree analysis that can be directly applied in downstream tasks. ## Related Concepts Chain‑of‑Thought prompting, bounded‑depth Transformers, circuit complexity classes (NC\(^1\)), Strahler number, Dijkstra algorithm, depth‑first search, hard‑attention decoders, Dyck paths, \(n\)-ary trees, linear‑step regime, NC\(^1\) completeness. ## Original Paper Reference - [Read the original paper](http://arxiv.org/abs/2608.11716v1)