In short, I'm wondering if, given two propositional formulas, whether there is a standard method for finding the shortest sequence of operations that still have the same output as the two formulas. For example if we have the following formulas:

and

we can reduce the number of operations by introducing a new proposition:

and then Q becomes:

This reduced the number of operations (unary and binary) from 19 to 14. The new logic circuit for Q is:

Ideally I would like there to be only negations and disjunctions. Is there an algorithm for converting any proposition into my ideal simplified one? And is there an algorithm for introducing new propositions like above?

