It can be shown that N inverters can invert 2^N-1 independent inputs, given an unlimited supply of AND and OR gates. The classic version of this puzzle is to invert 3 independent inputs using AND gates, OR gates, and only 2 inverters.
i1, i2, and i3 are the inputs, n1 and n2 are the inverted signals, and o1, o2, and o3 are the outputs. "and" has higher precedence than "or".
So, start with N inverters. Replace 3 of them with 2. Keep doing that until you're down to 2 inverters.
I was skeptical at first, because such a design requires so much feedback that I was sure the system would oscillate when switching between two particular states. But after writing a program to test every possible state change (32^2), it appears that this system settles after a maximum of 3 feedback logic iterations. I did not include gate delays in the simulation, however, which could increase the number of iterations before the system settles.