Stav dette: Element stamp algorithm for matrix formulation of symbolic circuits