<p>Yes, this is a natural idea and people have thought about it. In short, the problem is that even the state-of-the-art SAT/QBF-solvers allow to find very small circuits only (with about 10&ndash;12 gates), not to say about proving that there is no small circuit. Some references:</p>

<p>
<li>Ryan Williams, <a href="http://arxiv.org/abs/0811.1305">Applying practice to theory</a> (2008): </p>

<blockquote>
  <p>Our knowledge of Boolean circuit complexity is quite poor. &lt;…>  One good reason why we don’t know much about the true power of circuits is that we don’t have many examples of minimum circuits. We don’t know, for example, what an optimal circuit for $3 \times 3$ Boolean matrix multiplication looks like.</p>
  
  <p>One good reason why we don’t know much about the true power of circuits is that we don’t have many examples of minimum circuits. We don’t know, for example, what an optimal circuit for $3 \times 3$ Boolean matrix multiplication looks like. &lt;…> Might we benefit from an Encyclopedia of Minimum Circuits? For example, what do the smallest Boolean circuits for $10 \times 10$ Boolean matrix multiplication look like? Are they regular in structure? It is likely that the answers would give valuable insight into the complexity of the problem. The best algorithms we know of reduce the problem to matrix multiplication over a ring, which is then solved by a highly regular, recursive construction (such as Strassen’s [Str69]). Even if the cataloged circuits are not truly minimal but close to that, concrete examples for small inputs could be useful for theoreticians to mine for inspiration, or perhaps for computers to mine for patterns via machine learning techniques. The power of small examples cannot be underestimated.</p>
  
  <p>Experiments with QBF solvers have not yet revealed significant new insight. So far, they have discovered one fact: the optimal size circuit for $2 \times 2$ Boolean matrix multiplication is the obvious one. Well, duh. What about the $3 \times 3$ case? This is already difficult! The sKizzo QBF solver [Ben05] can prove that there is no circuit for $3 
\times 3$ that has 10 gates, but nothing beyond that. Even when we restrict the gates to have fan-in two, the solver crashes on larger instances.</li></p>
</blockquote>

<p><li>Together with Evgeny Demenkov, Arist Kojevnikov, and Grigory Yaroslavtsev we managed to use SAT-solvers to improve upper bounds on the circuit size of symmetric functions. Details can be found in the following two papers: <a href="http://logic.pdmi.ras.ru/~kulikov/sites/default/files/drafts/2009_finding_efficient_circuits_sat.pdf">Finding Efficient Circuits Using SAT-solvers</a> (2009), <a href="http://logic.pdmi.ras.ru/~kulikov/sites/default/files/drafts/2010_upper_bounds_symmetric_ipl.pdf">New Upper Bounds on the Boolean Circuit Complexity of Symmetric Functions</a> (2010). Still, we do not know the exact circuit complexity for many elementary functions: for example, $2.5n \le C(MOD_3) \le 3n$, $2n \le C(AND,OR,XOR) \le 2.5n$.</p>

<p></li></p>

<p><li>Exercises 477&ndash;481 in <a href="http://www-cs-faculty.stanford.edu/~uno/fasc6a.ps.gz">Section 7.2.2.2: Satisfiability</a> of TAOCP Volume 4 by Don Knuth (2015) discuss ways of finding optimal circuits with the help of SAT solvers. From the solution to exercise 481:</p>

<blockquote>
  <p>It’s true for $n \le 5$. Here’s a 12-step computation when $n=6$ and $a=0$, found in 2014 by Armin Biere: &lt;…> The case $n=6$ and $a \neq 0$, which lies tantalizingly close to the limits of today’s solvers, is still unknown.
  </li>
  </p>
</blockquote>

CC BY-SA 3.0
2015-07-12T03:38:26.103Z
2015-07-12T03:38:26.103Z
Alexander S. Kulikov
<p>In many nonuniform models - Boolean circuits, algebraic circuits, decision trees, branching programs, etc. - computing exact complexity seems to be significantly harder than computing asymptotic complexity. While I maintain hope that your intuition is correct - that understanding exact complexity of small instances might lead to asymptotic insights - I know of only a few cases where this has happened:</p>

<ul>
<li><p>Algorithms and lower bounds for matrix multiplication of small formats. There has been a fair amount of work on 2x2 (<a href="http://dx.doi.org/10.1007/BF02165411">Strassen</a>), 3x3 (<a href="http://dx.doi.org/10.1090/S0002-9904-1976-13988-2">Laderman</a>), and other small formats for matrix multiplication (see also <a href="http://dx.doi.org/10.1137/0215043">Johnson-McLoughlin</a> and <a href="http://dx.doi.org/10.1137/0120004">Hopcroft-Kerr</a>). Originally, these could often be used to give asymptotic improvements, because of the recursive structure of matrix multiplication. Eventually, <a href="http://dx.doi.org/10.1016/S0747-7171(08)80013-2">Coppersmith-Winograd</a> supplanted all of these in the asymptotic realm. </p></li>
<li><p>GCT-style lower bounds on small matrix multiplication due to <a href="http://dx.doi.org/10.1145/2488608.2488627">B&uuml;rgisser and Ikenmeyer</a> have yielded asymptotic lower bounds on matrix multiplication. I think this is at least partially because the representation-theoretic structure naturally suggests how to turn a single, exact lower bound into an infinite family.</p></li>
<li><p>(See Alexander Kulikov's answer for a couple more)</p></li>
</ul>

<p>Aside from these, there has been a small but nontrivial amount of work on exact complexity of various problems, but mostly problems easier than GraphIso or Primes (except for the last example of the permanent). While I find this work interesting and maintain hope that it will lead to larger theoretical insights, as far as I know it has not yet done so.</p>

<ul>
<li><p>Knuth considered the question of the exact number of comparisons needed to sort a list of $n$ elements in Chapter 5, Vol. 3 of <a href="http://rads.stackoverflow.com/amzn/click/0321751043">TAOCP</a>. Further progress has been made since then (see the work by <a href="http://dx.doi.org/10.1016/j.ipl.2006.09.001">Peczarski</a>, and references therein).</p></li>
<li><p>There has also been some work on exact minimum-depth sorting networks (<a href="http://arxiv.org/abs/1310.6271">Bundala and Z&aacute;vodn&yacute;</a> seems to be the latest).</p></li>
<li><p>With exact complexity, there can be number-theoretic effects due to the size of the input. (When dealing with a divide-and-conquer algorithm, for example, it is easy to imagine how inputs of size $2^k$ might differ from inputs of odd size when it comes to exact complexity.) See <a href="http://dx.doi.org/10.1137/1.9781611973082.28">Drmota and Szpankowski</a> for examples of this, as well as an exact master theorem.</p></li>
<li><p>Determinantal complexity of small permanents (upper bound by <a href="https://scholar.google.com/citations?view_op=view_citation&amp;hl=en&amp;user=EVzRQKQAAAAJ&amp;citation_for_view=EVzRQKQAAAAJ:9yKSN-GCB0IC">B. Grenet</a> and recent lower bound on $per_3$ by <a href="http://arxiv.org/abs/1505.02205">Alper, Bogart, and Velasco</a>) and other functions (<a href="http://dx.doi.org/10.1007/978-3-642-45030-3_12">Qiao, Sun, and Yu</a>).</p></li>
</ul>

CC BY-SA 3.0
2015-07-12T22:12:29.537Z
2015-07-12T22:12:29.537Z
Joshua Grochow
<p>Has anyone explored what is the circuit complexity of classic decision problems such as Primes or Graph-Isomorphism for small input size $N$?</p>

<p>While most people are interested in the how the scaling goes as $N \to \infty$, I think it would also be interesting to see how this grows for small N. Sure, we now know Primes is in P, but it would be neat to see how it grows, and maybe even sharp changes in the growth rate of the graph as the inputs get large enough that a different algorithm becomes more efficient.</p>

<p>There is even the (unlikely) possibility that someone could extract from a sequence of circuits a general algorithm.</p>

<p>It seems like this approach could answer <em>different</em> questions than are usually asked about $N \to \infty$.  With the advances of algorithms knowledge (SAT solvers, etc.) and super computing power, concrete answers could be obtained for small $N$.</p>

<p>Are there any references or lists of results for people explicitly computing circuit complexity of decision problems for small $N$?</p>

<p>If there are people working on this, what algorithms do they currently use to solve the minimal circuit problem (given a boolean function and set of gates, output a circuit using the minimal number of gates necessary)?</p>

CC BY-SA 3.0
2015-07-20T15:07:06.163Z
it appears to be nearly impossible to attack from this direction due to not even being able to compute optimal circuits for very "small" problems. this seems to be basically a result of kolmogorov complexity. one other seemingly promising/ equivalent direction, not very well known or much studied, is via [graph complexity](http://cstheory.stackexchange.com/questions/26017/statements-that-imply-mathbfp-neq-mathbfnp/26027#26027) which seems to allow study of "smaller" problems but still with major implications eg on complexity class separations... aka so called "magnification lemma" etc
vzn
<cc.complexity-theory><reference-request><circuit-complexity>
Computed circuit complexity of decision problems
TigerSpots
# Computed circuit complexity of decision problems

(Asked by: username_0 on 2015-07-08)

Has anyone explored what is the circuit complexity of classic decision problems such as Primes or Graph-Isomorphism for small input size $N$?

While most people are interested in the how the scaling goes as $N \to \infty$, I think it would also be interesting to see how this grows for small N. Sure, we now know Primes is in P, but it would be neat to see how it grows, and maybe even sharp changes in the growth rate of the graph as the inputs get large enough that a different algorithm becomes more efficient.

There is even the (unlikely) possibility that someone could extract from a sequence of circuits a general algorithm.

It seems like this approach could answer *different* questions than are usually asked about $N \to \infty$. With the advances of algorithms knowledge (SAT solvers, etc.) and super computing power, concrete answers could be obtained for small $N$.

Are there any references or lists of results for people explicitly computing circuit complexity of decision problems for small $N$?

If there are people working on this, what algorithms do they currently use to solve the minimal circuit problem (given a boolean function and set of gates, output a circuit using the minimal number of gates necessary)?

**Tags:** cc.complexity-theory, reference-request, circuit-complexity

> **Comments:**
> **username_1**: it appears to be nearly impossible to attack from this direction due to not even being able to compute optimal circuits for very "small" problems. this seems to be basically a result of kolmogorov complexity. one other seemingly promising/ equivalent direction, not very well known or much studied, is via [graph complexity](http://cstheory.stackexchange.com/questions/26017/statements-that-imply-mathbfp-neq-mathbfnp/26027#26027) which seems to allow study of "smaller" problems but still with major implications eg on complexity class separations... aka so called "magnification lemma" etc  

---

## 2 answers

### Answer by username_2 on 2015-07-12. Score: 7

Yes, this is a natural idea and people have thought about it. In short, the problem is that even the state-of-the-art SAT/QBF-solvers allow to find very small circuits only (with about 10–12 gates), not to say about proving that there is no small circuit. Some references:

- Ryan Williams, [Applying practice to theory](http://arxiv.org/abs/0811.1305) (2008):

> Our knowledge of Boolean circuit complexity is quite poor. <…> One good reason why we don’t know much about the true power of circuits is that we don’t have many examples of minimum circuits. We don’t know, for example, what an optimal circuit for $3 \times 3$ Boolean matrix multiplication looks like.
>
> One good reason why we don’t know much about the true power of circuits is that we don’t have many examples of minimum circuits. We don’t know, for example, what an optimal circuit for $3 \times 3$ Boolean matrix multiplication looks like. <…> Might we benefit from an Encyclopedia of Minimum Circuits? For example, what do the smallest Boolean circuits for $10 \times 10$ Boolean matrix multiplication look like? Are they regular in structure? It is likely that the answers would give valuable insight into the complexity of the problem. The best algorithms we know of reduce the problem to matrix multiplication over a ring, which is then solved by a highly regular, recursive construction (such as Strassen’s [Str69]). Even if the cataloged circuits are not truly minimal but close to that, concrete examples for small inputs could be useful for theoreticians to mine for inspiration, or perhaps for computers to mine for patterns via machine learning techniques. The power of small examples cannot be underestimated.
>
> Experiments with QBF solvers have not yet revealed significant new insight. So far, they have discovered one fact: the optimal size circuit for $2 \times 2$ Boolean matrix multiplication is the obvious one. Well, duh. What about the $3 \times 3$ case? This is already difficult! The sKizzo QBF solver [Ben05] can prove that there is no circuit for $3
> \times 3$ that has 10 gates, but nothing beyond that. Even when we restrict the gates to have fan-in two, the solver crashes on larger instances.

- Together with Evgeny Demenkov, Arist Kojevnikov, and Grigory Yaroslavtsev we managed to use SAT-solvers to improve upper bounds on the circuit size of symmetric functions. Details can be found in the following two papers: [Finding Efficient Circuits Using SAT-solvers](http://logic.pdmi.ras.ru/~kulikov/sites/default/files/drafts/2009_finding_efficient_circuits_sat.pdf) (2009), [New Upper Bounds on the Boolean Circuit Complexity of Symmetric Functions](http://logic.pdmi.ras.ru/~kulikov/sites/default/files/drafts/2010_upper_bounds_symmetric_ipl.pdf) (2010). Still, we do not know the exact circuit complexity for many elementary functions: for example, $2.5n \le C(MOD\_3) \le 3n$, $2n \le C(AND,OR,XOR) \le 2.5n$.

- Exercises 477–481 in [Section 7.2.2.2: Satisfiability](http://www-cs-faculty.stanford.edu/~uno/fasc6a.ps.gz) of TAOCP Volume 4 by Don Knuth (2015) discuss ways of finding optimal circuits with the help of SAT solvers. From the solution to exercise 481:

> It’s true for $n \le 5$. Here’s a 12-step computation when $n=6$ and $a=0$, found in 2014 by Armin Biere: <…> The case $n=6$ and $a \neq 0$, which lies tantalizingly close to the limits of today’s solvers, is still unknown.


---

### Answer by username_3 on 2015-07-12. Score: 5

In many nonuniform models - Boolean circuits, algebraic circuits, decision trees, branching programs, etc. - computing exact complexity seems to be significantly harder than computing asymptotic complexity. While I maintain hope that your intuition is correct - that understanding exact complexity of small instances might lead to asymptotic insights - I know of only a few cases where this has happened:

* Algorithms and lower bounds for matrix multiplication of small formats. There has been a fair amount of work on 2x2 ([Strassen](http://dx.doi.org/10.1007/BF02165411)), 3x3 ([Laderman](http://dx.doi.org/10.1090/S0002-9904-1976-13988-2)), and other small formats for matrix multiplication (see also [Johnson-McLoughlin](http://dx.doi.org/10.1137/0215043) and [Hopcroft-Kerr](http://dx.doi.org/10.1137/0120004)). Originally, these could often be used to give asymptotic improvements, because of the recursive structure of matrix multiplication. Eventually, [Coppersmith-Winograd](http://dx.doi.org/10.1016/S0747-7171(08)80013-2) supplanted all of these in the asymptotic realm.
* GCT-style lower bounds on small matrix multiplication due to [Bürgisser and Ikenmeyer](http://dx.doi.org/10.1145/2488608.2488627) have yielded asymptotic lower bounds on matrix multiplication. I think this is at least partially because the representation-theoretic structure naturally suggests how to turn a single, exact lower bound into an infinite family.
* (See Alexander Kulikov's answer for a couple more)

Aside from these, there has been a small but nontrivial amount of work on exact complexity of various problems, but mostly problems easier than GraphIso or Primes (except for the last example of the permanent). While I find this work interesting and maintain hope that it will lead to larger theoretical insights, as far as I know it has not yet done so.

* Knuth considered the question of the exact number of comparisons needed to sort a list of $n$ elements in Chapter 5, Vol. 3 of [TAOCP](http://rads.stackoverflow.com/amzn/click/0321751043). Further progress has been made since then (see the work by [Peczarski](http://dx.doi.org/10.1016/j.ipl.2006.09.001), and references therein).
* There has also been some work on exact minimum-depth sorting networks ([Bundala and Závodný](http://arxiv.org/abs/1310.6271) seems to be the latest).
* With exact complexity, there can be number-theoretic effects due to the size of the input. (When dealing with a divide-and-conquer algorithm, for example, it is easy to imagine how inputs of size $2^k$ might differ from inputs of odd size when it comes to exact complexity.) See [Drmota and Szpankowski](http://dx.doi.org/10.1137/1.9781611973082.28) for examples of this, as well as an exact master theorem.
* Determinantal complexity of small permanents (upper bound by [B. Grenet](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=EVzRQKQAAAAJ&citation_for_view=EVzRQKQAAAAJ:9yKSN-GCB0IC) and recent lower bound on $per\_3$ by [Alper, Bogart, and Velasco](http://arxiv.org/abs/1505.02205)) and other functions ([Qiao, Sun, and Yu](http://dx.doi.org/10.1007/978-3-642-45030-3_12)).


---

