Reference implementation for connetion multiplication