# Applet. Finding Geometric Medians and Geometric Centers on a circle from discrete sample points.

Let there be some distribution created by discrete set of points in a Euclidean space. Consider

**two estimators of location**of this distribution: the geometric median (GM) -the*point**minimizing***the sum of distances to the all points**and the geometric center (GC), defined as point minimizing the**sum of the squares of the distances**to each point. We generalize these estimates to the case when they are searched in a restricted region, for example, finding these estimates on a circle of radius R. lP:={p_{1},p_{2},p_{3},p_{4},p_{5},p_{6}} -discrete sample of movable points in the x-y plane. f(x) =Sum(Zip(sqrt((R* cos(x) - x(b))² + (R* sin(x) - y(b))²), b, lP))} f_{q}(x) = Sum(Zip(( (R* cos(x) - x(b))² + (R* sin(x) - y(b))², b, lP)). Functions: f(x) -Sum of distances, f_{q}(x) -Sum of the squares of distances between a set of points lP and a Test Point x0=(R; x) on a circle c.__use the__**Problem:****to find critical points {c***method of Lagrange multipliers*_{k}} of these functions on the the circle c(x,y):= x^{2}+y^{2}=R^{2}.**☛**For illustration: the vectors are attached at points c_{k}.*This applet is used to explore the distribution of**geometric medians and centers**on the circle of radius R, „induces“ by the discrete sample of movable points from lP in the x-y plane*. Description in https://www.geogebra.org/m/puqnepmv. In applet: F -Ferma Point; Cm- Centroid.**Some conclusions:**In the case of the

*Lagrange problem*-

*extremizing*the

**sum of distances**from sample points lP to points on the circle, there are exact solutions and iterative solutions -

*: critical points: max/min. The results coincide with a high degree. In the*

**button****Extremum**table, you can see the relative deviation of errors. By changing the location of points from the lP set, you can verify the validity of the above conclusions. I used these iterative methods for the case of a more complex problem -finding extreme points on a sphere. In the future, the critical points: local maxima and minima, and saddle points will be called geometric medians of points from lP in a restricted region -circle. In the case of the Lagrange problem -

_{f}*of the*

*extremizing***sum of the**

**squares of the distances**, you can find explicit formulas - its coordinates are associated with the average values of the coordinates of points. In this case, the problem has only two critical points -two antipodal points: the local maximum and minimum. This points are on the same axis passing through the center of the circle O and the center of mass Cm and will be called geometric centers of points from lP in a

*restricted region*-circle .

## Geometric Medians on the circle

_{k}} -Geometric Medians on the circle, - f=f(x)-

**Sum of distances**from a point x

_{0}=(R; x) on the circle to the discrete set lP={p1, p2,...,p6} of sample points in the x-y plane. -the resultant of all unit vectors from the set of points lP to each critical point c

_{k}(Geometric Medians point) is parallel to its positional vector c

_{k}, i.e. the angle Δφ

_{k}between these two vectors is 0 or π (see in the table) . -Local and global maxima and minima for f(x) -Table of relative accuracy of finding critical points obtained by iterative methods (click on checkbox "Extremum

_{f}").

*for the functions f(x) depending on the angular position of the Test Point x*

**-**Critical points_{0}on the circle.

## Geometric Centers on the circle

_{q}(x) -

**Sum of squares of the distances**from a point (R; x) on the circle to the discrete set lP={p1, p2,...,p6} of sample points in the x-y plane. - 2 Geometric Centers on the circle min

_{q}and max

_{q. }-

*Critical points*for the functions f

_{q}(x) depending on the angular position of the Test Point x

_{0}on the circle.

**Applets in a book:**Description. Finding Geometric Medians and Geometric Centers on a circle from discrete sample points. Applet. Finding Geometric Medians and Geometric Centers on a circle from discrete sample points. Finding the location of geometric medians on the circle of discrete sample points depending on the position of the test point. Method of Lagrange multipliers. Relative positioning of repulsive movable points on a circle. Generating an extreme arrangements of points on a circle Generating an extreme arrangements of points on a sphere Generating an extreme arrangements of points on a sphere with more structured calculation program-GeoGebra Forum- https://help.geogebra.org/topic/geogebra-windows-portable-zip-for-december

## Iterative methods for optimization -button: critical points: max/min

ltest

_{2}= Sequence((R; 2π / na j), j, 0, na ) -*Starting points for iterative methods*lZmax=CopyFreeObject(Zip(Last[IterationList((0,0)+R UnitVector(Sum[Zip(UnitVector(Z1 - r), r, lP)]), Z1, {a}, 300),1 ],a, ltest_{2})) lZmax' = CopyFreeObject(Unique(Zip((R; round(Angle(a), 16)), a, Flatten(lZmax))) ) lZmin=CopyFreeObject(Zip[Last[IterationList((0,0 )+ R UnitVector[ Sum[Zip[(p/ Length(p - Z2)),p,lP ]] ] , Z2, {a}, 300),1 ],a, ltest_{2}]) lZmin' = CopyFreeObject(Unique(Zip((R; round(Angle(a), 16)), a, Flatten(lZmin))) )## New Resources

## Discover Resources

Download our apps here: