path inversion function
preliminary net optimization algorithms