Skip to content
DeepForgeby svx
All problems
EasyOptimizationop-336

Condition Number Ratio

Problem

The condition number of a strongly convex quadratic with smoothness L and strong convexity mu is kappa = L / mu.

Given L and mu > 0, return the condition number.

Hint

It is the ratio of largest to smallest curvature.

Test cases

case 1
in: [10,2]
expected: 5
case 2
in: [1,1]
expected: 1
case 3
in: [100,0.5]
expected: 200
Starter codePython
def condition_number_ratio(l, mu):
    # Your code here
    pass

3 test cases · run your code against them in the editor