Mixed topology algorithm