lambdaG function

Apply the LambdaG algorithm