All problems
Central Path Point on Probability Simplex
Problem
Minimizing -sum_i log(x_i) over the probability simplex has the symmetric central path point x_i = 1 / n.
Given n > 0, return the point as a list of n equal values.
Hint
Symmetry of the barrier and the constraint forces equal coordinates.
Test cases
case 1
in: [1]
expected: [1]
case 2
in: [2]
expected: [0.5,0.5]
case 3
in: [5]
expected: [0.2,0.2,0.2,0.2,0.2]
Starter codePython
def central_path_point_probability_simplex(n):
# Your code here
pass3 test cases · run your code against them in the editor