Maximize a function with a condition.

42 Views Asked by At

The problem is placing $n$ number of points on a sphere in $\mathbb{R}^m$, as far apart as possible from eachother. I want to formulate this problem as an optimizationproblem where the objectfunction is the function that describes the sum of all distances between the points and the condition is for the point to actually be on the sphere.

So I need to set upp the problem as searching for $\text{max} \ f(n)$ when $g(n)=0.$

Let $p_1,p_2,...,p_n$ be the set of points placed on the sphere and $p_i=(x_1,x_2,...,x_m)$. First, we have that

$$f(n) = \sum_{i<j}|p_i-p_j|.$$

For the points to be on the hypersphere with radius $r$, they have to be on the same distance from the origin, so

$$g(n)=\sum_{i=1}^m x_i^2=r^2.$$

Are my functions correct? Note that this function is to be maximized using MATLAB, but I first need to set up the correct equations.

1

There are 1 best solutions below

7
On

It seems to be correct to me.

As an alternative for the distance you could also consider the following $$f(n) = \sum_{i<j}(p_i-p_j)\cdot (p_i-p_j)$$