Abstract 1 Introduction 2 Preliminaries 3 Complexity of computing the Strahler number 4 Strahler number of derivation trees 5 Open problems References

On the Complexity of Computing Strahler Numbers

Moses Ganardi ORCID University of Kaiserslautern-Landau (RPTU), Germany Markus Lohrey ORCID Universität Siegen, Germany
Abstract

It is shown that the problem of computing the Strahler number of a binary tree given as a term is complete for the circuit complexity class uniform 𝖭𝖢1. For several variants, where the binary tree is given by a pointer structure or in a succinct form by a directed acyclic graph or a tree straight-line program, the complexity of computing the Strahler number is determined as well. The problem, whether a given context-free grammar in Chomsky normal form produces a derivation tree (resp., an acyclic derivation tree), whose Strahler number is at least a given number k is shown to be 𝖯-complete (resp., 𝖯𝖲𝖯𝖠𝖢𝖤-complete).

Keywords and phrases:
Strahler number, circuit complexity classes, context-free grammars
Copyright and License:
[Uncaptioned image] © Moses Ganardi and Markus Lohrey; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Circuit complexity
; Theory of computation Grammars and context-free languages
Related Version:
Full Version: https://arxiv.org/abs/2512.19060 [29]
Editors:
Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim Thắng

1 Introduction

Strahler numbers.

The main topic of this paper is the complexity of computing Strahler numbers of binary trees. The Strahler number of a binary tree t is a parameter 𝗌𝗍(t) that can be defined recursively as follows:

  • If t consists of a single node then 𝗌𝗍(t)=0.

  • If the root of t has the left (resp., right) subtree t1 (resp., t2) then

    𝗌𝗍(t)={𝗌𝗍(t1)+1if 𝗌𝗍(t1)=𝗌𝗍(t2),max{𝗌𝗍(t1),𝗌𝗍(t2)}if 𝗌𝗍(t1)𝗌𝗍(t2). (1)

The Strahler number is sometimes also called the Horton-Strahler number and first appeared in the area of hydrology, where Horton used it in a paper from 1945 [37] to define the order of a river. The correspondence to binary trees comes from the fact that a system of joining rivers can be viewed as a binary tree (unless there are bifurcations, where a river splits into two streams). In 1952, Strahler [53] (also a hydrologist) further developed Horton’s ideas.

There are numerous applications of Strahler numbers in computer science, where they appeared also under different names (e.g., register function, tree dimension). Ershov [23] showed that the minimal number of registers needed to evaluate an arithmetic expression is exactly the Strahler number of the syntax tree of the arithmetic expression. Another area, where Strahler numbers found many applications, is formal language theory [12, 20, 33, 51]. For context-free grammars, the relation comes from the following fact: Let G be a context-free grammar in Chomsky normal form and let t be a derivation tree of G. Then 𝗌𝗍(t)+1 is exactly the minimal index among all derivations corresponding to t, where the index of a derivation S=w0Gw1Gw2GGwn is the maximal number of nonterminals in one of the wi [33]. Finite-index context-free grammars [3], i.e., grammars where every produced word has a derivation of bounded index, play an important role in the recent decidability proof of the reachability problem in one-dimensional pushdown VASS [7]. Strahler numbers have been also investigated in the context of Newton iteration [24, 46], parity games [16], and social networks [1]. The distribution of the Strahler number of a random tree has been studied by several authors [17, 18, 26, 39, 42]. For more information on Strahler numbers and their applications in computer science, the reader may consult the surveys [25, 56].

The above mentioned applications naturally lead to the question for the precise complexity of computing the Strahler number of a given tree. This problem has a straightforward linear time algorithm: simply compute the Strahler number for all subtrees bottom-up using the definition of the Strahler number. A straightforward recursive algorithm can be implemented on a deterministic Turing machine, running in logspace and polynomial time and equipped with an auxiliary stack, which puts the problem in the class 𝖫𝗈𝗀𝖣𝖢𝖥𝖫𝖭𝖢2𝖣𝖲𝖯𝖠𝖢𝖤(log2n) [54]. In particular, Strahler numbers can be computed in polylogarithmic time with polynomially many processors. Alternatively, one can implement a recursive evaluation in 𝒪(lognloglogn) space. To do so, one uses the fact that the Strahler number of a binary tree with n leaves is bounded by log2(n), and hence its bit length is 𝒪(loglogn). To the best of our knowledge, the precise complexity of computing Strahler numbers has not been pinpointed yet.

Contributions.

Our first goal is to pinpoint the precise parallel complexity of computing the Strahler number. As explained above, the problem belongs to 𝖭𝖢, but the existence of a logspace algorithm for instance is by no means obvious. Formally, we consider the decision problem, asking whether 𝗌𝗍(t)k for a given tree t and a given number k. We show that this problem is 𝖭𝖢1-complete if t is given in term representation.111For instance, bbaabaa (or b(b(a,a),b(a,a)) with brackets) is the term representation of a complete binary tree of height 2, where b denotes an inner node and a denotes a leaf. Recall that 𝖭𝖢1 is the class of all problems that can be solved by a uniform222All circuit complexity classes refer to their uniform variants in this paper. In Section 2.2 we will say more about uniformity. family of bounded fan-in circuits of polynomial-size and logarithmic depth, which is a subclass of deterministic logarithmic space (𝖫 for short). If the term t is given as a pointer structure, i.e., by an adjacency list or matrix, then checking 𝗌𝗍(t)k is complete for deterministic logspace (𝖫 for short).

As a corollary, one can compute in 𝖭𝖢1 from a given arithmetic expression e (given in term representation) an optimal straight-line code, i.e., a sequence of statements x:=yz for registers x,y,z and an elementary arithmetic operation . Here, optimal means that the number of used registers is minimal. For this, one has to compute the Strahler number of every subexpression of e; see also [25, Section 2].

Let us give a high level idea of the 𝖭𝖢1-membership proof. The first step is to “balance” the input tree t by computing a so-called tree straight-line program (TSLP) for t, whose depth is logarithmic in the size of t. This can be done in 𝖳𝖢0 by a result from [28]. Roughly speaking, a TSLP is a recursive decomposition of a tree into subtrees and so-called contexts (subtrees, where a smaller subtree is removed). Originally, TSLPs were introduced as a formalism for grammar-based tree compression; see [44] for more details. The next step is to convert the TSLP for t into a bounded fan-in Boolean circuit, that decides whether 𝗌𝗍(t)k. Furthermore, the polynomial size and logarithmic depth of the TSLP should be preserved to obtain an 𝖭𝖢1 upper bound. A straightforward construction only leads to such a Boolean circuit with unbounded fan-in OR-gates. We obtain a bounded fan-in circuit by carefully analyzing the unary linear term functions computed by contexts when binary nodes are interpreted according to (1).

For the 𝖭𝖢1-hardness, we show that the Boolean formula problem, which is one of the best known 𝖭𝖢1-complete problems [9], can be reduced to the problem of computing the Strahler number of a tree given in term representation. A similar reduction from the monotone circuit value problem shows that the computation of the Strahler number is 𝖯-complete when the input tree is given succinctly by a directed acyclic graph (DAG) or a TSLP.

We also consider the problem of checking 𝗌𝗍(t)k for a fixed value k that is not part of the input (the input only consists of the tree t). If t is given in term representation (resp., pointer representation) then this problem is 𝖳𝖢0-complete for all k4 (resp., 𝖫-complete for all k3). Moreover, if t is given by a DAG, then this problem belongs to 𝖴𝖫𝖼𝗈𝖴𝖫 for all k (𝖴𝖫 is unambiguous logspace), whereas for TSLP-represented trees the problem is 𝖭𝖫-complete for all k2.

In Section 4 we briefly report on some results concerning the maximal Strahler number of derivation trees of a given context-free grammar in Chomsky normal form (CNF). It is known to be undecidable, whether every word produced by a given context-free grammar has a derivation tree of Strahler number at most a given bound k [34, Theorem 5]. Here, we are interested in the question, whether a given CNF-grammar G produces at least one derivation tree t with 𝗌𝗍(t)k for a given number k. In the long version [29] we show that this problem is 𝖯-complete. Finally, we also consider the restriction to acyclic derivation trees. A derivation tree is called acyclic if there is no nonterminal that appears more than once on a path in the derivation tree. The motivation for this restriction comes from the recent paper [45], where it was shown that the intersection non-emptiness problem for a given list of group DFA333A group DFA is a deterministic finite automaton, where for every input letter a the a-labelled transitions induce a permutation of the set of states. plus a single context-free grammar is 𝖯𝖲𝖯𝖠𝖢𝖤-complete. For general DFA, this problem is 𝖤𝖷𝖯𝖳𝖨𝖬𝖤-complete [55]. Moreover, if the context-free grammar G is such that for some constant k, all acyclic derivation trees of G have Strahler number at most k, then the intersection problem (with the finite automata restricted to group DFA) is 𝖭𝖯-complete. In [45], it was shown that the problem whether a given CNF-grammar has an acyclic derivation tree of Strahler number at least k is in 𝖭𝖯, when k is a fixed constant. In the long version [29] we show that the problem is 𝖭𝖯-complete already for k=2. Finally, when k is part of the input, we show that the problem becomes 𝖯𝖲𝖯𝖠𝖢𝖤-complete.

Broader context: tree evaluation and tree balancing.

The problem of computing the Strahler number of a given tree is a special instance of a tree evaluation problem: The input is a rooted tree where each leaf is labelled with a value from a domain A, and each inner node carries a (suitably specified) function f:ArA where r is the number of its children. The goal is to compute the value of the root, obtained by evaluating the functions at each node from bottom to top. For the case of Strahler numbers we have A=, every leaf is labelled with 0 and there is only one binary operation implicitly defined by (1) (or explicitly by (2) on page 2.1). The corresponding algebra will be called the Strahler algebra.

Other prominent examples are the evaluation problems for Boolean formulas such as (10)1 and arithmetic expressions over the natural numbers (or other rings) such as (1+2)×(3+4). Boolean formula evaluation is 𝖭𝖢1-complete [9]. In fact, the acceptance problem of a fixed tree automaton or, equivalently, evaluating an expression over a fixed finite algebra is known to be in 𝖭𝖢1 for every finite algebra [28, 43]. By an algebra, we simply mean a set equipped with a set of finitary operations. More surprisingly, arithmetic expressions can be evaluated in deterministic logspace [6, 10, 11] despite the fact that the value of an expression may have polynomially many bits in terms of the size of the expression.

Any algorithm that performs a bottom-up computation over a tree can be seen as an instance of tree evaluation, assuming that the local computation at each node is sufficiently simple. A classical example is Courcelle’s theorem, stating that any monadic second-order (MSO) definable graph property Φ can be checked in linear time over graphs of bounded tree-width [15]. The standard proof of Courcelle’s theorem compiles the MSO formula Φ into a tree automaton 𝒜Φ that, given a tree decomposition of a graph G, verifies whether Φ holds in G. As remarked above, tree automata can be simulated in 𝖭𝖢1𝖫, and therefore Courcelle’s theorem also holds when linear time is replaced by logspace [21] (assuming the logspace version of Bodlaender’s theorem for computing small-width tree decompositions; see [21]). In fact, [21] proves a more powerful solution histogram version of Courcelle’s theorem, which, in the end, reduces to evaluating arithmetic expressions.

Very recently, the tree evaluation problem attracted new attention due to a surprising result by Cook and Mertz [13]. They presented an algorithm that evaluates a complete binary tree of height h, whose inner nodes are labelled with binary operations over {1,,k} and whose leaves are labelled with elements from {1,,k}, in space 𝒪(hloglogk+logk). A straightforward evaluation takes 𝒪(hlogk) space. Since the height h is logarithmic in the total input size n, the Cook-Mertz algorithm uses 𝒪(lognloglogn) space, which comes very close to 𝒪(logn) space. It is also a key ingredient in Ryan Williams’ recent proof that any t-time bounded Turing machine can be simulated in 𝒪(tlogt) space [58]. Notice that the Cook-Mertz algorithm does not give any nontrivial space bounds for the computation of the Strahler number of a tree t, since the height of t can be linearly large in its size.

A standard strategy to evaluate a tree t of size n using small space or in parallel polylogarithmic time is to first balance t, i.e., to transform it into an equivalent tree of depth 𝒪(logn) and size 𝗉𝗈𝗅𝗒(n). In a second step, the reduced depth can often be exploited to evaluate the tree in parallel or in small space. For example, to evaluate a balanced arithmetic expression in logspace, one can use a result by Ben-Or and Cleve [6] that transforms an arithmetic expression of depth d into a product of 4d many (3×3)-matrices such that the value of the arithmetic expression appears as a particular entry in the matrix product. The matrix product can in turn be evaluated in logspace using results from [11].

Balancing algorithms were first presented by Spira [52] for Boolean formulas and by Brent [8] for arithmetic expressions. Later work showed that arithmetic expressions can be balanced in 𝖭𝖢1 (observed implicitly in [10]) and in fact in 𝖳𝖢0 [28]. A generic framework for evaluating trees was presented in [41], which implicitly balances the input tree in 𝖭𝖢1. The above mentioned logspace version of Courcelle’s theorem was improved to 𝖭𝖢1 [22] (under an appropriate input form) in subsequent work. The first step of that algorithm is to balance a given tree decomposition in 𝖳𝖢0.

In general, not every algebra admits such a depth-reduction result, if one requires that the balanced tree is over the same algebra [40, Theorem 1]. The core of most tree balancing approaches is a purely syntactic recursive decomposition of the input tree into subtrees and contexts (subtrees where a subtree was removed) and the depth of this decomposition is bounded logarithmically in the size of the input tree. Formally, this decomposition is a tree straight-line program of logarithmic depth. While subtrees evaluate to elements, contexts describe unary linear term functions over the algebra. For example, over a commutative semiring a context computes an affine function xax+b, and can be represented by the parameters a,b. Furthermore, the composition of two affine functions can be implemented using semiring operations on these parameters. The main challenge towards efficient tree balancing and tree evaluation over a particular algebra is understanding the structure of its unary linear term functions (called the functional algebra in [41]). In general this can be difficult, as can be seen from the example of a finite algebra: Given a tree automaton with k states, the contexts can induce up to kk many state transformations. In particular, the space bound of 𝒪(hloglogk+logk) achieved by the Cook-Mertz algorithm for an algebra of size k cannot be immediately extended to unbalanced trees by applying the Cook-Mertz algorithm to a balanced tree straight-line program for the original tree, since k would blow up to kk. For the special case of the Strahler algebra we provide a characterization of the unary linear term functions computed by contexts in Section 3.

2 Preliminaries

We assume some familiarity with formal language theory, in particular with context-free grammars; see e.g. [36] for details. The set of all finite words over an alphabet Γ is denoted with Γ; it includes the empty word ε. The length of a word wΓ is |w| and the number of occurrences of aΓ in the word w is denoted with |w|a.

2.1 Directed acyclic graphs, trees, contexts

Directed acyclic graph.

We have to deal with node-labelled directed acyclic graphs (DAGs). Let us fix a ranked alphabet Σ (possibly infinite), where every aΣ has a rank in . Let ΣiΣ be the set of symbols of rank i. A Σ-labelled DAG is a tuple 𝒟=(V,v0,λ,γ) with the following properties:

  • V is the finite set of nodes.

  • v0V is a distinguished root.

  • λ:VΣ is a mapping that assigns to every node vV its label λ(v).

  • γ:VV is a function such that λ(v)Σ|γ(v)|. It assigns to every node v the list γ(v) of v’s children (a node may occur more than once in this list).

  • We require that the directed graph (V,{(u,v):v appears in γ(u)}) is acyclic.

Sometimes we do not need the labelling function λ, in which case we omit λ from the description of the DAG.

We also write d(v)=|γ(v)| for the degree of the node vV. Nodes of degree zero are also called leaves. For every vV and 1id(v) we define vi as the ith node in the word γ(v). This notation can be extended to words α (so-called address strings) inductively: vε=v and if α=βi, vβ is defined and 1id(vβ) then vα=(vβ)i. We define the size |𝒟| of 𝒟 as |𝒟|=vV(d(v)+1).

A path in 𝒟 can be specified by its start node v and an address string α=i1i2in. The corresponding path consists of the nodes v,vi1,vi1i2,,vα. For a node vV we define 0pt𝒟(v)=max{|α|:α,vα is defined}. Moreover, the height (or depth) of 𝒟 is max{0pt𝒟(v):vV}.

In the following, we will mainly consider binary DAGs where d(v)2 for every vV.

Trees.

A Σ-labelled tree can be defined as a Σ-labelled DAG t=(V,v0,λ,γ) as above such that in addition for every vV there is a unique address string α such that v=v0α. The node v0 is the root of the tree. For a tree t and a node v we write t(v) for the subtree of t rooted in v. It is the tree (V,v,λV,γV) where V={vα:α,vα is defined}.

From a DAG 𝒟=(V,v0,λ,γ) one can define a tree 𝗎𝗇𝖿𝗈𝗅𝖽(𝒟)=(V,ε,λ,γ) (the unfolding of 𝒟) as follows: The set of nodes of V contains all address strings α such that v0α is defined and the empty string ε is the root. If αV is such that v=v0α, then λ(α)=λ(v) and γ(α)=(α1)(α2)(αd(v)). Figure 1(right) shows a DAG, whose unfolding is the tree on the left. The edge from a node to its ith child in the DAG is labelled with i. Clearly, the size of 𝗎𝗇𝖿𝗈𝗅𝖽(𝒟) can be exponential in the size of 𝒟. This shows the potential of DAGs as a compact tree representation; see also [19, 27].

Most trees in this paper are (unlabelled) binary trees, in which case we have d(v){0,2} for all nodes v, Σ0={a}, and Σ2={b}. So, internal nodes are labelled with b and leaves are labelled with a. Thus, the node labels do not carry any information and can be omitted.

Figure 1: A binary tree.

Input representation of trees and DAGs.

When it comes to circuit complexity (see the next section), the input representation of DAGs has a big influence on complexity. The representation as a tuple (V,v0,λ,γ) is also called pointer representation. In the pointer representation the edges of the DAG are given by adjacency list (namely the lists γ(v)). In the case of trees, another well-known representation of a tree t is the term representation, where t is represented by a term formed from the symbols in Σ. For instance, the string bbbaabbaaabbaabbaaa (which is written as b(b(b(a,a),b(b(a,a),a)),b(b(a,a),b(b(a,a),a))) for better readability) is the term representation of the binary tree shown in Figure 1. It is obtained by listing the node labels of the binary tree in preorder. With 𝖡𝗂𝗇 we denote the set of all x{a,b} that are the term representation of a binary tree. It can be produced by the context-free grammar with the productions SabSS.

For binary DAGs, we also use the so-called extended connection representation, which extends the pointer representation by a further relation; see also [28, 48] and [57, Definition 2.43]. Consider a binary DAG 𝒟=(V,v0,λ,γ) as above. The extended connection representation, briefly ec-representation, of 𝒟, denoted by ec(𝒟), is the tuple (V,v0,λ,γ,𝖾𝖼𝒟), where the set 𝖾𝖼𝒟 consists of all so-called ec-triples (v,α,vα), where vV, α{1,2} is an address string such that vα is defined and |α|log2|𝒟|. Note that since 𝒟 is binary, the number of address strings with |α|log2|𝒟| is bounded by 𝒪(|𝒟|).

Contexts.

Fix a so-called placeholder symbol x{a,b}. A binary context is a binary tree t, where exactly one leaf vV0 is labelled with x. All other leaves are labelled with a and internal nodes are labelled with b. Given a binary context t and a binary tree (resp., context) t we define the binary tree (resp., context) t[x/t] by replacing the unique occurrence of x in t by t. For instance, we have b(b(a,a),b(x,a))[x/b(a,a)]=b(b(a,a),b(b(a,a),a)).

Strahler numbers.

Let s be the binary operation on with

s(x,y)={x+1 if x=y,max(x,y) if xy. (2)

The algebraic structure 𝒮=(,s,0) is also called the Strahler algebra in the following. The Strahler number 𝗌𝗍(t) of a binary tree t𝖡𝗂𝗇 is defined as follows:

𝗌𝗍(a)=0,𝗌𝗍(b(t1,t2))=s(𝗌𝗍(t1),𝗌𝗍(t2)).

In other words: 𝗌𝗍(t) is obtained by evaluating t in the Strahler algebra, where the binary symbol b is interpreted by s and the leaf symbol a is interpreted by 0. The tree from Figure 1 has Strahler number 3.

It is well-known that if t has n leaves then 𝗌𝗍(t)log2n: Let m=𝗌𝗍(t). The case m=0 is clear. If m>0 then the root of t must have at least two descendants with Strahler number m1. By induction it follows that t has at least 2i many nodes with Strahler number mi. Thus, t has at least 2m many leaves (= nodes with Strahler number 0). Moreover, the Strahler number of a tree t is the largest k such that a complete binary tree tk of depth k can be embedded into t (thereby, edges of tk can be mapped to non-empty paths in t).

2.2 Computational complexity

We assume that the reader is familiar with the complexity classes 𝖫 (deterministic logspace), 𝖭𝖫 (nondeterministic logspace), 𝖯, 𝖭𝖯 and 𝖯𝖲𝖯𝖠𝖢𝖤; see e.g. [2] for details. The class 𝖴𝖫 (unambiguous logspace) is the class of all languages that can be recognized by a nondeterministic logspace Turing machine that has on each input word at most one accepting computation. It is conjectured that 𝖴𝖫=𝖭𝖫. In the nonuniform setting this has been shown in [47].

In the rest of this section we briefly introduce some well-known concepts from circuit complexity, more details can be found in the monograph [57].

A (Boolean) circuit with n inputs can be defined as a Σ-labelled DAG =(V,v0,λ,γ), where the set of node labels Σ consists of the symbols x1,,xn of arity 0 (the input variables) and additional Boolean functions of arbitrary arity (we identify here a k-ary Boolean function with a k-ary node label). The set of these Boolean functions is also called the Boolean base of . Nodes of are usually called gates and the degree d(v) of a gate v is called its fan-in.

A Boolean circuit =(V,v0,λ,γ) as above defines a mapping η:{0,1}n{0,1} in the natural way: Let w=a1a2an{0,1}n. First define ηv(w) for every gate v inductively: ηv(w)=ai if λ(v)=xi and ηv(w)=f(ηv1(w),ηv2(w),,ηvd(w)) if γ(v)=v1v2vd and λ(v)=f (a Boolean function of arity d). Finally, we set η(w)=ηv0(w).

The complexity class 𝖭𝖢1 contains all languages L{0,1} such that there exists a circuit family (n)n where

  • n is a Boolean circuit with n inputs over the Boolean base consisting of the unary function ¬ (negation) and the binary functions (conjunction) and (disjunction),

  • n has size n𝒪(1) and depth 𝒪(logn) and

  • for every w{0,1}n, ηn(w)=1 if and only if wL.

Important subclasses of 𝖭𝖢1 are 𝖠𝖢0 and 𝖳𝖢0. The class 𝖠𝖢0 is defined similarly to 𝖭𝖢1 with the following modifications:

  • The Boolean base of n consists of ¬ and disjunctions and conjunctions of any arity.

  • The depth of the circuit n is bounded by a fixed constant.

If one includes in the first point also majority functions of any arity in the Boolean base, then one obtains the class 𝖳𝖢0. The m-ary majority function returns 1 if and only if more than m/2 many input bits are 1.

We only use the 𝖣𝖫𝖮𝖦𝖳𝖨𝖬𝖤-uniform variants of 𝖠𝖢0, 𝖳𝖢0 and 𝖭𝖢1. For 𝖠𝖢0 and 𝖳𝖢0, 𝖣𝖫𝖮𝖦𝖳𝖨𝖬𝖤-uniformity means that for a given tuple (1n,u,v), where 1n is the unary encoding of n and u and v are binary encoded gates of the n-th circuit n, one can

  1. (i)

    compute the label of gate u in time 𝒪(logn) and

  2. (ii)

    check in time 𝒪(logn) whether u is an input gate for v.

Note that since the number of gates of n is polynomially bounded in n, the gates of n can be encoded by bit strings of length 𝒪(logn).

The definition of 𝖣𝖫𝖮𝖦𝖳𝖨𝖬𝖤-uniform 𝖭𝖢1 is similar, but instead of (ii) one requires that for given 1n, u, v as above and an address string α{1,2} with |α|log2|n| one can check in time 𝒪(logn) whether u=vα [4, 48, 57]. In other words, the relations from the ec-representation of n can be verified in time 𝒪(logn). We denote the 𝖣𝖫𝖮𝖦𝖳𝖨𝖬𝖤-uniform variants of 𝖠𝖢0, 𝖳𝖢0 and 𝖭𝖢1 with 𝗎𝖠𝖢0, 𝗎𝖳𝖢0 and 𝗎𝖭𝖢1, respectively. It is known that 𝗎𝖭𝖢1 coincides with 𝖠𝖫𝖮𝖦𝖳𝖨𝖬𝖤 (logarithmic time on an alternating random access Turing machine). The following inclusions hold between the complexity classes introduced above:

𝗎𝖠𝖢0𝗎𝖳𝖢0𝗎𝖭𝖢1=𝖠𝖫𝖮𝖦𝖳𝖨𝖬𝖤𝖫𝖴𝖫𝖭𝖫𝖯𝖭𝖯𝖯𝖲𝖯𝖠𝖢𝖤.

The definitions of the above circuit complexity classes can be easily extended to functions f:{0,1}{0,1}. This can be done by encoding f by the language Lf={1i0w:w{0,1}, the i-th bit of f(w) is 1}.

Hardness for 𝗎𝖭𝖢1 (resp., 𝗎𝖳𝖢0) is always understood with respect to 𝗎𝖳𝖢0-computable (resp., 𝗎𝖠𝖢0-computable) many-one reductions.

Typical problems in 𝗎𝖳𝖢0 are the computation of the integer quotient of binary encoded integers, and the sum and product of an arbitrary number of binary encoded integers [35]. The canonical 𝗎𝖳𝖢0-complete language is 𝖬𝖺𝗃𝗈𝗋𝗂𝗍𝗒={x{0,1}:|x|1>|x|/2}. Also the language 𝖡𝗂𝗇 from Section 2.1 is 𝗎𝖳𝖢0-complete. Membership in 𝗎𝖳𝖢0 was shown in [43], and 𝗎𝖳𝖢0-hardness can be easily shown by a reduction from the 𝗎𝖳𝖢0-complete language {w{0,1}:|w|0=|w|1}.

A famous 𝗎𝖭𝖢1-complete problem is the Boolean formula problem: the input is a binary tree t in term representation using the binary symbols and and the constant symbols 0 (for false) and 1 (for true), and the question is whether t evaluates to 1 in the Boolean algebra. Buss has shown the following theorem (note that the negation operator ¬ is not needed for 𝗎𝖭𝖢1-hardness in [9]):

Theorem 2.1 ([9]).

The Boolean formula problem is complete for 𝗎𝖭𝖢1.

The following results are well-known and easy to show. Let t be an arbitrary binary tree.

  • From the term representation of t one can compute in 𝗎𝖳𝖢0 its pointer representation.

  • From the pointer representation of t one can compute in logspace its term representation. This transformation cannot be done in 𝗎𝖭𝖢1 unless 𝖫=𝗎𝖭𝖢1 holds [5].

The following lemma has been shown in [28].

Lemma 2.2 ([28, Lemma 3.4]).

For any c>0 there exists a 𝗎𝖳𝖢0-computable function, which maps the ec-representation of a DAG 𝒟 of size n and depth at most clog2n to the term representation of the tree 𝗎𝗇𝖿𝗈𝗅𝖽(𝒟).

2.3 Tree straight-line programs

In this section, we introduce tree straight-line programs (TSLPs), which have been studied mainly as a compressed representation of trees; see [44] for a survey. Here, we define tree straight-line programs only for unlabelled binary trees. A tree straight-line program (TSLP) is a tuple 𝒢=(N0,N1,S,ρ) with the following properties:

  • N0 is a finite set of tree variables. Tree variables are considered as symbols of rank 0.

  • N1 is a finite set of context variables. Context variables are considered as symbols of rank 1. Let N=N0N1. We assume that N0N1=.

  • SN0 is the start variable.

  • ρ maps every AN0 to an expression ρ(A) that has one of the following three forms, where B,CN0 and DN1: a, b(B,C), D(C) (recall from Section 2.1 that a labels the leaves of a binary tree and b labels internal nodes).

  • ρ maps every AN1 to an expression ρ(A) that has one of the following three forms, where BN0 and C,DN1: b(x,B), b(B,x), D(C(x)) (here, x is the placeholder symbol from contexts; see Section 2.1).

  • The binary relation {(A,B)N×N:B occurs in ρ(A)} must be acyclic.

For a TSLP 𝒢=(N0,N1,S,ρ) one should see the function ρ as a set of term rewrite rules Aρ(A) for AN. With these rewrite rules, we can derive from every AN0 (resp., AN1) a binary tree (resp., a binary context; see Section 2.1) 𝗏𝖺𝗅𝒢(A) (the value of A). We omit the index 𝒢 if it is clear from the context. Formally, we define 𝗏𝖺𝗅𝒢(A) as follows:

  • if AN0 and ρ(A)=a then 𝗏𝖺𝗅𝒢(A)=a,

  • if AN0 and ρ(A)=b(B,C) then 𝗏𝖺𝗅𝒢(A)=b(𝗏𝖺𝗅𝒢(B),𝗏𝖺𝗅𝒢(C)),

  • if AN0 and ρ(A)=D(C) then 𝗏𝖺𝗅𝒢(A)=𝗏𝖺𝗅𝒢(D)[x/𝗏𝖺𝗅𝒢(C)],

  • if AN1 and ρ(A)=b(x,B) then 𝗏𝖺𝗅𝒢(A)=b(x,𝗏𝖺𝗅𝒢(B)),

  • if AN1 and ρ(A)=b(B,x) then 𝗏𝖺𝗅𝒢(A)=b(𝗏𝖺𝗅𝒢(B),x),

  • if AN1 and ρ(A)=D(C(x)) then 𝗏𝖺𝗅𝒢(A)=𝗏𝖺𝗅𝒢(D)[x/𝗏𝖺𝗅𝒢(C)].

Finally, we define the binary tree 𝗏𝖺𝗅(𝒢)=𝗏𝖺𝗅𝒢(S) (recall that SN0).

Example 2.3.

Consider the TSLP 𝒢 with N0={S,A,B,C,D}, N1={E} and the following rules: Sb(A,A),Ab(B,C),CE(B),BE(D),E(x)b(x,D),Da. Then 𝗏𝖺𝗅(𝒢) is the tree from Figure 1.

A TSLP 𝒢=(N0,N1,S,ρ) can be encoded by a Σ-labelled DAG (N0N1,S,λ,γ) with Σ0={a}, Σ1={b1,b2} and Σ2={b,0,1} in the following way:

  • if AN0 and ρ(A)=a then λ(A)=a and γ(A)=ε,

  • if AN0 and ρ(A)=b(B,C) then λ(A)=b and γ(A)=BC,

  • if AN0 and ρ(A)=D(C) then λ(A)=0 and γ(A)=DC,

  • if AN1 and ρ(A)=b(x,B) then λ(A)=b1 and γ(A)=B,

  • if AN1 and ρ(A)=b(B,x) then λ(A)=b2 and γ(A)=B,

  • if AN1 and ρ(A)=D(C(x)) then λ(A)=1 and γ(A)=DC.

In particular, we can speak about the ec-representation of a TSLP or the height of a variable in a TSLP. We define the size |𝒢| of the TSLP 𝒢 as the size of the corresponding DAG, which is bounded by 3|N|. It is easy to see that the tree 𝗏𝖺𝗅(𝒢) has at most 2𝒪(|𝒢|) many nodes.

Note that for a TSLP 𝒢, where N1= (hence, every ρ(A) is either a or b(B,C) for B,CN0), the unfolding of the above DAG is 𝗏𝖺𝗅(𝒢). In general, TSLPs can be more succinct than DAGs: take for instance a caterpillar tree t=b(b(b(a,a),a),,a) of size n. It can be represented by a TSLP of size 𝒪(logn), whereas every DAG that unfolds into t has size Ω(n). The following result from [28] will be important in the next section.

Theorem 2.4 ([28, Theorem 5.6]).

From a binary tree t of size n given in term representation one can compute in 𝗎𝖳𝖢0 the ec-representation of a TSLP 𝒢 of depth 𝒪(logn) and size 𝒪(n) such that 𝗏𝖺𝗅(𝒢)=t.

The size bound 𝒪(n) for the TSLP 𝒢 in Theorem 2.4 can be even replaced by 𝒪(n/logn) [28, Theorem 5.6], but this is not important for our purpose.

3 Complexity of computing the Strahler number

In this section we consider the problem of checking whether the Strahler number of a given binary tree is at least a given threshold. The problem 𝖲𝗍 is defined as follows:

  • Input: a binary tree t and a number k.

  • Question: Is 𝗌𝗍(t)k?

If we fix the value k1, then we obtain the following problem 𝖲𝗍k:

  • Input: a binary tree t.

  • Question: Is 𝗌𝗍(t)k?

These problem descriptions are actually incomplete, since we did not fix the input encoding of t, which influences the complexity of the problems. We obtain the following variations: In 𝖲𝗍𝗍𝖾𝗋𝗆 (resp., 𝖲𝗍𝗉𝗈𝗂𝗇𝗍𝖾𝗋) the tree t is given by its term (resp., pointer) representation. In 𝖲𝗍𝖽𝖺𝗀 (resp., 𝖲𝗍𝗍𝗌𝗅𝗉) the tree t is given succinctly by a binary DAG 𝒟 (resp., a TSLP 𝒢) such that t=𝗎𝗇𝖿𝗈𝗅𝖽(𝒟) (resp., t=𝗏𝖺𝗅(𝒢)). The problems 𝖲𝗍𝗍𝖾𝗋𝗆k, 𝖲𝗍𝗉𝗈𝗂𝗇𝗍𝖾𝗋k, 𝖲𝗍𝖽𝖺𝗀k, and 𝖲𝗍𝗍𝗌𝗅𝗉k are defined analogously. Our main result is:

Theorem 3.1.

𝖲𝗍𝗍𝖾𝗋𝗆 is 𝗎𝖭𝖢1-complete.

As a gentle introduction into the problem, we first present a weaker result, namely that one can calculate the Strahler number of a tree with n leaves in 𝒪(lognloglogn) space, and then show how to reduce the space complexity to 𝒪(logn). We only sketch the proof, since these space bounds are subsumed by the 𝗎𝖭𝖢1 upper bound, proven later in this section.

The idea is to compute the Strahler number recursively by traversing the tree, in a depth-first order. We perform a depth-first traversal through the tree, maintaining a single pointer to the current node using 𝒪(logn) space, and a constant-sized information, indicating the direction of the next traversal step. Additionally, we store a list of the Strahler numbers s1,,sk of the inclusion-wise maximal subtrees t1,,tk that have been completely traversed in that order (i.e., si has been traversed before sj for i<j). Whenever both subtrees of a node have been traversed, we can combine their Strahler numbers to obtain the Strahler number of the parent node. Since each Strahler number si is bounded by logn where n is the number of leaves in the input tree, it can be stored in 𝒪(loglogn) bits. However, if the tree is traversed in an arbitrary order, the number k of subtrees could be up to linear in n. The solution is to visit heavy subtrees first, i.e. if a node is visited for the first time, the next step moves to the larger subtree of the current node (if both subtrees have the same size, one moves to the left subtree). Note that the size of a subtree can be computed in logspace. This ensures that |ti||ti+1|++|tk| and therefore |ti|2|ti+2| for ik2. In particular, k is bounded by 𝒪(logn) and the total space complexity is 𝒪(kloglogn)=𝒪(lognloglogn).

To shave off the loglogn factor, we store the sequence of Strahler numbers s1,,sk using a delta encoding. Let us say that a number si is dominated if there exists j>i such that sj>si. Such a dominated number si can be replaced by 0, which does not change the Strahler number of the tree. The subsequence of undominated numbers si1,si2,,si is monotonically decreasing and can be encoded by its delta encoding si1si2,,si1si,si. Each number s in this sequence will be represented in unary encoding by 1s#. As an example, the sequence s1,,sk= 3,2,5,3,4,4,2,1 is encoded by 001#0#11#1#1#. The resulting word over the alphabet {0,1,#} has length k+si1𝒪(logn).

Now we turn to proving the 𝗎𝖭𝖢1 bound from Theorem 3.1. To this end, we will first compute from the input tree t a TSLP using Theorem 2.4. To make use of the TSLP-representation of t, we need a simple description of unary linear term functions in the Strahler algebra. For this, we start with some preparations.

Consider a TSLP 𝒢=(N0,N1,S,ρ) as defined in Section 2.3. For a tree variable AN0 we write 𝗌𝗍A for the Strahler number 𝗌𝗍(𝗏𝖺𝗅(A)). For a context variable BN1 we define a function 𝗌𝗍B: as follows: Consider the binary context t=𝗏𝖺𝗅(B). Take an integer n and take a binary tree t with 𝗌𝗍(t)=n. The concrete choice of t is not important. Then we define 𝗌𝗍B(n)=𝗌𝗍(t[x/t]). Intuitively speaking, the evaluation of the binary context t in the Strahler algebra yields the unary linear term function 𝗌𝗍B. If we substitute the placeholder x by a number n then we can evaluate the resulting expression in the Strahler algebra and the result is 𝗌𝗍B(n). The functions 𝗌𝗍B can be described by two integers in the following way: For ,h with 0h we define the function [,h]: as follows:

[,h](x)={h if x<h+1 if xhx if x>h (3)
Lemma 3.2.

The functions [,h] are closed under composition. More precisely, for all h, mi and x we have the following:

[m,i]([,h](x))={[m,i](x) if h+2m[,i](x) if h+1=m[0,i](x) if mhi[,h](x) if i<h (4)

Proof.

For all x we have:

[m,i]([,h](x))={[m,i](h) if x<[m,i](h+1) if xh[m,i](x) if x>h (5)

We now distinguish the four cases from (4):

Case 1: 𝒉+𝟐𝒎.

We have to show that [m,i]([,h](x))=[m,i](x) for all x. Since h+1<m we obtain from (5):

[m,i]([,h](x))={i=[m,i](x) if xh[m,i](x) if x>h

Case 2: 𝒉+𝟏=𝒎.

We have to show [m,i]([,h](x))=[,i](x) for all x. With (5) we get

[m,i]([,h](x))={[h+1,i](h)=i if x<[h+1,i](h+1)=i+1 if xh[h+1,i](x)=i+1 if h<xi[h+1,i](x)=x if x>i}=[,i](x).

Case 3: 𝒎𝒉𝒊.

We have to show [m,i]([,h](x))=[0,i](x) for all x. Equation (5) yields

[m,i]([,h](x))={i+1=[0,i](x) if xi,x=[0,i](x) if x>i.

Case 4: 𝒊<𝒉.

We have to show that [m,i]([,h](x))=[,h](x) for all x. Equation (5) simplifies for i<h to

[m,i]([,h](x))={h if x<h+1 if xhx if x>h}=[,h](x).

This concludes the proof of the lemma.

Lemma 3.3.

Let 𝒢=(N0,N1,S,ρ) be a TSLP and let AN1. Then there exist numbers A and hA such that 𝗌𝗍A=[A,hA].

Proof.

Every context 𝗏𝖺𝗅(A) for AN1 can be obtained from composing contexts of the form b(x,t) and b(t,x) where t=𝗏𝖺𝗅(B) for some BN0. By Lemma 3.2 it therefore suffices to show that for every m the mapping xs(x,m) (where s is from (2)) is of the form [,h] (then, since s is commutative, the same holds for the mapping xs(m,x)). It is straightforward to check that s(x,m)=[m,m](x) for all x. We are now in the position to prove Theorem 3.1.

Proof of Theorem 3.1.

We start with the 𝗎𝖭𝖢1 upper bound. Let t𝖡𝗂𝗇 be a binary tree given in term representation. Let n be the number of leaves of t. Hence, we must have 𝗌𝗍(t)log2n. Our goal is to compute in 𝗎𝖳𝖢0 from t and an integer 0klog2n a Boolean circuit t,k of depth 𝒪(logn) such that t,k evaluates to true if and only if 𝗌𝗍(t)k. The Boolean circuit t,k is represented in ec-representation, which ensures that it can be unfolded in 𝗎𝖳𝖢0 into an equivalent Boolean formula (Lemma 2.2) and then evaluated in 𝗎𝖭𝖢1 by Theorem 2.1.

In a first step, we use Theorem 2.4 to compute in 𝗎𝖳𝖢0 the ec-representation of a TSLP 𝒢=(N0,N1,S,ρ) of depth 𝒪(logn) and size 𝒪(n) such that 𝗏𝖺𝗅(𝒢)=t. Let N=N0N1. Since the ec-representation of 𝒢 is available and the depth of 𝒢 is bounded by 𝒪(logn), one can ensure in 𝗎𝖳𝖢0 that all variables in N can be reached from the start variable S (this property is actually satisfied when 𝒢 is constructed according to [28]). In particular, every variable AN0 produces a subtree of t and every variable AN1 produces a subcontext of t. Hence, every number 𝗌𝗍A is bounded by log2n and we will see in a moment that the same holds for the numbers A and hA from Lemma 3.3.

In the following we consider the following set of formal integer variables:

Δ(𝒢)={A𝗌𝗍:AN0}{A,Ah:AN1}.

For XΔ(𝒢) we define the integer v(X) by v(A𝗌𝗍)=𝗌𝗍A, v(A)=A and v(Ah)=hA.

We will define a Boolean circuit t,k that contains for all i with |i|log2n and all X,YΔ(𝒢) a gate [XY+i] with the obvious meaning: the gate evaluates to true if and only if v(X)v(Y)+i. Let V be the set of all such gates [XY+i]. It is convenient to allow also gates [Xi] and [Xi]. Formally, they can be replaced by [XA𝗌𝗍+i] and [A𝗌𝗍Xi], where AN0 is a variable with ρ(A)=a (so that 𝗌𝗍A=0). The output gate of t,k is [S𝗌𝗍k].

The number i is called the offset of the gate g=[XY+i] and we define N(g)={A,B} if X{A𝗌𝗍,A,Ah} and Y{B𝗌𝗍,B,Bh}. For gates g1,g2V, we write g1g2 if every variable BN(g2) appears in ρ(A) for some AN(g1). Then the length of every chain g1g2g3gm is bounded by the depth of 𝒢, which is 𝒪(logn).

To define the wires of t,k, first note that the numbers v(X) (XΔ(𝒢)) are computed according to the following rules:

  1. (i)

    if AN0 and ρ(A)=a then 𝗌𝗍A=0,

  2. (ii)

    if AN0 and ρ(A)=b(B,C) then

    𝗌𝗍A={𝗌𝗍B if 𝗌𝗍B>𝗌𝗍C,𝗌𝗍C if 𝗌𝗍B<𝗌𝗍C,𝗌𝗍B+1 if 𝗌𝗍B=𝗌𝗍C,
  3. (iii)

    if AN0 and ρ(A)=B(C) then, since 𝗌𝗍B=[B,hB],

    𝗌𝗍A={hB if 𝗌𝗍C<B,hB+1 if B𝗌𝗍ChB,𝗌𝗍C if 𝗌𝗍C>hB,
  4. (iv)

    if AN1 and ρ(A)=b(x,B) or ρ(A)=b(B,x) then A=hA=𝗌𝗍B, and

  5. (v)

    if AN1 and ρ(A)=B(C(x)) then by Lemma 3.2 we have:

    A={B if hC+2B,C if hC+1=B,0 if BhChB,C if hB<hC,hA={hB if hC+2B,hB if hC+1=B,hB if BhChB,hC if hB<hC. (6)

Points (iv) and (v) imply that all numbers A and hA for AN1 are equal to some 𝗌𝗍B (BN0) and therefore bounded by log2n.

From the equalities in (i)–(v), it is now straightforward to construct for every gate gV a Boolean circuit g of constant size with output gate g. All input gates g of g satisfy gg. Let us consider for instance the gate [AhD+i] for A,DN1 and assume that ρ(A)=B(C(x)) and ρ(D)=b(x,E). Then, D=𝗌𝗍E and the equation for hA in (6) implies

hAD+i(hB𝗌𝗍E+ihChB)(hC𝗌𝗍E+ihB<hC).

This equivalence directly yields the Boolean circuit for [AhD+i]. Its input gates are: [BhE𝗌𝗍+i], [ChBh], [ChE𝗌𝗍+i], and [BhCh1].

When constructing a Boolean circuit g one may obtain gates, where the absolute value of the offset i is larger than log2n. Such gates can be replaced by true or false: [XY+i] with i>log2n can be replaced by true (since v(X)log2n and v(Y)0) and [XYi] with i>log2n can be replaced by false.

The circuit t,k results from the union of the above constant-size circuits. Since the depth of 𝒢 is bounded by 𝒪(logn), it follows that the depth of is also bounded by 𝒪(logn). Moreover, the ec-representation of can be easily computed in 𝗎𝖳𝖢0 from the ec-representation of the TSLP 𝒢. This shows the upper bound from Theorem 3.1.

For the lower bound we give a reduction from the 𝗎𝖭𝖢1-complete Boolean formula value problem; see Theorem 2.1. Binary conjunction is simulated by the operation

f(x,y)=s(x+1,y+1)=s(s(x,x),s(y,y)), (7)

where s from (2), and binary disjunction is simulated by the operation

f(x,y)=s(s(x+1,y),s(x,y+1))=s(s(s(x,x),y),s(x,s(y,y))). (8)

We obtain for every a0:

f(a,a)=f(a,a+1)=f(a+1,a)=a+2 and f(a+1,a+1)=a+3, (9)
f(a,a)=a+2 and f(a,a+1)=f(a+1,a)=f(a+1,a+1)=a+3. (10)

A given Boolean formula (built from binary operators and ; negation is not needed in [9]) can be transformed in 𝗎𝖳𝖢0 into an equivalent Boolean formula Φ of depth d𝒪(log|Φ|); see [28]. We can also assume that every path from the root to a leaf has the same length d. By replacing in Φ every (resp., ) by f (resp., f) and replacing every occurrence of the truth value 𝗍𝗋𝗎𝖾 (resp., 𝖿𝖺𝗅𝗌𝖾) by 1=s(0,0) (resp., 0), we obtain an expression that evaluates in the Strahler algebra to 2d+1 (resp., 2d) if the Boolean formula Φ evaluates to 𝗍𝗋𝗎𝖾 (resp., 𝖿𝖺𝗅𝗌𝖾). Note that replacing f(x,y) and f(x,y) by their left-hand sides from (7) and (8) yields a DAG (since x and y appear more than once in (7) and (8)) whose ec-representation can be computed in 𝗎𝖳𝖢0 from Φ. Since the depth of this DAG is 𝒪(log|Φ|) it can be unfolded into the term representation of a tree in 𝗎𝖳𝖢0 by Lemma 2.2. For 𝖲𝗍𝗍𝖾𝗋𝗆k with k4 we can show 𝗎𝖳𝖢0-completeness via a reduction from 𝖬𝖺𝗃𝗈𝗋𝗂𝗍𝗒:

Theorem 3.4.

The problem 𝖲𝗍𝗍𝖾𝗋𝗆k is 𝗎𝖳𝖢0-complete for every k4. In particular, there is a 𝗎𝖠𝖢0-computable function t:{0,1}𝖡𝗂𝗇 such that the following holds for every w{0,1}: if w𝖬𝖺𝗃𝗈𝗋𝗂𝗍𝗒 then 𝗌𝗍(t(w))=4, otherwise 𝗌𝗍(t(w))=3.

Proof of Theorem 3.4.

We first show that every problem 𝖲𝗍𝗍𝖾𝗋𝗆k (for a fixed k) is in 𝗎𝖳𝖢0. Let t𝖡𝗂𝗇. We have to check whether the complete binary tree tk of depth k embeds into t. For this, we have to check whether there exist 2k+11 different positions in t such that the corresponding nodes are in the correct descendant relations in order to yield an embedding of tk. Hence, it suffices to show that in 𝗎𝖳𝖢0 one can check whether for two positions i<j in t (that are identified with the corresponding tree nodes), j is a proper descendant of i. This holds if and only if there exists a position kj in t such that t[i,k] (the substring of t starting in position i and ending in position k) belongs to 𝖡𝗂𝗇. Since 𝖡𝗂𝗇 belongs to 𝗎𝖳𝖢0 [43], this can be checked in 𝗎𝖳𝖢0 as well.

For the hardness part it suffices to consider the case k=4. We start with the morphism d:{0,1}{0,1} that doubles each symbol: d(0)=00 and d(1)=11. Clearly, w𝖬𝖺𝗃𝗈𝗋𝗂𝗍𝗒 if and only if d(w)𝖬𝖺𝗃𝗈𝗋𝗂𝗍𝗒 and d(w) can be computed in 𝗎𝖠𝖢0. Hence it suffices to consider strings in the image of d (𝗂𝗆(d) for short) in the following. Every w𝗂𝗆(d) can be uniquely factorized as w=02k0102k1102k2102km, where m=|w|10 (which is even) and k1,,km0 (actually, every second ki is zero due to the factors 11 but we do not need this fact in the following). Then we define

f(w)=bk0ak0b1+k1ak1b1+k2ak2b1+kmakm.

In other words: every 1 in w is replaced by b and every maximal block 02k of zeros in w is replaced by bkak.

Claim 3.5.

The function f can be computed in 𝗎𝖠𝖢0.

Proof.

To see this, note that f(w) is obtained from w by replacing every 1 by b and every 0 by either b or a according to the following rule: Assume that an occurrence of 0 is the ith 0 in a maximal block of 2k zeros. Then this occurrence of 0 is replaced by b if ik and otherwise by a. This case distinction can be easily implemented by a bounded depth Boolean circuit of unbounded fan-in. Finally, for a bit string w𝗂𝗆(d) of length 2n we define

t(w)=f(w)bT2f(w¯)T2an1T3an,

where w¯𝗂𝗆(d) is obtained by flipping every bit in w, T2=bbaabaa (the term representation of a tree of Strahler number 2) and T3=bT2T2 (the term representation of a tree of Strahler number 3). Since f can be computed in 𝗎𝖠𝖢0, the same holds for t.

The string t(w) is the term representation of a binary tree and satisfies the following:

Figure 2: The tree fragment f(w)bT2f(w¯)T2 for w=000011001111 on the left and t(w) on the right.
Claim 3.6.

If |w|0n then 𝗌𝗍(t(w))=3, otherwise 𝗌𝗍(t(w))=4.

Proof.

Let us look at the example where w=d(001011)=000011001111 has length 2n=12, which satisfies |w|0n=6. On the right of Figure 2, the tree

t(w)=f(w)bT2f(w¯)T2an1T3an=bbaabbbabbbbbT2bbbbbabbbbaaT2a5T3a6

is shown. Note that a string bkak produces a caterpillar tree of depth k branching off from the root to the left and leaving a “hole” at the position right below the root. These are the red patterns in Figure 2. The b’s (replacing the 1’s when applying f) yield the blue nodes and edges in Figure 2.

Figure 2 (left) shows the fragment of t(w) that is produced by the prefix f(w)bT2f(w¯)T2. The green circles represent holes. The first |w|1 holes are produced by f(w) followed by |w|0 holes produced by bT2f(w¯)T2 (note that |w|0+|w|1=2n). These 2n holes are then filled bottom-up by the 2n trees from the suffix an1T3an, which finally yields t(w). All 2n holes are filled with a except the nth hole from bottom, which is filled by T3. Note that the tree t(w) has a main spine that is highlighted by the thick edges in Figure 2. The nodes on this spine are called the spine nodes below. All subtrees that are attached to the spine have Strahler number at most 2 except for the unique occurrence of T3. The crucial observation now is the following:

  • If |w|0n then T3 is attached to a spine node that is below the spine node to which the upper occurrence of T2 is attached (this is the case in Figure 2). This implies 𝗌𝗍(t(w))=3.

  • If |w|0<n then T3 is attached to a spine node that is above the spine node to which the upper occurrence of T2 is attached. This implies that 𝗌𝗍(t(w))=4.

This proves Claim 3.6. Claim 3.6 implies the second statement of the theorem: if w𝖬𝖺𝗃𝗈𝗋𝗂𝗍𝗒 then |w|1>n, i.e., |w|0=2n|w|1<n, and Claim 3.6 gives 𝗌𝗍(t(w))=4. Similarly, if |w|1n then |w|0n and Claim 3.6 gives 𝗌𝗍(t(w))=3. It is easy to see that the problem 𝖲𝗍𝗍𝖾𝗋𝗆2 belongs to 𝗎𝖠𝖢0: if t𝖡𝗂𝗇 then 𝗌𝗍(t)2 if and only if the string t contains at least two occurrences of baa, which can be tested in 𝗎𝖠𝖢0. We do not know whether 𝖲𝗍𝗍𝖾𝗋𝗆3 still belongs to 𝗎𝖠𝖢0.

For input trees given in pointer representation, we show the following results in [29]:

Theorem 3.7.

𝖲𝗍𝗉𝗈𝗂𝗇𝗍𝖾𝗋 and 𝖲𝗍𝗉𝗈𝗂𝗇𝗍𝖾𝗋k for every k3 are 𝖫-complete.

Finally, we also considered the cases where the input tree is given in a compressed form by either a binary DAG or a TSLP. In the long version [29] we show the following:

Theorem 3.8.

The following hold:

  1. (i)

    𝖲𝗍𝖽𝖺𝗀 and 𝖲𝗍𝗍𝗌𝗅𝗉 are 𝖯-complete.

  2. (ii)

    For every fixed k1, 𝖲𝗍𝖽𝖺𝗀k is in 𝖴𝖫𝖼𝗈𝖴𝖫.

  3. (iii)

    For every fixed k2, 𝖲𝗍𝗍𝗌𝗅𝗉k is 𝖭𝖫-complete.

The best lower bound for the problem in Theorem 3.8(ii) that we are aware of is 𝖫-hardness (for k3), coming from Theorem 3.7.

4 Strahler number of derivation trees

In this section, we briefly report on our results for the Strahler numbers of derivation trees of context-free grammars. Since we want to obtain binary trees and since the derived words have no relevance for us, we consider context-free grammars G=(N,S,P), where N is the set of nonterminals, SN is the start nonterminal and P is the set of productions such that each of them has the form Aε or ABC for A,B,CN. Slightly abusing standard terminology, we call such a grammar a Chomsky normal form grammar or CNF-grammar for short. The notion of a derivation tree is defined as usual: a derivation tree for AN is an N-labelled binary tree such that (i) the root is labelled with A, (ii) if an internal node v is labelled with BN then there is a production BCD such that the left (resp., right) child of v is labelled with C (resp., D) and (iii) if v is a B-labelled leaf then (Bε)P. A derivation tree of G is a derivation for the start nonterminal S. A derivation tree t is called acyclic if there is no nonterminal that appears twice along a path from the root to a leaf. The motivation for considering acyclic derivations trees and their Strahler numbers comes from [45]; see the discussion in the introduction. In this section we consider the following problem 𝖢𝖭𝖥 (resp., 𝖺𝖼𝖢𝖭𝖥):

  • Input: a CNF-grammar G and a number k (given in unary encoding).

  • Question: Is there a derivation tree (resp., acyclic derivation tree) t of G with 𝗌𝗍(t)k?

If the number k is fixed and not part of the input, we obtain the problems 𝖢𝖭𝖥k and 𝖺𝖼𝖢𝖭𝖥k. The following results pinpoint the complexity of these problems:

Theorem 4.1.

The following holds:

  1. (i)

    𝖢𝖭𝖥 and 𝖢𝖭𝖥k for every k1 are 𝖯-complete.

  2. (ii)

    𝖺𝖼𝖢𝖭𝖥k is 𝖭𝖯-complete for every k2.

  3. (iii)

    𝖺𝖼𝖢𝖭𝖥 is 𝖯𝖲𝖯𝖠𝖢𝖤-complete.

The full proof of Theorem 4.1 can be found in [29]. Here, we only prove statement (ii).

Proof of Theorem 4.1(ii).

Membership in 𝖭𝖯 was shown in [45]. It suffices to show 𝖭𝖯-hardness for k=2. For this, we present a reduction from exact 3-hitting set (X3HS):

  • Input: a finite set M and a non-empty set 2M of subsets of M, all of size 3.

  • Question: Is there a subset SM such that |SC|=1 for all C?

X3HS is the same problem as positive 1-in-3-SAT, which is 𝖭𝖯-complete [31, Problem LO4].

Fix the set M and a subset 2M with all C of size 3. W.l.o.g. assume that M={1,2,,n} and fix an arbitrary ordering C1,C2,,Cm of the subsets in . We will construct a CNF-grammar G such that there is a derivation tree of G with Strahler number at least two if and only if there is a subset S{1,,n} such that |SC|=1 for all C.

In order to make the grammar more readable we use the following notation below. If we write in a right-hand side [AB] for nonterminals A and B, then [AB] is another nonterminal with the unique production [AB]AB and this production is not explicitly listed. Moreover, this notation will be nested, i.e., A and B can be also of the form [CD]. In Figure 3 such nonterminals are depicted as filled circles. With this notation, the productions of our CNF-grammar G are as follows:

E ε
Ak IkEOkE whenever 1kn
Ik Ak+1Eε whenever 1kn1
In B1Eε
Ok Ak+1Eε whenever 1kn1
On B1Eε
Bj Bj+1[[Oa[IbIc]] whenever 1jm and Cj={a,b,c}
Bm+1 EE

The start nonterminal is A1. Note that there are six productions of the form BjBj+1[[Oa[IbIc]] corresponding to the six permutations of the set Cj={a,b,c} (we could restrict to three productions since the order between Ib and Ic is not important for the following arguments).

Figure 3: An acyclic derivation tree for the grammar G (proof of Theorem 4.1(ii)) has either the form shown on the left, or it results from merging the tree shown in the middle with the tree shown on the right in the B1-labelled node. Every Xk is either Ik or Ok.

Consider first an acyclic derivation tree t rooted in A1 with Strahler number at least two. The top part of every derivation tree rooted in A1 must have one of the two shapes shown in Figure 3 (left and middle tree), where Xk{Ik,Ok}. A left tree is a complete (acyclic) derivation tree with Strahler number 1. Hence, the top part of t must have the middle shape from Figure 3. It defines the subset S={k:1kn,Xk=Ik}. From the leaf B1 we have to expand the derivation tree t further and this results in a bottom part tree as shown in Figure 3 (right tree), where for every 1jm we have Cj={xj,yj,zj}. Since the tree t (obtained by merging the top part from Figure 3 (middle tree) with the bottom part from Figure 3 (right tree), where the merging is done by identifying the B1-labelled nodes) is an acyclic derivation tree we must have xmS, ymS, and zmS for every j{1,,m}. Therefore, our X3HS-instance is positive.

Vice versa, if there is a subset S{1,,n} such that |SC|=1 for every C, then we obtain an acyclic derivation tree t with Strahler number two by merging the middle and right tree from Figure 3, where we set Xk=Ik if kS and Xk=Ok if kS in the middle tree. Moreover, if Cj={a,b,c} with {a}=SC then we set xj=a, yj=b and zj=c (or yj=c and zj=b) in the right tree. The 𝖯-hardness of 𝖢𝖭𝖥k in Theorem 4.1 comes solely from the fact that emptiness for CNF-grammars is 𝖯-hard. One can avoid this difficulty by adding to the input grammar a certificate, ensuring that all nonterminals are productive. Formally, this certificate is defined in [29], where it is shown that the problem 𝖢𝖭𝖥k for k2 becomes 𝖭𝖫-complete when such a certificate is part of the input, whereas 𝖢𝖭𝖥 stays 𝖯-complete.

5 Open problems

We conclude the paper with some open problems.

Computing Strahler numbers for unranked trees.

Strahler numbers have been also defined for unranked trees (trees, where nodes can have any number of children): Consider an unranked tree t, where t1,,tk (k0) are the subtrees rooted in the children of the root of t. We define the Strahler number 𝗌𝗍(t) of t inductively as follows: if k=0 then 𝗌𝗍(t)=0. If k1 then let ni=𝗌𝗍(ti) and n=max{n1,,nk}. If n has a unique occurrence in the list n1,,nk, then 𝗌𝗍(t)=n, otherwise 𝗌𝗍(t)=n+1. We conjecture that our 𝖭𝖢1-algorithm for computing the Strahler number of a binary tree can be adapted to unranked trees, but this seems to be not obvious. Tree straight-line programs could be replaced by forest straight-line programs [32] that work for unranked trees. For this one has to prove a variant of Theorem 2.4 for forest straight-line programs. In addition, one needs a variant of Lemma 3.2 for unranked trees, which is not obvious.

Expression evaluation for the max-plus semiring.

Closely related but slightly different to the computation of Strahler numbers is the problem of evaluating expressions over the max-plus semiring (,max,+). If the input numbers are given in unary encoding, then the problem is logspace reducible to the evaluation of arithmetic expressions over (,+,×) and hence belongs to 𝖫 [38]. The complexity is open if the input numbers are encoded in binary. Let us also mention that the longest (or shortest [38, Lemma 3.3]) path problem in a directed graph with binary encoded weights is in 𝖠𝖢1, using matrix powering over the max-plus semiring, but it is a longstanding open problem whether it lies in a smaller complexity class [14, p. 13], see also [30, 50] for recent applications.

Computing path width of trees.

A problem that is related to the computation of the Strahler number of a tree t is the computation of the path width of an undirected tree. Let us define 𝗌𝗍(t) for an undirected tree t as the minimal Strahler number of a rooted tree that can be obtained by choosing a root in t. Then the following relationship is stated in [25]: 𝗉𝖺𝗍𝗁𝗐𝗂𝖽𝗍𝗁(t)1𝗌𝗍(t)2𝗉𝖺𝗍𝗁𝗐𝗂𝖽𝗍𝗁(t). It is shown in [49] that the path width of an undirected tree t can be computed in linear time. It would be interesting to know whether it can be computed in logspace.

References

  • [1] Alex Arenas, Leon Danon, Albert Díaz-Guilera, Pablo M. Gleiser, and Roger Guimerá. Community analysis in social networks. European Physical Journal B, 38(2):373–380, 2004. doi:10.1140/epjb/e2004-00130-1.
  • [2] Sanjeev Arora and Boaz Barak. Computational Complexity - A Modern Approach. Cambridge University Press, 2009. doi:10.1017/CBO9780511804090.
  • [3] Mohamed Faouzi Atig and Pierre Ganty. Approximating Petri net reachability along context-free traces. In Proceedings of the IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2011, volume 13 of LIPIcs, pages 152–163. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2011. doi:10.4230/LIPIcs.FSTTCS.2011.152.
  • [4] David A. Mix Barrington, Neil Immerman, and Howard Straubing. On uniformity within NC1. Journal of Computer and System Sciences, 41:274–306, 1990. doi:10.1016/0022-0000(90)90022-D.
  • [5] Martin Beaudry and Pierre McKenzie. Circuits, matrices, and nonassociative computation. Journal of Computer and System Sciences, 50(3):441–455, 1995. doi:10.1006/JCSS.1995.1035.
  • [6] Michael Ben-Or and Richard Cleve. Computing algebraic formulas using a constant number of registers. SIAM Journal on Computing, 21(1):54–58, 1992. doi:10.1137/0221006.
  • [7] Clotilde Bizière and Wojciech Czerwinski. Reachability in one-dimensional pushdown vector addition systems is decidable. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, pages 1851–1862. ACM, 2025. doi:10.1145/3717823.3718149.
  • [8] Richard P. Brent. The parallel evaluation of general arithmetic expressions. Journal of the ACM, 21(2):201–206, 1974. doi:10.1145/321812.321815.
  • [9] Samuel R. Buss. The Boolean formula value problem is in ALOGTIME. In Proceedings of the 19th Annual Symposium on Theory of Computing, STOC 1987, pages 123–131. ACM Press, 1987. doi:10.1145/28395.28409.
  • [10] Samuel R. Buss, Stephen A. Cook, A. Gupta, and V. Ramachandran. An optimal parallel algorithm for formula evaluation. SIAM Journal on Computing, 21(4):755–780, 1992. doi:10.1137/0221046.
  • [11] Andrew Chiu, George I. Davida, and Bruce E. Litow. Division in logspace-uniform NC1. RAIRO – Theoretical Informatics and Applications, 35(3):259–275, 2001. doi:10.1051/ITA:2001119.
  • [12] Michal P. Chytil and Burkhard Monien. Caterpillars and context-free languages. In Proceedings of the 7th Annual Symposium on Theoretical Aspects of Computer Science, STACS 1990, volume 415 of Lecture Notes in Computer Science, pages 70–81. Springer, 1990. doi:10.1007/3-540-52282-4.
  • [13] James Cook and Ian Mertz. Tree evaluation is in space O(lognloglogn). In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 1268–1278. ACM, 2024. doi:10.1145/3618260.3649664.
  • [14] Stephen A. Cook. A taxonomy of problems with fast parallel algorithms. Information and Control, 64(1-3):2–21, 1985. doi:10.1016/S0019-9958(85)80041-3.
  • [15] Bruno Courcelle. Graph rewriting: An algebraic and logic approach. In Jan van Leeuwen, editor, Handbook of Theoretical Computer Science, Volume B: Formal Models and Semantics, pages 193–242. Elsevier and MIT Press, 1990. doi:10.1016/B978-0-444-88074-1.50010-X.
  • [16] Laure Daviaud, Marcin Jurdziński, and K. S. Thejaswini. The Strahler number of a parity game. In Proceedings of the 47th International Colloquium on Automata, Languages, and Programming, ICALP 2020, volume 168 of LIPIcs, pages 123:1–123:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ICALP.2020.123.
  • [17] Luc Devroye and Paul Kruszewski. A note on the Horton-Strahler number for random trees. Information Processing Letters, 56(2):95–99, 1995. doi:10.1016/0020-0190(95)00114-R.
  • [18] Luc Devroye and Paul Kruszewski. On the Horton-Strahler number for random tries. RAIRO – Theoretical Informatics and Applications, 30(5):443–456, 1996. doi:10.1051/ita/1996300504431.
  • [19] Peter J. Downey, Ravi Sethi, and Robert Endre Tarjan. Variations on the common subexpression problem. Journal of the ACM, 27(4):758–771, 1980. doi:10.1145/322217.322228.
  • [20] Andrzej Ehrenfeucht, Grzegorz Rozenberg, and Dirk Vermeir. On ETOL systems with finite tree-rank. SIAM Journal on Computing, 10(1):40–58, 1981. doi:10.1137/0210004.
  • [21] Michael Elberfeld, Andreas Jakoby, and Till Tantau. Logspace versions of the theorems of Bodlaender and Courcelle. In Proceedings of the 51th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2010, pages 143–152. IEEE Computer Society, 2010. doi:10.1109/FOCS.2010.21.
  • [22] Michael Elberfeld, Andreas Jakoby, and Till Tantau. Algorithmic meta theorems for circuit classes of constant and logarithmic depth. In Proceedings of the 29th International Symposium on Theoretical Aspects of Computer Science, STACS 2012, volume 14 of LIPIcs, pages 66–77. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2012. doi:10.4230/LIPIcs.STACS.2012.66.
  • [23] Andrey Petrovich Ershov. On programming of arithmetic operations. Communications of the ACM, 1(8):3–6, 1958. doi:10.1145/368892.368907.
  • [24] Javier Esparza, Stefan Kiefer, and Michael Luttenberger. Newtonian program analysis. Journal of the ACM, 57(6), 2010. doi:10.1145/1857914.1857917.
  • [25] Javier Esparza, Michael Luttenberger, and Maximilian Schlund. A brief history of Strahler numbers. In Proceedings of the 8th International Conference on Language and Automata Theory and Applications, LATA 2014, volume 8370 of Lecture Notes in Computer Science, pages 1–13. Springer, 2014. doi:10.1007/978-3-319-04921-2_1.
  • [26] Philippe Flajolet, Jean-Claude Raoult, and Jean Vuillemin. The number of registers required for evaluating arithmetic expressions. Theoretical Computer Science, 9(1):99–125, 1979. doi:10.1016/0304-3975(79)90009-4.
  • [27] Philippe Flajolet, Paolo Sipala, and Jean-Marc Steyaert. Analytic variations on the common subexpression problem. In Proceedings of the 17th International Colloquium on Automata, Languages and Programming, ICALP 1990, volume 443 of Lecture Notes in Computer Science, pages 220–234. Springer, 1990. doi:10.1007/BFB0032034.
  • [28] Moses Ganardi and Markus Lohrey. A universal tree balancing theorem. ACM Transactions on Computation Theory, 11(1):1:1–1:25, 2019. doi:10.1145/3278158.
  • [29] Moses Ganardi and Markus Lohrey. On the complexity of computing Strahler numbers, 2025. arXiv:2512.19060.
  • [30] Moses Ganardi, Irmak Saglam, and Georg Zetzsche. Directed regular and context-free languages. In Proceedings of the 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024, volume 289 of LIPIcs, pages 36:1–36:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.STACS.2024.36.
  • [31] Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP–completeness. Freeman, 1979.
  • [32] Adrià Gascón, Markus Lohrey, Sebastian Maneth, Carl Philipp Reh, and Kurt Sieber. Grammar-based compression of unranked trees. Theory of Computing Systems, 64(1):141–176, 2020. doi:10.1007/S00224-019-09942-Y.
  • [33] Seymour Ginsburg and Edwin H. Spanier. Derivation-bounded languages. Journal of Computer and System Sciences, 2(3):228–250, 1968. doi:10.1016/S0022-0000(68)80009-1.
  • [34] Jozef Gruska. A few remarks on the index of context-free grammars and languages. Information and Control, 19(3):216–223, 1971. doi:10.1016/S0019-9958(71)90095-7.
  • [35] William Hesse, Eric Allender, and David A. Mix Barrington. Uniform constant-depth threshold circuits for division and iterated multiplication. Journal of Computer and System Sciences, 65:695–716, 2002. doi:10.1016/S0022-0000(02)00025-9.
  • [36] John E. Hopcroft and Jeffrey D. Ullman. Introduction to Automata Theory, Languages and Computation. Addison–Wesley, Reading, MA, 1979.
  • [37] Robert E. Horton. Erosional development of streams and their drainage basins: hydro-physical approach to quantitative morphology. Geological Society of America Bulletin, 56(3):275–370, 1945. doi:10.1130/0016-7606(1945)56[275:EDOSAT]2.0.CO;2.
  • [38] Andreas Jakoby and Till Tantau. Computing shortest paths in series-parallel graphs in logarithmic space. In Complexity of Boolean Functions, volume 06111 of Dagstuhl Seminar Proceedings. Internationales Begegnungs- und Forschungszentrum für Informatik (IBFI), Schloss Dagstuhl, Germany, 2006. doi:10.4230/DagSemProc.06111.6.
  • [39] Rainer Kemp. The average number of registers needed to evaluate a binary tree optimally. Acta Informatica, 11(4):363–372, 1979. doi:10.1007/BF00289094.
  • [40] S. Rao Kosaraju. On parallel evaluation of classes of circuits. In Proceedings of the 10th Conference on Foundations of Software Technology and Theoretical Computer Science, volume 472 of Lecture Notes in Computer Science, pages 232–237. Springer, 1990. doi:10.1007/3-540-53487-3_48.
  • [41] Andreas Krebs, Nutan Limaye, and Michael Ludwig. A unified method for placing problems in polylogarithmic depth. In Proceedings of the 37th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2017, volume 93 of LIPIcs, pages 36:36–36:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.FSTTCS.2017.36.
  • [42] Paul Kruszewski. A note on the Horton-Strahler number for random binary search trees. Information Processing Letters, 69(1):47–51, 1999. doi:10.1016/S0020-0190(98)00192-6.
  • [43] Markus Lohrey. On the parallel complexity of tree automata. In Proceedings of the 12th International Conference on Rewrite Techniques and Applications, RTA 2001, number 2051 in Lecture Notes in Computer Science, pages 201–215. Springer, 2001. doi:10.1007/3-540-45127-7_16.
  • [44] Markus Lohrey. Grammar-based tree compression. In Proceedings of the 19th International Conference on Developments in Language Theory, DLT 2015, number 9168 in Lecture Notes in Computer Science, pages 46–57. Springer, 2015. doi:10.1007/978-3-319-21500-6_3.
  • [45] Markus Lohrey, Andreas Rosowski, and Georg Zetzsche. Membership problems in finite groups. Journal of Algebra, 675:23–58, 2025. doi:10.1016/j.jalgebra.2025.03.011.
  • [46] Carine Pivoteau, Bruno Salvy, and Michèle Soria. Algorithms for combinatorial structures: Well-founded systems and Newton iterations. Journal of Combinatorial Theory, Series A, 119(8):1711–1773, 2012. doi:10.1016/j.jcta.2012.05.007.
  • [47] Klaus Reinhardt and Eric Allender. Making nondeterminism unambiguous. SIAM Journal on Computing, 29(4):1118–1131, 2000. doi:10.1137/S0097539798339041.
  • [48] Walter L. Ruzzo. On uniform circuit complexity. Journal of Computer and System Sciences, 22(3):365–383, 1981. doi:10.1016/0022-0000(81)90038-6.
  • [49] Petra Scheffler. A linear algorithm for the pathwidth of trees. In Rainer Bodendiek and Rudolf Henn, editors, Topics in Combinatorics and Graph Theory: Essays in Honour of Gerhard Ringel, pages 613–620. Physica-Verlag HD, 1990. doi:10.1007/978-3-642-46908-4_70.
  • [50] Yousef Shakiba, Henry Sinclair-Banks, and Georg Zetzsche. A complexity dichotomy for semilinear target sets in automata with one counter. In Proceedings of the 40th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2025, pages 594–608. IEEE, 2025. doi:10.1109/LICS65433.2025.00051.
  • [51] Ekaterina Shemetova, Alexander Okhotin, and Semyon Grigorev. Rational index of languages defined by grammars with bounded dimension of parse trees. Theory of Computing Systems, 68(3):487–511, 2023. doi:10.1007/s00224-023-10159-3.
  • [52] Philip M. Spira. On time-hardware complexity tradeoffs for boolean functions. In Proceedings of the 4th Hawaii Symposium on System Sciences, pages 525–527, 1971.
  • [53] Arthur N. Strahler. Hypsometric (area-altitude) analysis of erosional topology. Geological Society of America Bulletin, 63(11):1117–1142, 1952. doi:10.1130/0016-7606(1952)63[1117:HAAOET]2.0.CO;2.
  • [54] Ivan Hal Sudborough. On the tape complexity of deterministic context-free languages. Journal of the ACM, 25(3):405–414, 1978. doi:10.1145/322077.322083.
  • [55] Joseph Swernofsky and Michael Wehar. On the complexity of intersecting regular, context-free, and tree languages. In Proceedings of the 42nd International Colloquium Automata, Languages, and Programming, Part II, ICALP 2015, volume 9135 of Lecture Notes in Computer Science, pages 414–426. Springer, 2015. doi:10.1007/978-3-662-47666-6_33.
  • [56] Xavier Viennot. Trees. In Mots, mélanges offert á M.P. Schützenberger. Hermes, Paris, 1990. Available online at http://www.xavierviennot.org.
  • [57] Heribert Vollmer. Introduction to Circuit Complexity - A Uniform Approach. Texts in Theoretical Computer Science. An EATCS Series. Springer, 1999. doi:10.1007/978-3-662-03927-4.
  • [58] R. Ryan Williams. Simulating time with square-root space. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, pages 13–23. ACM, 2025. doi:10.1145/3717823.3718225.