Optimization is a multidimensional problem, so there is no single "optimal" solution for most of the parts.
For example, typical Mux solutions use 4 parts; a mix of And, Or and Not. It's also possible to build the Mux from 4 Nands.
Which of those solutions is better? The And/Or/Not solution is much easier to understand, so I would consider it better that the more obscure Nand solution.
In the actual physical implementation, neither of these solutions is used. Modern ICs implement multiplexors using
transmission gates.
The Not and the transmission gates are 2 transistors each for a total of 6 transistors. A CMOS Nand gate requires 4 transistors.
In most physical implmentations, circuit speed, size, and power are a 3-way tradeoff.
If you mail me your solutions, I will be happy to comment on them.
--Mark