Tekstiviesti: Element stamp algorithm for matrix formulation of symbolic circuits