<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Attainable Best Guarantee for the Accuracy of k-medians Clustering in [0; 1]</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Daniel Khachay Krasovsky Institute of Mathematics and Mechanics, Ural Federal University</institution>
          ,
          <addr-line>Ekaterinburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>If k is a part of an instance</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Michael Khachay Krasovsky Institute of Mathematics and Mechanics, Ural Federal University, Ekaterinburg, Russia Omsk State Technical University</institution>
          ,
          <addr-line>Omsk</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Vasiliy Pankratov Krasovsky Institute of Mathematics and Mechanics</institution>
        </aff>
      </contrib-group>
      <issue>6</issue>
      <fpage>322</fpage>
      <lpage>327</lpage>
      <abstract>
        <p>In this paper, one-dimensional k-medians clustering problem is considered in the context of zero-sum game between players choosing a sample and partitioning it into clusters, respectively. For any sample size n and k &gt; 1, an attainable guaranteed value of the clustering accuracy 0:5n=(2k − 1) (the low value of an appropriate game) is provided for samples taken from the segment [0; 1].</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Introduction
In data analysis, k-medians clustering problem is regarded as one of the famous center-based metric clustering
problems, whose instance can be defined as follows. For a given number k ≥ 1 and a finite sample = (x1; : : : ; xn)
taken from a metric space (X; ), it is required to find a partition of Nn = {1; : : : ; n} onto k clusters C1; : : : ; Ck
and, for any j-th cluster, to point out an appropriate center cj such that
k
∑ ∑
j=1 i∈Cj</p>
      <p>n
(xi; cj ) = ∑ min{ (xi; c1); : : : ; (xi; ck)} → min :
i=1
(1)
Equation (1) evidently implies that, for any j, the point cj ∈ Arg min{∑i∈Cj
(xi; c) : c ∈ X}; i.e. cj is a median
are known numerous approximation results. For instance, in [Kumar et al., 2010], for any fixed k, randomized
LTAS with time complexity of O(2(k=")O(1) · dn) is proposed. On the basis of the famous coresets technique,
in [Har-Peled and Mazumdar, 2004], RPTAS with polynomially depending on the number of clusters k time
complexity bound O(n + (k log n)O(1)), where = exp(O((1 − log ")=")d−1) is proposed. For d = 1, k-medians
problem is polynomially (and very efficiently) solvable. To date, the most efficient exact algorithm with time
complexity O(n log n + kn) is proposed in [Grønlund et al., 2017].</p>
      <p>
        Among others, the setting, where it is required to obtain a guaranteed accuracy of clustering for a fixed
number of clusters k and an arbitrary sample, is valuable
        <xref ref-type="bibr" rid="ref1 ref5">([Ben-David, 2015, Khachai and Neznakhina, 2017])</xref>
        for applications in combinatorial optimization and data analysis. In this paper, we study such a setting for the
1d-case of the k-medians clustering problem.
2
      </p>
      <p>Problem Statement and the Main Result
We consider the following two-player zero-sum game induced by k-medians clustering. There are two players
placing points in the unit segment of the real line. Strategies of the first player are samples = (x1; : : : ; xn),
xi ∈ [0; 1] of some given size n. Strategies of the second one are k-tuples = (c1; : : : ; ck), ci ∈ [0; 1]. The payoff
function F ( ; ) = ∑in=1 min{|xi − c1|; : : : ; |xi − ck|}. Goals of the first and the second players are to find the
lower
and the higher
v∗(n; k) =
v∗(n; k) =
sup
∈[0;1]n
inf
∈[0;1]k
inf
∈[0;1]k</p>
      <p>F ( ; )
sup F ( ; )
∈[0;1]n
values of the game, respectively.</p>
      <p>It is easy to verify that, for any k &gt; 1 and n &gt; 0, the game has no value, i.e. v∗(n; k) &lt; v∗(n; k). For many
reasons arising from applications in data analysis, combinatorial optimization, and computational geometry, it
is important to have an upper bound for v∗(n), which means the guaranteed accuracy of k-medians clustering of
an appropriate n-points sample. Although, v∗(n; k) can obviously be taken as an upper bound, for large values
of n it is imprecise and should be replaced with more accurate one.</p>
      <p>In this paper, we propose an attainable upper bound B(n; k) for v∗(n; k). Actually, to any n &gt; 0, k &gt; 1, and
∈ [0; 1]n, we show how to assign an appropriate k-tuple = (c1; : : : ; ck), i.e. how to construct a clustering
C1; : : : ; Ck with medians c1; : : : ; ck, such that
inf
∈[0;1]k</p>
      <p>F ( ; ) ≤ F ( ;
) ≤ B(n; k):</p>
    </sec>
    <sec id="sec-2">
      <title>Theorem.</title>
      <p>(i) For any k &gt; 1, n &gt; 0, and sample
(c1; : : : ; ck), cj ∈ [0; 1], j ∈ Nk, such that
= (x1; : : : ; xn), xi ∈ [0; 1], i ∈ Nn, there exists the k-tuple</p>
      <p>F ( ;</p>
      <p>n
) ≤ 2(2k − 1) :
=
(2)
(ii) For any k &gt; 1, there is n˜ = n˜(k) such that, for all n &gt; n˜, bound (2) is attained at some sample
= (k; n).</p>
      <p>Postponing the rigorous proof to the forthcoming paper, we restrict ourselves to some suggestive thoughts.
To put it simple, we consider the case of k = 2.
3</p>
      <p>Proof Sketch for k = 2
We start with the following simple upper bound
3.1</p>
    </sec>
    <sec id="sec-3">
      <title>Nave Upper Bound</title>
      <p>It can be assumed that the second player always adheres to the following strategy. He splits the segment [0; 1]
onto two equal parts and put c1 and c2 at the centers of each part as it is shown in Fig. 1
Obviously, in this case, for any x ∈ [0; 1], min{|x − c1|; |x − c2|} ≤ 1=4. Therefore, regardless of the choice
= (x1; : : : ; xn) of the first player, ∑n</p>
      <p>i=1 min{|xi − c1|; |xi − c2|} ≤ n=4, i.e. B(n; 2) ≤ n=4. Since, to complete
the first point of the proof (for the considered case k = 2), we need to show that B(n; 2) ≤ n=6, we need further
improvements.
Φ( ) = min
∑ |xi − c1| + ∑ |xi − c2| : C1 ∪ C2 = Nn</p>
      <p>
= min 

−
i∈C2
⌊m1=2⌋
∑
i=1
xi +
m1
∑
i=⌈m1=2⌉+1</p>
      <p>xi −
Hereinafter, without loss of generality, we assume that any sample = (x1; : : : ; xn) contains points xi in ascending
order. Moreover, we assume that any cluster C = {i1; : : : ; im} ⊂ Nn inherites this property, i.e. xi1 ≤ : : : ≤ xim .
Then, for the median c of the cluster C we have
m
∑ |xil − c| =
⌊m=2⌋
∑ (c − xil ) +
l=1
l=1
m
∑
l=⌈m=2⌉+1</p>
      <p>⌊m=2⌋
(xil − c) = − ∑ xil +
l=1
m
∑
l=⌈m=2⌉+1
xil :
Therefore, for a given sample , Φ( ) = inf =(c1;c2) F ( ; ) depends on choice of partitions C1 ∪ C2 = Nn
ultimately and obeys the equation
Thus, v∗(n; 2) = sup ∈[0;1]n Φ( ) is an optimum value of linear program (4)
v∗(n; 2) =
max u
s:t:
}
⌊m2=2⌋
∑
i=1
m2
∑
i=⌈m2=2⌉+1
xi+m1 +
xi+m1 : m1 + m2 = n</p>
      <p>(3)

 :

⌊m1=2⌋
− ∑ xi +
i=1
m1
∑
i=⌈m1=2⌉+1
0 ≤ x1 ≤ : : : ≤ xn ≤ 1:
xi −
⌊m2=2⌋
∑ xi+m1 +
i=1
m2
∑
i=⌈m2=2⌉+1
xi+m1 ≥ u;
(m1 + m2 = n);
(4)
Further, guided by the symmetry argument, we can reduce the number of variables (and also, the number of
constraints) in problem (4) by half. Indeed, suppose, ′ = (x′1; : : : ; x′n) is an optimal solution of (4). Then, by
symmetry, ′′ = (1 − x′n; : : : ; 1 − x′1) is an optimal solution of (4) as well. Convexity of the optimal set2 of (4)
implies that = ( ′ + ′′)=2, each whose entry is defined by the formula xi = (1 + x′i − x′n+1−i)=2 is also an
optimal solution. Since xi + xn+1−i = 1, hereinafter, we reduce the number of variables to ⌊n=2⌋. Moreover, for
odd n, x⌈n=2⌉ = 1=2.</p>
      <p>To show that B(n; 2) ≤ n=6, we study all cases for (n mod 6).</p>
      <p>Case n = 6t:
Consider the constraint of (4) defined by m1 = 2t and m2 = 4t.</p>
      <p>t 2t
− ∑ xi + ∑
i=1
i=t+1
3t
∑
i=2t+1
xi −
xi −
3t
∑ (1 − xi) +
i=2t+1
2t
∑(1 − xi) ≥ u;
i=1
which is equivalent to u + 2 ∑t</p>
      <p>i=1 xi ≤ t. Since all xi ≥ 0, u ≤ t = n=6, and we are done.</p>
      <p>Case n = 6t + 1:
Here, we consider two constraints of (4), defined by m1 = 2t, m2 = 4t + 1 and m1 = 2t + 1, m2 = 4t, respectively.
They are</p>
      <p>t 2t
− ∑ xi + ∑
i=1
i=t+1
xi −
3t
∑
2t
∑(1 − xi) ≥ u
i=1
2The set of optimal solutions
and
which implies
In case n = 6t + 2
we take constraints defined by m1 = 2t + 1; m2 = 4t + 1 and m1 = 2t; m2 = 4t + 2:
Transformed
they imply</p>
      <p>t 2t+1
− ∑ xi + ∑ xi −
i=1 i=t+2
t 2t
− ∑ xi + ∑ xi −
i=1
i=t+1
3t+1
∑ xi −
i=2t+2
3t+1
∑ xi −
i=2t+1
3t+1 2t
∑ (1 − xi) + ∑(1 − xi) ≥ u
i=2t+2 i=1
3t+1 2t+1
∑ (1 − xi) + ∑ (1 − xi) ≥ u:
i=2t+2 i=1
 t
u + 2 ∑xi − x2t+1 ≤ t
 i=1</p>
      <p>t
u + 2 ∑xi + 2x2t+1 ≤ t + 1;
 i=1</p>
      <p>t
3u + 6 ∑ xi ≤ 3t + 1 i.e. u ≤ t + 1=3 = n=6:</p>
      <p>i=1
Case n = 6t + 3
is similar to the case n = 6t. Here, to obtain the desired bound, it is enough to consider the single constraint
defined by m1 = 2t + 1 and m2 = 4t + 2</p>
      <p>t 2t+1
− ∑ xi + ∑ xi −
i=1
i=t+2
3t+1
∑
i=2t+2</p>
      <p>1
xi − 2 −
i=2t+2
3t+1 2t+1
∑ (1 − xi) + ∑ (1 − xi) ≥ u:
i=1
(5)
Being transformed, (5) becomes
which implies u ≤ t + 1=2 = n=6.</p>
      <p>t
u + 2 ∑ xi + xt+1 ≤ t + 1=2;</p>
      <p>i=1
In case n = 6t + 4
we convolve again two appropriate constraints defined by m1 = 2t + 1; m2 = 4t + 3 and m1 = 2t + 2; m2 = 4t + 2
t 2t+1
− ∑ xi + ∑ xi −
i=1 i=t+2
t+1 2t+2
− ∑ xi + ∑ xi −
i=1
i=l+2
3t+2
∑ xi −
i=2t+2
3t+2
∑ xi −
which, after the equivalent transformation give the subsystem
which, being convolved, gives us
Now, we show that for any n ≥ 12 inequality (2) is tight. Consider the following configuration given by locations
p1; : : : ; p5
Place n = 4⌊ n4 ⌋ + { 4 } points at the locations p1; : : : ; p5 with multiplicities presented at Fig. 3
n</p>
      <p>Since n ≥ 12, the multiplicities of points located at p1; p2; p4; and p5 are at least 3 and at most 3 points
are located at p3. By the symmetry of the sample obtained, there are two best options to partition it into two
clusters C1 = {1; : : : ; ⌊n=4⌋}, C2 = {⌊n=4⌋ + 1; : : : ; n} and C1 = {1; : : : ; 2⌊n=4⌋}, C2 = {2⌊n=4⌋ + 1; : : : ; n} (see
Fig.4).
Let us calculate the cost F ( ; ) for each option. In the first case</p>
      <p>F ( ; ) = ∑</p>
      <p>|xi − c2|;
i∈C2
where c2 = p4 (since n &gt; 12). Therefore,</p>
      <p>F ( ; ) =
:
Consider the second case. Here, again c2 = p4. Therefore,</p>
      <p>F ( ; ) =
;
i.e. Theorem is completely proved so as point (ii).</p>
    </sec>
    <sec id="sec-4">
      <title>Acknowledgements</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>[</surname>
          </string-name>
          Ben-David,
          <year>2015</year>
          ]
          <article-title>Ben-</article-title>
          <string-name>
            <surname>David</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>Computational feasibility of clustering under clusterability assumptions</article-title>
          .
          <source>CoRR, abs/1501</source>
          .00437.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [Grønlund et al.,
          <year>2017</year>
          ] Grønlund,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Larsen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. G.</given-names>
            ,
            <surname>Mathiasen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            , and
            <surname>Nielsen</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. S.</surname>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Fast exact kmeans, k-medians and bregman divergence clustering in 1d</article-title>
          . CoRR, abs/1701.07204.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <source>[Guruswami and Indyk</source>
          , 2003] Guruswami,
          <string-name>
            <given-names>V.</given-names>
            and
            <surname>Indyk</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          (
          <year>2003</year>
          ).
          <article-title>Embeddings and non-approximability of geometric problems</article-title>
          .
          <source>In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms</source>
          , SODA '
          <volume>03</volume>
          , pages
          <fpage>537</fpage>
          -
          <lpage>538</lpage>
          , Philadelphia, PA, USA.
          <source>Society for Industrial and Applied Mathematics.</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <source>[Har-Peled and Mazumdar</source>
          , 2004]
          <article-title>Har-Peled, S. and</article-title>
          <string-name>
            <surname>Mazumdar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2004</year>
          ).
          <article-title>On coresets for k-means and k-median clustering</article-title>
          .
          <source>In Proceedings of the Thirty-sixth Annual ACM Symposium on Theory of Computing</source>
          , STOC '
          <volume>04</volume>
          , pages
          <fpage>291</fpage>
          -
          <lpage>300</lpage>
          , New York, NY, USA. ACM.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <source>[Khachai and Neznakhina</source>
          , 2017] Khachai,
          <string-name>
            <given-names>M.</given-names>
            and
            <surname>Neznakhina</surname>
          </string-name>
          ,
          <string-name>
            <surname>E.</surname>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Solvability of the Generalized Traveling Salesman Problem in the class of quasi- and pseudo-pyramidal tours (in Russian)</article-title>
          .
          <source>Trudy Inst. Matematiki i Mechaniki UrO RAN</source>
          ,
          <volume>23</volume>
          (
          <issue>3</issue>
          ):
          <fpage>280</fpage>
          -
          <lpage>291</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [Kumar et al.,
          <year>2010</year>
          ] Kumar,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Sabharwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            , and
            <surname>Sen</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          (
          <year>2010</year>
          ).
          <article-title>Linear-time approximation schemes for clustering problems in any dimensions</article-title>
          .
          <source>J. ACM</source>
          ,
          <volume>57</volume>
          (
          <issue>2</issue>
          ):5:
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          :
          <fpage>32</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>