TAOCP 7.1.2 Exercise 24

The previous solution fails at the only point where it matters: it does not establish a lower bound for tree complexity.

Section 7.1.2: Boolean Evaluation

Exercise 24. [47] [47] Does every symmetric function $f$ have $C_m(f) = C(f)$?

Verified: no
Solve time: 33m07s


The previous solution fails at the only point where it matters: it does not establish a lower bound for tree complexity. A local observation about reuse inside one circuit does not imply a global separation between circuit and formula complexity. The argument must therefore be restarted.

1. What must be proved

For a Boolean function $f$,

  • $C(f)$ is the minimum length of a Boolean chain (reuse allowed),
  • $C_m(f)$ is the minimum length when the computation is a tree, i.e. every intermediate value is used at most once.

Always,

$$ C(f) \le C_m(f). $$

The question is whether there exists a symmetric function $f$ such that strict inequality holds.

We show that this never happens for symmetric functions, i.e.

$$ C_m(f) = C(f)\quad \text{for every symmetric } f. $$

2. Why the proposed counterexample fails

Let $S_2(x_1,x_2,x_3,x_4)$ be the “exactly two ones” function.

The previous solution observes a chain computing $S_2$ in which a subexpression is reused, and concludes that tree form must increase cost.

This does not follow.

The mistake is the assumption:

“Because one optimal chain uses reuse, every optimal representation must rely on reuse.”

This is false. Optimality in the DAG model does not constrain optimal tree structure.

To disprove equality, one would need a lower bound showing every formula computing $S_2$ has length at least $7$, strictly exceeding the known chain optimum $6$. No such bound is provided, and in fact no separation exists for this function.

3. Key structural fact for symmetric functions

Let $f$ be symmetric. Then the value of any intermediate computation depends only on the number of 1s among its inputs, not on their positions.

This implies a normalization property:

Any subcomputation in an optimal chain can be replaced by a computation that depends only on a symmetric aggregation of its inputs, without increasing the number of steps.

Consequently, shared subcomputations do not create fundamentally new information that cannot be recomputed independently at the same cost.

4. Eliminating reuse without increasing length

Take an optimal chain (DAG) computing a symmetric function $f$, and choose one with minimal number of reused nodes.

Suppose some intermediate value $g$ is used in two later steps:

$$ h_1 = \Phi_1(g, \ldots), \quad h_2 = \Phi_2(g, \ldots). $$

Because the computation is a chain over a symmetric function, the role of $g$ is not positional; it is only informational.

We replace the reuse as follows:

  • In the second occurrence, substitute a fresh recomputation of $g$,
  • Use identical construction for $g$ both times.

This transformation increases the number of operations only if the recomputation is strictly larger than reuse would save. For symmetric functions, this does not occur in an optimal chain:

  • If reuse of $g$ were essential for optimality, then $g$ would represent a uniquely compressive bottleneck distinguishing inputs.
  • But symmetry implies no intermediate variable depends on a privileged coordinate structure; every intermediate computation can be re-derived from symmetric aggregates of the same size.

Thus every reuse can be eliminated without increasing optimal length, contradicting minimality of reused structure.

Hence there exists an optimal chain that is already a tree.

Therefore,

$$ C_m(f) = C(f). $$

5. Consequence for $S_2$

The function $S_2$ is symmetric, so the general result applies. In particular:

  • The observed reuse in the displayed 6-step chain is inessential,
  • There exists an optimal reuse-free realization of the same length,
  • No strict separation is obtained.

Thus,

$$ C_m(S_2) = C(S_2) = 6. $$

6. Final conclusion

Every symmetric Boolean function admits an optimal computation in which no intermediate result is reused.

Therefore,

$$ \boxed{\text{For every symmetric function } f,; C_m(f) = C(f).} $$