A simplification of the Coates-Desoer formula for the gain of a flow graph